Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Unsolved
Collapse
Discussion Forum to share and further the development of home control and automation, independent of platforms.
B

Buxton

@Buxton
Is there a way to turn this section (image in post) off?
toggledbitsT
Topic thumbnail image
Comments & Feedback
Device log?
G
@toggledbits is there a log that will show me what rule is turning on a specific device? I've got a switch that has been kicking on at 2200 ET for several nights now and the reactor.log doesn't have a thing in it that I can see on a device level (it being more rules-based).
Multi-System Reactor
Midnight crossing not working in date/time condition (build 25325)
tunnusT
Topic thumbnail image
Multi-System Reactor
Error: Command timeout
G
at _ClientAPI._commandTimeout (http://192.168.1.100:8111/client/ClientAPI.js:807:179 Seeing this randomly when returning to open browser tab after being away awhile. Once, maybe twice a day. "What did you do to trigger it?" Literally nothing, just walked away and returned and there it was. Actions taken in reasonably close proximity to this particular instance of it popping up: I'd restarted the MSR container in Portainer. I'll try to grab some logs here shortly.
Multi-System Reactor
Reactor (Multi-System/Multi-Hub) Announcements
toggledbitsT
Build 21228 has been released. Docker images available from DockerHub as usual, and bare-metal packages here. Home Assistant up to version 2021.8.6 supported; the online version of the manual will now state the current supported versions; Fix an error in OWMWeatherController that could cause it to stop updating; Unify the approach to entity filtering on all hub interface classes (controllers); this works for device entities only; it may be extended to other entities later; Improve error detail in messages for EzloController during auth phase; Add isRuleSet() and isRuleEnabled() functions to expressions extensions; Implement set action for lock and passage capabilities (makes them more easily scriptable in some cases); Fix a place in the UI where 24-hour time was not being displayed.
Multi-System Reactor
[Solved] Local expression in Rule does not evaluate as they used to do
CrilleC
Topic thumbnail image
Multi-System Reactor
Home Assistant 2025.11.2 and latest-25315
CrilleC
Topic thumbnail image
Multi-System Reactor
Notice to Docker + ARM Users (RPi 3/4/5 and others)
toggledbitsT
This post does not apply to users of Intel/AMD-based systems. If you are using a Reactor image tagged latest-amd64 or stable-amd64, then this post does not apply to you. It also does not apply to bare-metal installs; it's for users of docker images on ARM-based systems only (principally Raspberry Pi hosts, but could be others). After January 15, 2026, I will no longer produce the aarch64-tagged docker image for Reactor. The ARM images will be arm64 for 64-bit operating systems, and armv7l for 32-bit operating systems. For those of you running a container from the aarch64 image today, this will be a relatively simple change: you just need to switch the image used for your docker container to a differently-tagged image. If you are using docker-compose, then this is a relatively simple matter of changing the image line in your docker-compose.yaml file and then stopping (docker-compose down) and restarting (docker-compose up -d) your Reactor daemon. But there's a catch... not all of you can safely just switch from the aarch64 image to the arm64 image. And, you can't just trust the output of uname -m, for example, because this exposes the CPU architecture, but not the word size of the OS running on that CPU. For Raspberry Pi systems, the transition to 64-bit operating systems was long (starting in 2016) and not always obvious — although there was a first "official" 64-bit OS for RPis in 2020, it did not become a default recommendation in the Raspberry Pi Imager until 2021, and then that was only the default for Pi 3/4 systems with >4GB RAM; it was 2022 before it was universally recommended for all 64-bit CPUs regardless of RAM size. Depending on when you first imaged your RPi system and what default you may have been offered/chosen, you could today easily have a 64-bit CPU Raspberry Pi running a 32-bit version of the operating system. Upgrades along the way would not change this; changing it to fully 64-bit requires a full reimage of the system. To establish if your OS is 64- or 32-bit, log in to your Pi and run: sudo dpkg-architecture -q DEB_HOST_ARCH. If the response is arm64 or aarch64, then you are running a 64-bit OS and you should use the arm64-tagged image. If it's anything else, you are running a 32-bit OS, and you should use the armv7l-tagged image. pi@rpi4-1:~ $ sudo dpkg-architecture -q DEB_HOST_ARCH armhf pi@rpi4-1:~ $ uname -m aarch64 pi@rpi4-1:~ $ In the example above, the uname command reports that the CPU is 64-bit architecture (aarch64), which is true for the host on which I ran these commands, but the DEB_HOST_ARCH value is armhf, indicating a 32-bit operating system. This system has to use the armv7l-tagged image. Other systems will have their own ways of determining the word size of the running OS. Since the majority of Reactor users running ARM systems are on Raspberry Pis, I am able to supply the above instructions, but if you happen to have a different ARM system, you'll need to do some web searching to figure out how to expose that information. Or, you can just try the arm64 image, and if it doesn't start up, try the armv7l image. Remember to always back up your system before making any changes. For everyone, please make this change as soon as possible, and if you have any trouble finding a working image, please (1) go back to the current aarch64 image; and (2) let me know in this thread along with as much detail about your host system as you can offer (including the output of the dpkg-architecture command mentioned above).
Multi-System Reactor
Requesting a proper ARM64/aarch64 Docker image (Pi 5 support)
M
Hi, I'm in the process of migrating from a Raspberry Pi 4 (ARMv7) to a Raspberry Pi 5 (ARMv8/aarch64), but I’ve run into an issue: there is no proper ARMv8/aarch64 image available. None of the existing images run on the Pi 5 - they all exit immediately with code 139 (segmentation fault), which typically indicates that the binaries inside the image are not compatible with the ARM64/aarch64 architecture used by the Pi 5. Would it be possible to publish a correct ARMv8/aarch64 (linux/arm64) image? Building one should be relatively straightforward using docker buildx with multi-arch support. For example, my own Node.js images are built this way: docker buildx build --push \ -t <localrepo>/<project>:<tag> \ --platform=linux/arm64,linux/amd64 \ --file ./apps/<project>/Dockerfile . This produces both the AMD64 and ARM64/v8 variants automatically. Also, as a side note, it may be best to avoid using Alpine as the base image for the ARM64 build, since musl-based builds often cause compatibility issues and unnecessary headaches. A glibc-based base image (e.g., Debian or Ubuntu) tends to work far more reliably on ARM64, especially for Node.js applications. @toggledbits - tagging you in case you missed this. Thanks, mgvra
Multi-System Reactor
Script action and custom timers
therealdbT
Sorry to write here without trying, but I’m flying today. Am I correct if i say that script action with alarm() makes it possible to execute a reaction in a given interval, lets say 15 seconds or 3.5 minutes? That sounds amazing, since I’ve used weird tricks, including a custom controller, just to do this.
Multi-System Reactor
Help resolve change in behaviour post update
CatmanV2C
Topic thumbnail image
Multi-System Reactor
There is an alternative to homebridge-mqttthing
CrilleC
Just throwing out a general hint to the people running Homebridge and MQTT. Homebridge MQTT-Thing hasn't been updated in almost 2 years and it falls behind on compatibility with the development of Homebridge. I was looking for a replacement and found Homebridge Easy MQTT and I think it's a good replacement for MQTT-Thing. I particularly find Easy MQTT Value tranformers easier to to understand and use compared to MQTT-Thing Apply function. It took a while to migrate everything but I'm pleased and can recommend.
Software
Reactor w/HA 2025.11 error on set_datetime service call setting only time
CrilleC
@toggledbits Do you know if this is related to that PR or is it a change they made in 2025.11.1? [latest-25310]2025-11-11T13:16:24.319Z <HassController:INFO> HassController#hass perform x_hass_input_datetime.set_datetime on Entity#hass>input_datetime_vvb_dag with { "time": "10:45" } [latest-25310]2025-11-11T13:16:24.320Z <HassController:INFO> HassController#hass: sending payload for x_hass_input_datetime.set_datetime on Entity#hass>input_datetime_vvb_dag action: { "type": "call_service", "service_data": { "date": (null), "time": "10:45", "datetime": (null), "timestamp": (null) }, "domain": "input_datetime", "service": "set_datetime", "target": { "entity_id": "input_datetime.vvb_dag" } } [latest-25310]2025-11-11T13:16:24.321Z <HassController:ERR> HassController#hass request 1762866984320<2025-11-11 14:16:24> (call_service) failed: [Error] Not a parseable type for dictionary value @ data['date'] [-] [latest-25310]2025-11-11T13:16:24.321Z <HassController:WARN> HassController#hass action x_hass_input_datetime.set_datetime({ "time": "10:45" }) on Entity#hass>input_datetime_vvb_dag failed! [latest-25310]2025-11-11T13:16:24.321Z <HassController:INFO> Service call payload: {"type":"call_service","service_data":{"date":null,"time":"10:45","datetime":null,"timestamp":null},"domain":"input_datetime","service":"set_datetime","target":{"entity_id":"input_datetime.vvb_dag"},"id":1762866984320} [latest-25310]2025-11-11T13:16:24.322Z <HassController:INFO> Service data: {"fields":{"date":{"example":"\"2019-04-20\"","selector":{"text":{"multiline":false,"multiple":false}}},"time":{"example":"\"05:04:20\"","selector":{"time":{}}},"datetime":{"example":"\"2019-04-20 05:04:20\"","selector":{"text":{"multiline":false,"multiple":false}}},"timestamp":{"selector":{"number":{"min":0,"max":9223372036854776000,"mode":"box","step":1}}}},"target":{"entity":[{"domain":["input_datetime"]}]}} [latest-25310]2025-11-11T13:16:24.322Z <Engine:ERR> Engine#1 reaction rule-mgb8pfhs:S step 0 perform x_hass_input_datetime.set_datetime failed: [Error] Not a parseable type for dictionary value @ data['date'] [-] [latest-25310]2025-11-11T13:16:24.322Z <Engine:INFO> Engine#1 action args: { "time": "10:45" } [latest-25310]2025-11-11T13:16:24.322Z <Engine:INFO> Resuming reaction Sätt Schema VVB i Home Assistant<AKTIV> (rule-mgb8pfhs:S) from step 1 [latest-25310]2025-11-11T13:16:24.323Z <HassController:INFO> HassController#hass perform x_hass_input_datetime.set_datetime on Entity#hass>input_datetime_vvb_natt with { "time": "03:00", "timestamp": 0 } [latest-25310]2025-11-11T13:16:24.323Z <HassController:INFO> HassController#hass: sending payload for x_hass_input_datetime.set_datetime on Entity#hass>input_datetime_vvb_natt action: { "type": "call_service", "service_data": { "date": (null), "time": "03:00", "datetime": (null), "timestamp": 0 }, "domain": "input_datetime", "service": "set_datetime", "target": { "entity_id": "input_datetime.vvb_natt" } } [latest-25310]2025-11-11T13:16:24.324Z <HassController:ERR> HassController#hass request 1762866984323<2025-11-11 14:16:24> (call_service) failed: [Error] Not a parseable type for dictionary value @ data['date'] [-] [latest-25310]2025-11-11T13:16:24.324Z <HassController:WARN> HassController#hass action x_hass_input_datetime.set_datetime({ "time": "03:00", "timestamp": 0 }) on Entity#hass>input_datetime_vvb_natt failed! [latest-25310]2025-11-11T13:16:24.324Z <HassController:INFO> Service call payload: {"type":"call_service","service_data":{"date":null,"time":"03:00","datetime":null,"timestamp":0},"domain":"input_datetime","service":"set_datetime","target":{"entity_id":"input_datetime.vvb_natt"},"id":1762866984323} [latest-25310]2025-11-11T13:16:24.324Z <HassController:INFO> Service data: {"fields":{"date":{"example":"\"2019-04-20\"","selector":{"text":{"multiline":false,"multiple":false}}},"time":{"example":"\"05:04:20\"","selector":{"time":{}}},"datetime":{"example":"\"2019-04-20 05:04:20\"","selector":{"text":{"multiline":false,"multiple":false}}},"timestamp":{"selector":{"number":{"min":0,"max":9223372036854776000,"mode":"box","step":1}}}},"target":{"entity":[{"domain":["input_datetime"]}]}} [latest-25310]2025-11-11T13:16:24.324Z <Engine:ERR> Engine#1 reaction rule-mgb8pfhs:S step 1 perform x_hass_input_datetime.set_datetime failed: [Error] Not a parseable type for dictionary value @ data['date'] [-] [latest-25310]2025-11-11T13:16:24.324Z <Engine:INFO> Engine#1 action args: { "time": "03:00", "timestamp": 0 } [latest-25310]2025-11-11T13:16:24.325Z <Engine:INFO> Resuming reaction Sätt Schema VVB i Home Assistant<AKTIV> (rule-mgb8pfhs:S) from step 2 [latest-25310]2025-11-11T13:16:24.325Z <Engine:INFO> Sätt Schema VVB i Home Assistant<AKTIV> all actions completed.
Multi-System Reactor
Reactor Version 25310 : Office Light control via rule in reactor no longer working since last update.
P
Hello, I currently have an office light (connected via a Leviton Zwave Dimmer switch) controlled from a Gen5 Aeotech Zwave switch installed on my Synology 720+ NAS. I run HA(2025.11.10) in a virtual machine from my NAS and Reactor on the container manager of the same NAS. Prior to updating to 25304 the rule I had set to turn the light on to a specific dimming value worked correctly. Now the rule appears to follow the decision tree, however the reaction does not trigger setting the dimming or turning on the office light? Strangely I can still turn the light on and off as well as dim it directly from HASS..? I have tried using the ''try this action'' button in the rules reaction setting and it will not control the light and does not throw an error flagÉ Please help, P.S Reactor has been rock steady for me over the last few years and I'm a big fan of this solution.
Multi-System Reactor
Shelly Wall Display XL
therealdbT
I don't know if you guys are into dashboards, but I am. For a second home I tried the Shelly Wall Display 2, and while not so big, it worked well over the summer. Since we're remodeling our house, I just swapped my old Fire Tablet (with its own problems) with two new Shelly Wall Display XL. I just removed the standard firmware, and I added mine (https://github.com/dbochicchio/ShellyElevate), forked from https://github.com/RapierXbox/ShellyElevate I just managed to support buttons (this thing has 4 of them) and it's all auto-discovered by Home Assistant and accessible via Reactor. I also have a new build in the works with support for buttons inside HA. I added a bonus Javascript interface sending events (screen/screensaver status, buttons, motion) to automatically drive the dashboard (all doing in HTML+Javascript and monitoring Reactor's variable). This specifical thing excluded, go get one of them, the device has a decent CPU for HA dashboards and blends wonderfully in the decor.
Hardware
[Solved] alarm() in global expression throws error in log.
CrilleC
Topic thumbnail image
Multi-System Reactor
[Solved] Define function issue in latest-25304
CrilleC
Topic thumbnail image
Multi-System Reactor
No Upgrade Notification for Build 25308?
CatmanV2C
FWIW I'm no longer getting a notification from MSR that there's an update. Just thought I'd mention it C
Multi-System Reactor
Strange behavior in MSR latest-25304 with disabled groups in Reaction
therealdbT
Topic thumbnail image
Multi-System Reactor
Do you Matter?
akbooerA
Is anyone using the Matter protocol to connect devices?
General Discussion
About
Posts
136
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Reactor scope issues
    B Buxton

    @toggledbits @akbooer Sorry, I will try to be clearer.
    " I don't know what "assigning the luup log function to a table" means"

    In many of Patrick's plugins, he uses a global lua table to hold plugin data and functions. He assigns shorthand names that call common luup functions, then stores those truncated names in the table. Then the first class functions are called from the table. I believe it is this abstraction that is contributing to log entries that show nil values, as direct calls of "luup.log" do not show nil values. The technique should work in openluup, and most often it does, but sometimes it doesn't.

    Here's an example from the log where it does not work:

    2022-01-15 14:13:12.551   luup.variable_set:: 258.urn:micasaverde-com:serviceId:HaDevice1.CommFailure was: 0 now: 0 #hooks:0
    2022-01-15 14:13:12.551   luup.variable_set:: 258.urn:micasaverde-com:serviceId:HaDevice1.CommFailureTime was: 0 now: 0 #hooks:0
    2022-01-15 14:13:12.551   luup_log:149: Reactor: Starting nil (#nil)
    2022-01-15 14:13:12.551   luup.variable_set:: 149.urn:toggledbits-com:serviceId:Reactor.Message was: Starting Unused1 now: Starting Basic Functions #hooks:0
    2022-01-15 14:13:12.552   luup.variable_set:: 265.urn:toggledbits-com:serviceId:ReactorSensor.Invert was: nil now:  #hooks:0
    2022-01-15 14:13:12.552   luup.variable_set:: 265.urn:toggledbits-com:serviceId:ReactorSensor.Invert was:  now: nil #hooks:0
    

    In the log entry "luup_log:149: Reactor: Starting nil (#nil)" the text of the log entry is there "Reactor: Starting", but the variable following the text is nil. This is what I meant by "picking up on variables". The log entries are being displayed, but anything that is a variable is showing as nil. The variables themselves are not actually nil because I can see from program execution that they are doing the job that they're supposed to be doing. It is only in the log entries that they show as nil, at least insofar as what is visible to me.

    As for using nil to delete a variable, that seems to be understood and is separate from the log problem.

    I believe that this is a scope problem, thus the title of the post. But I don't believe this is a reactor scope problem in that the same issue does not occur on the Vera itself. So for whatever reason, in openLuup, the scope of the variable being displayed in the log is different from the scope of the log function--that the value of the variable is somehow hidden from the function.

    This is a problem as it relates to the readability of the log, an annoyance more than anything, so I have no expectations to have it fixed. In my original screenshots, you can see multiple log entries that display as nil, so that's why I brought this to your attention as I felt that if there are scope issues at work with the logging function, then it could be happening elsewhere as well.

    The only other thing that I would add is that in my startup lua, I call a module in the _G space so that I can access functions in the lua section of Reactor activities. My call is _G.myStartUpLua = require("myStartUpLua") I don't believe that this should have an effect on the log, but perhaps it does.

    Plugins

  • Reactor scope issues
    B Buxton

    @therealdb Yes, that's where I'm headed too. Agreed that Hass is very stable. It's just that there are real structural changes being made all the time, and before I sink my time into learning the details of the software, I want to be sure that pretty much everything is final in the engine.

    Plugins

  • Reactor scope issues
    B Buxton

    @toggledbits Yes, I think that's a large part of the problem as I'm seeing the same behavior with deleted groups in various sensors. The sensor groups flop between nil and empty in the attempt of trying to delete the variable.

    There seems to be a separate issue of the openLuup log not picking up on variables for your various plugins log entries.

    I'm guessing this has to do with assigning the luup log function to a table and then calling a truncated name ie L(...) when writing to the log. So there is some scope issue going on that is different on openLuup from that of a Vera, brought about by a level of abstraction.

    Plugins

  • Reactor scope issues
    B Buxton

    @therealdb Well that's a shame. One more nail in the coffin. I'll probably move to HA as soon as the various versions of the software are consolidated. It's a great platform, but for my needs, it is still too subject to breaking structural changes.

    Plugins

  • Reactor scope issues
    B Buxton

    @toggledbits OK. Does that mean that the log entries as shown above are expected ie. that the flopping (from nil to empty and back again) for reactor expression variables is routine?

    Plugins

  • Reactor scope issues
    B Buxton

    @akbooer Yes, I tried browser refresh without any change. If you look at the log, you see the variables flopping from nil to empty and then back again to nil.

    @therealdb are you seeing anything like this in your openLuup reactor installation? I'm only seeing this nil behavior with Reactor expression variables.

    Plugins

  • Reactor scope issues
    B Buxton

    Hi Patrick/AK Booer

    I am able to see Reactor expressions in the AltUI UI per the below and the expressions work as they should in my reactor sensors. When an expression changes, the reactor sensor responds accordingly.

    javascript.png

    However, I cannot see the expressions in luup state variables or the luup logs:

    Luup.png

    Log.png

    I tried reinstalling openLuup (latest development) and when that failed to change the noted behavior, I reinstalled lua5.1. There was also no change. Rebooting the machine also produced no change.
    I suspect this is an openLuup issue as I also see nil values for some plugins:

    plugin.png

    And other plugins are fine:

    2022-01-12 20:47:12.027   luup.variable_set:: 63.urn:upnp-micasaverde-com:serviceId:Weather1.CurrentDewPoint was: 32 now: 29.7 #hooks:0
    2022-01-12 20:47:12.028   luup.variable_set:: 63.urn:upnp-micasaverde-com:serviceId:Weather1.WindSpeed was: 1.76 now: 2.8 #hooks:0
    2022-01-12 20:47:12.028   luup.variable_set:: 63.urn:micasaverde-com:serviceId:HumiditySensor1.CurrentLevel was: 30 now: 27 #hooks:0
    2022-01-12 20:47:12.028   luup.variable_set:: 65.urn:micasaverde-com:serviceId:HumiditySensor1.CurrentLevel was: 30 now: 27 #hooks:0
    2022-01-12 20:47:12.028   luup.variable_set:: 63.urn:upnp-micasaverde-com:serviceId:Weather1.LastUpdate was: 1642047430 now: 1642049231 #hooks:0
    
    

    Any ideas on how to troubleshoot this.....

    Plugins

  • luup.variable_watch
    B Buxton

    @akbooer Ok, that's clear enough. Thanks

    openLuup

  • luup.variable_watch
    B Buxton

    @buxton Yeah, running lua within the Reactor plugin/MSR is an incredibly powerful feature that, combined with expressions, pretty much allows you to do whatever you want to do. A wonderful piece of software.

    Now I need to figure out how to construct the closure that will surround the watch callback function. Tricky, because there are so many variables that go into deciding when the routine should branch, and when branching should be avoided.

    openLuup

  • luup.variable_watch
    B Buxton

    @akbooer OK thanks, that's what I needed to know.

    One final question if you could. How does scope affect a watch called from start-up lua? I'm asking because I imagine the scope for a watch is plugin specific, and therefore is confined to the plugin.

    The watch will be created in the initialization code of a global module, that is in turn referenced in start-up lua ie. "_G.myStartUpLua = require("myStartUpLua") "

    This module contains functions that are called from Reactor activities similar to this:
    Reactor Activity.png

    Will the global watch callback function be visible to the watch if both are created within "myStartUpLua".

    openLuup

  • luup.variable_watch
    B Buxton

    @akbooer Yes, I understand the callback and how it is triggered. The question is once a watch is established (in this case during startup lua), can it be removed. If so, how is that done. Secondly, what happens when you re-run the code that places a watch on a specific variable. Do the watches stack up in memory, or is the previous watch simply replaced by the new call. Or perhaps the new watch is ignored. I don't know as I can't find any documentation on how this works.

    I only want the callback triggered under specific conditions ie. there are certain conditions where the watched variable should not trigger the callback routine-- such as when zones are opening and closing when there is no intention to arm the security panel. If I can't remove a watch and then re-add it later, I'm guessing that I have to account for those conditions within callback function. Is that correct?

    openLuup

  • luup.variable_watch
    B Buxton

    Hi AK,

    I can't find any info on how a variable watch actually ends.

    I have the following variable watch on an alarm panel plugin UPnP variable. The code is part of some extended startup lua:

    luup.variable_watch("waitForZoneToClose","urn:micasaverde-com:serviceId:EVL3VistaAlarmPanel1", "FaultedZoneNames", 7)
    

    In the same startup lua, the global function "waitForZoneToClose" is called when the "FaultedZoneNames" variable changes, but this same function is also called at the start of a routine that determines what zones are actually faulted on the alarm panel.

    openZoneCount= waitForZoneToClose(7, "urn:micasaverde-com:serviceId:EVL3VistaAlarmPanel1", "FaultedZoneNames" , "","")
    

    So although the luup watch variables are included in the function params, they are not used within the function:

    function waitForZoneToClose(dev_id, service, variable, old_val, new_val)
      openZoneCount = getOpenZones()	--retrieves open zone names on panel, and zones to bypass per mode setting
            
       if openZoneCount > 0 then  -- there are open zones
          buildReservedZonesTable()
                
         -- run routine to pop bypass and vent zones from the zonesToClose stack
          removeReservedZones()
          openZoneCount = tablelength(tZonesToClose)  -- run the count again to see if any zone was popped off the stack during removeReservedZones
       end
       return openZoneCount
    end
    

    Because I run the function recursively ie. when the variable that holds the open zones changes, I rerun the function that detects open zones, and if any relevant zones are still open, the code for the same watch is ran again, to detect if any zones have changed status, this before trying to auto arm the panel. So there might be a situation where two or more zones need to be closed before the panel will arm, and it takes real time to physically close each zone, one by one, and as each closes, the callback would trigger again.

    Hope that makes sense.

    I wasn't clear if a variable watch ends when the watched variable changes and the code then proceeds. Or do you have to end the watch via code somehow? I was concerned about a possible condition where watch upon watch would be added to memory until a luup reload would clear the watches, or do the watches end and self-cleanup when the callback function is called.

    openLuup

  • A couple of suggestions for MSR
    B Buxton

    Allowing the MQTT service to be created as a container, or couple the MQTT service directly with the MSR container would be great. With the exception of openLuup, I don't install anything on my HA server that is not containerized. The reason being that dependencies get corrupted, or changed by another app, or services conflict, etc..... Containers eliminate all that chaos and allow me to take down any software that's not working, all the while not destabilizing the underlying server.

    Also, I use MSR primarily for Vera/openLuup and Home Assistant. It appears that the connection to HA is a websocket, allowing HA to async updates to MSR, whereas the connection to Vera is REST based relying on polling. Due to underlying issues with the Lua socket library, I try to keep polling to an absolute minimum so I have MSR turned off at the moment. What would be really cool is a plugin that would reside on openLuup or a Vera that would catch any and all changed states, and then push those state changes to MSR, perhaps with a synchronous acknowledgement. This complicates MSR of course, as you would need to install two separate pieces of software, however, I think the benefits of a push model, outweigh the downside of maintaining two separate apps. On the other hand, Vera is not long for this world, so perhaps the effort is not worth it.

    Multi-System Reactor

  • TTS in MSR?
    B Buxton

    @fanan Per this topic https://smarthome.community/topic/744/sending-a-service-request-to-home-assistant?_=1638829172919 I couldn't get Alexa tts to work in MSR, but I do have it working in openLuup with the following code that sits inside a simple plugin:

    myEchoDevice = "alexa_media_".. myEchoDevice
    myEchoMessage = table.concat(myEchoMessage)
    	
    local request_body = json.encode {message = myEchoMessage, data = {["type"] = "announce",method = "all"}}
    
    local response_body = {}
    	
    local theURL = 'http://'..HomeAssistantIP..':'..HomeAssistantPort..'/api/services/notify/'..myEchoDevice  
    	
    r, c, h = http.request {
       url = theURL,
       method = "POST",
       headers = {
       ["Content-Type"]   = "application/json",
       ["Authorization"] = "Bearer ".. HomeAssistantToken,
       ["Content-Length"] = request_body:len()
       },
    source = ltn12.source.string(request_body),
    sink   = ltn12.sink.table(response_body)
    }
    

    The variable "myEchoDevice" is the exact name of the specific echo device (or device group) as presented in the Amazon Alexa app. I typically broadcast to all my devices via a group, intercom style, so I catch the message wherever I am in my home. The variable "HomeAssistantToken" needs to be created in HA. "myEchoMessage "is a lua table in the above code, but you could just as easily capture the message as a string, and then trim the string prior to sending it to the HTTP post request.

    Multi-System Reactor

  • Import Vera Rules in Docker Containers?
    B Buxton

    @3rdstng Ha! if you're in the US, I'll take it. I still have a veralite running in my garage that could do with an upgrade.

    Multi-System Reactor

  • Power outage and all the Vera devices were moved to room MiOS-xxxxx. How to fix?
    B Buxton

    @a-lurker Yeah, HA takes a couple of minutes to fully start, so 30 seconds is the bare minimum I could get away with on my system. Not to mention the host server's atom processor, while parsimonious on power use, is a dog when ten containers are starting up from boot. Luckily, power outages here are infrequent. When prices are right, I'll get a home battery/solar setup to eliminate that rare nuisance.

    Place in "/etc/cmh-ludl"

    openLuup_run.sh

    #!/bin/bash
    echo "Starting openLuup server"
    echo "To see tail of logfile: tail -f ./out.log"
    cd /etc/cmh-ludl
    sudo rm /etc/cmh-ludl/logs/out.log
    nohup ./openLuup_reload >> /etc/cmh-ludl/logs/out.log 2>&1 &
    

    openLuup_stop.sh

    #!/bin/bash
    echo "Stopping openLuup server"
    echo "To see tail of logfile: tail -f ./out.log"
    cd /etc/cmh-ludl
    curl http://localhost:3480/data_request?id=exit
    

    Then start the "openluup" service with:

    $ sudo systemctl enable openluup
    $ sudo systemctl start openluup
    

    OLservice.png

    Vera Bridge

  • GE/Jasco Z-wave wall switch
    B Buxton

    @librasun Good to know. I'm only out shipping costs if they don't as there's no way I have the time to de-solder these boards.

    Hardware

  • openLuup: Shelly Bridge plugin
    B Buxton

    @akbooer It's just easier to understand the code/ what's occurring in a plugin as opposed to openLuup, mainly because of the typical plugin structure and its place on top of the openLuup subsystem. That's probably a trivial distinction to you, but for me it's a huge difference in understanding as I'm not in any way fluent with the inside baseball of the OLuup object model.

    Per your MQTT comment, though it can be done (https://github.com/jziolkowski/tdm), it would be difficult to have functional device bridges if you took away MQTT, as you'd have to interrogate a router in some fashion to find out if these devices exist on one's network, and then use http commands to control the devices. So I see MQTT handling as more an innate part of the OL subsystem, like http, than a device profile like tasmota or shelly, device profiles that are typically handled as stand alone plugins.

    Plugins

  • GE/Jasco Z-wave wall switch
    B Buxton

    @librasun This is great to know. I have a box of these switches that failed from power outages. In each case, it seems a capacitor failed after power was turned back on, at least as far as I could tell from looking at the swollen cases. I didn't measure microfarads though as I did not want to start unsoldering components...

    Will they take back switches without a receipt as some of mine are ancient?

    Hardware

  • Power outage and all the Vera devices were moved to room MiOS-xxxxx. How to fix?
    B Buxton

    @a-lurker There's a systemd example in the openLuup user guide. Here's my startup based on those directions

    [Unit]
    Description=openLuup and AltUI Server for Vera 
    After=network-online.target
    After=sockproxy.service
    Wants=network-online.target
    
    [Service]
    Type=forking
    ExecStartPre=/bin/sh -c 'until ping -c1 <VeraIP>; do sleep 1; done;'
    ExecStartPre=/bin/sleep 30
    WorkingDirectory=/etc/cmh-ludl
    ExecStart=/bin/bash /etc/cmh-ludl/openLuup_run.sh
    ExecStop=/bin/bash /etc/cmh-ludl/openLuup_stop.sh
    Restart=on-failure
    RestartSec=5
    
    [Install]
    WantedBy=multi-user.target
    

    "Wants=network-online.target" makes sure the network is up. Then the ping command loops until a response is sent back from the vera. Followed by a 30 second sleep to allow everything else to get up and running. However, no vera up-- no openLuup as the ping does not time out.

    Your router must allow ICMP between the vera and the OL host. Per the OL help file, you then need to create the .sh files and then activate the systemd service. I use Patrick's sock proxy for an app, so that command does not need to be in there if you don't use the proxy.

    Vera Bridge
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Unsolved