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.
ElcidE

Elcid

@Elcid
Home Assistant Connect ZWA-2 & ZBT-2
therealdbT
Topic thumbnail image
Hardware
Date/time condition
tunnusT
Topic thumbnail image
Multi-System Reactor
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
About
Posts
251
Topics
20
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Not so quiet around here :)
    ElcidE Elcid

    @cw-kid I have not been able to login since the 28/03.
    As to rebel, just a little more blunt than you. As I see it someone was on a purge.
    Shame they are purging people that help others, specially vera support, still plenty of support here though.

    General Discussion

  • My Wandering
    ElcidE Elcid

    I am a Electrician. I installed hundreds of smart devices for others prior to having my own home automation. In 2013 I bought a new house and decided to make it smart. I did some homework and settled on Z-wave and VeraPlus.
    My installation comprises of
    25 Z-wave dimmer/switch inserts
    3 Z-wave door sensors
    10 sonoff devices(basics,TH16 and Mini) ,
    4 Tuya(lamps and RGB strips) ,
    6 shellys(connected to motion sensors and 2 controlling dead DIY bolts )
    3 Amazon Dots(gen2)
    2 Broadlink (RMPro's)
    4 DIY RF Venetian Blinds
    2 Multi button DIY remotes
    1 NVR
    1 Network drive/Media server/ftp server.
    1 smart thermostat heating and hot water
    4 wired 240v/battery Aico smoke and heat detectors (connect to zwave via Relays)
    1 robot hover.
    1 Siren
    Node-red server running on android.
    Testing openluup on android.
    Automate App running on andorid Boxes/phones.
    All tv's are connected to android boxes.
    No windows PC.
    Debian running on android box.
    Plugins Reactor, AlexaTTS, Switchboard and Virtual HTTP Switch.

    I can control all of my devices from anyone of these platforms Vera/OpenLuup, Node-red, Automate(phone/tv box) or Alexa.
    All devices have a standard/manual switch for anyone to control, and can be controlled even if my VeraPlus stopped working or internet out. My system is stable and may get a luup reload every couple of weeks.

    None of my sonoff's or tuya have been flashed. I found Shelly very late into game and will be using these more now i found them, as they offer local control.

    I have some coding knowledge from the 90's, but have never worked in the industry.

    Blogs

  • Alarm Clock
    ElcidE Elcid

    I now have node-red setting a silent switching of a v device, by saying "wake me up at [any time and/or day]". also depending which echo i use i can set a different v device, so different morning routines for each bedroom.

    @catman you can also do all your H A Bridge devices in node red to, as it has the local hue lights bridge to. So you could replace H A Bridge with node-red. It would not be difficult to set a http request to set your virtual alarm.

    Plugins

  • First post to say hello
    ElcidE Elcid

    Hi to all, Thought i would join as not to miss out on anygood information that you developers may share here.

    note- The input box for text does not display to well.I can not see what i am typing.
    Android 8 full sreen on tv box using firefox mobile view.
    If i use desktop view everything is ok.

    General Discussion

  • This is me
    ElcidE Elcid

    @CatmanV2 said in This is me:

    Well, if I see further, it's because I stand of the shoulders of giants. I've got where I got because of the experts here.

    Well said.

    Blogs

  • Not so quiet around here :)
    ElcidE Elcid

    @cw-kid

    Yes i am here, as always I will help anyone who asks.

    Just for info - I have no idea what the reason for my suspension, I have contacted CS but they seem to be just ignoring my request for a clear reason.

    As to GDPR if they run servers in europe then we are covered by GDPR, even if they move the servers to the US, as I think there is a privacy agreement with the US.

    aleksandr

    Is there GDPR in the US? - GDPR USA - Cookiebot™

    Is there GDPR in the US? - GDPR USA - Cookiebot™

    Is there GDPR in the US? Let Cookiebot explain GDPR in the USA to make sure you fully understand regulations and how to comply.

    General Discussion

  • Setting RGB colour values
    ElcidE Elcid

    0.5019607843137255, 0, 0.5019607843137255 You may want to round them. LOL

    Multi-System Reactor

  • Removing Orange Notification
    ElcidE Elcid

    Yes thanks for your efforts @DesT

    Comments & Feedback

  • Lua example http post request with json body
    ElcidE Elcid
    -- https request  json body
    -- Enable potentially unsafe lua code in,  user account - security
    local https = require "ssl.https"
    local http = require "socket.http"
    local ltn12 = require "ltn12"
    local json = require "dkjson"
    local payload = {{"test", "test", null, 0}}  --payload to be sent
    
    local request_body = { secret = "1.KAddd87s8s8FasL7-ze4KG_p5hrVg4Kee1-t3vnwGFhI=", to = "test@gmail.com", device = null, priority = "high", payload = payload } --the json body
    local response_body = {}
    request_body = json.encode(request_body)
    
    local r, c, h, s = https.request {
      url = 'https://llamalab.com/automate/cloud/message',
      method = 'POST',
      headers = {
        ["Content-Type"] = "application/json",
        ["Content-Length"] = string.len(request_body)
      },
      source = ltn12.source.string(request_body),
      sink = ltn12.sink.table(response_body)
    }
    
    
    Code/Snippet library

  • Expressions and LuaXP Functions
    ElcidE Elcid

    isNaN([1,2,3]) and isNaN("ten"/2) and isNaN("ten" + "eight") are all true

    Multi-System Reactor

  • Video Doorbells
    ElcidE Elcid

    My door is covered by a hidden microwave sensor. when triggered reactor sends a http request to my phone or tv box, depending on home or away. My phone/box uses Automate to receive the http request, Automate then opens the camera app and displays the camera. I can talk and listen though the camera app. Normally takes 5-10 seconds to complete. If i am home vera sends a TTS to alexa, informing me there is some one at the door.

    IPCam

  • node-red Alexa OpenLuup/Vera voice integration
    ElcidE Elcid

    Here is a simple integration of OpenLuup/vera device to Alexa via Node-red.

    Node-red-Vera/veraalexavoiceintegration.flow at main · E1cid/Node-red-Vera

    Node-red-Vera/veraalexavoiceintegration.flow at main · E1cid/Node-red-Vera

    Node-red flows for Vera. Contribute to E1cid/Node-red-Vera development by creating an account on GitHub.

    The speed is fast sub 1 second responses.

    Requirements -
    node-red.
    alexa.
    node-red-contrib-amazon-echo(local Hue devices).
    openluup or Vera (or any controller via http requests).

    Capabilities-
    Binary switch.
    dimming switch.
    rgb switch.
    Run scenes.

    Each alexa device node is configured in the topic of the amazon-echo device node -
    (device number#type of switch)
    bnary - 123#binary.
    dimming - 123#dimming.
    rgb - 123#colour (W/D is default 310 to adjust colour temp add value to end e.g. 123#colour#300
    scene - 123#scene#124 (123 on 124 off. 124 can be omitted).

    Enter the ip of your controller in the http request block.
    Just copy code and import into Node-red

    [
        {
            "id": "de7838ac.ebead",
            "type": "amazon-echo-hub",
            "z": "8659fc6b.981b4",
            "port": "8980",
            "processinput": "0",
            "discovery": true,
            "x": 150,
            "y": 840,
            "wires": [
                [
                    "cd0ae070.e98378",
                    "a605448.899d8b8",
                    "21ca89ff.b0f6ce"
                ]
            ]
        },
        {
            "id": "a605448.899d8b8",
            "type": "amazon-echo-device",
            "z": "8659fc6b.981b4",
            "name": "bedroom four",
            "topic": "199#colour",
            "x": 410,
            "y": 860,
            "wires": [
                [
                    "688830f.c57775"
                ]
            ]
        },
        {
            "id": "21ca89ff.b0f6ce",
            "type": "amazon-echo-device",
            "z": "8659fc6b.981b4",
            "name": "app safe",
            "topic": "164#binary",
            "x": 390,
            "y": 900,
            "wires": [
                [
                    "688830f.c57775"
                ]
            ]
        },
        {
            "id": "cd0ae070.e98378",
            "type": "amazon-echo-device",
            "z": "8659fc6b.981b4",
            "name": "lounge 1",
            "topic": "8#dimming",
            "x": 390,
            "y": 940,
            "wires": [
                [
                    "688830f.c57775"
                ]
            ]
        },
        {
            "id": "688830f.c57775",
            "type": "function",
            "z": "8659fc6b.981b4",
            "name": "",
            "func": "let types = {\n    \"dimming\":[\"urn:upnp-org:serviceId:Dimming1\",\"SetLoadLevelTarget\",\"newLoadlevelTarget\"],\n    \"binary\":[\"urn:upnp-org:serviceId:SwitchPower1\",\"SetTarget\",\"newTargetValue\"],\n    \"scene\":[\"urn:micasaverde-com:serviceId:HomeAutomationGateway1\",\"RunScene\",\"SceneNum\"],\n    \"colour\":[\"urn:micasaverde-com:serviceId:Color1\",{\"tt\":\"SetColor\",\"hs\":\"SetColorRGB\",\"ct\":\"SetColorTemp\"},{\"tt\":\"newColorTarget\",\"hs\":\"newColorRGBTarget\",\"ct\":\"newColorTempTarget\"}] \t\n}\nfunction binaryPayload(device, type, turnOn, payload) {\n    payload.id = \"action\";\n    payload.serviceId = type[0];\n    payload.DeviceNum = device;\n    payload.action = type[1];\n    payload[type[2]] = (turnOn === true ? 1 : 0);\n    payload.message = payload[type[2]];\nreturn payload;\n}\n\nfunction dimmingPayload(device, type, level, payload) {\n    payload.id = \"action\";\n    payload.serviceId = type[0];\n    payload.DeviceNum = device;\n    payload.action = type[1];\n    payload[type[2]] = level;\n    payload.message = level;\nreturn payload;\n}\nfunction scenePayload(device, type, turnOn, payload) {\n    payload.id = \"action\";\n    payload.serviceId = type[0];\n    payload.action = type[1];\n    payload[type[2]] = (turnOn === true ? device[0] : (device[2] || device[0]));\n    payload.message =\"Run Scene \" + payload[type[2]];\nreturn payload;\n}\n\nfunction rgbPayload(device, types, msg, payload) { \n    if(msg.on === true && msg.meta.changes.on === false && msg.meta[\"input\"].on === true){\n        payload =  binaryPayload(device[0], types[\"binary\"], msg.on, {});\n    }else if (msg.meta.changes.percentage && msg.on === true){\n        payload = dimmingPayload(device[0], types[\"dimming\"], msg.percentage, {});\n    }else if (msg.on === true && msg.colormode === \"hs\"){\n        payload.id = \"action\";\n        payload.serviceId = types[\"colour\"][0];\n        payload.DeviceNum = device[0];\n        payload.action = types[\"colour\"][1][\"hs\"];\n        payload[types[\"colour\"][2][\"hs\"]] =  msg.rgb.join(\",\");\n        payload.message = msg.rgb.join(\",\");\n    }else if (msg.on === true && msg.colormode === \"ct\"){\n        let diff = msg.ct - (Number(device[2]) || 310);\n        msg.ct = (diff < 0) ? \"D\" + Math.min(Math.abs(diff * 1.7),255).toFixed() : \"W\" + Math.abs(Math.min((diff * 1.7),255) - 255).toFixed();\n        payload.id = \"action\";\n        payload.serviceId = types[\"colour\"][0];\n        payload.DeviceNum = device[0];\n        payload.action = types[\"colour\"][1][\"ct\"];\n        payload[types[\"colour\"][2][\"ct\"]] = msg.ct;\n        payload.message = msg.ct;\n    }\nreturn payload;\n}\n\nmsg.topic = msg.topic.split(\"#\").map(Function.prototype.call, String.prototype.trim);\nmsg.hold = msg.payload;\nmsg.payload = {};\nlet type = msg.topic[1] || \"binary\";\nif(msg.topic[1] === \"scene\"){\n    msg.payload = scenePayload(msg.topic, types[\"scene\"], msg.on, {});\n}else if (msg.topic[1] === \"binary\" || msg.percentage === 0 || msg.on === false){\n    msg.payload =  binaryPayload(msg.topic[0], types[\"binary\"], msg.on, {});\n}else if(msg.topic[1] ===\"dimming\"){\n    msg.payload = dimmingPayload(msg.topic[0], types[\"dimming\"], msg.percentage, {});\n}else if (msg.topic[1] === \"colour\"){\n    msg.payload = rgbPayload(msg.topic, types, msg, {});\n}\nlet  error = [\"green\", msg.topic[1] + \" | \" + msg.topic[0], msg.payload.message];\ndelete msg.payload.message;\nif (Object.keys(msg.payload).length < 1){\n    error[0] =\"red\";\n    error[2] =\"failed to create payload\";\n}\nnode.status({\"fill\": error[0],\"shape\":\"ring\",\"text\": error[1] + \" | \" + error[2]});\n\nreturn msg;\n",
            "outputs": 1,
            "noerr": 0,
            "initialize": "",
            "finalize": "",
            "x": 590,
            "y": 940,
            "wires": [
                [
                    "680d28ae.8a163"
                ]
            ]
        },
        {
            "id": "680d28ae.8a163",
            "type": "http request",
            "z": "8659fc6b.981b4",
            "name": "Get request",
            "method": "GET",
            "ret": "txt",
            "paytoqs": "query",
            "url": "http://192.168.1.11:3480/data_request",
            "tls": "",
            "persist": false,
            "proxy": "",
            "authType": "",
            "x": 760,
            "y": 1000,
            "wires": [
                [
                    "cb471442.5d60c8"
                ]
            ]
        }
    ]
    
    Code/Snippet library

  • Expression to randomly run Global Reactions ?
    ElcidE Elcid

    @cw-kid said in Expression to randomly run Global Reactions ?:

    Ideally I'd like for a different colour each time to be selected, but I guess the expression for the random numbers could select the same number again and therefore the colour would not change for that cycle.

    I use this to generate a random number that has not been used last time. In the reaction use express variable randomVal, once the reaction is over set randomVal to
    ${{int(split(join(split("1234567", randomVal || 0),""),"")[floor(random()*6)])}}
    Then every time you get a different number.

    Multi-System Reactor

  • Expression to randomly run Global Reactions ?
    ElcidE Elcid

    @cw-kid This is probably more efficient

    ${{int(substr(replace("1234567", randomVal || 0,""),floor(random()*6),1))}}
    

    Then I looked at moving this to MSR as I have it in Reactor, . I found the remove function and this is now easily expanded to larger number and you can easily set a range

    ${{remove( 1..7, randomVal - 1)[floor(random()*6)]}}
    

    @toggledbits , possible bug
    list(1..7]) gives [[1,2,3,4,5,6,7]] a nested array.
    Is that expected.

    Multi-System Reactor

  • Vera account suspended for a 1000 years
    ElcidE Elcid

    Stange, That post is still up. If that was the cause i would have thought it would have been removed to. If they keep up this tyrannical behaviour the forum will die a death of a thousand cuts.

    Vera

  • Video Doorbells
    ElcidE Elcid

    @sender
    Be careful with the placement as these sensors can see through doors and thin walls, You can block the sensor with thin metal to stop false trips.
    I mounted my sensor in meter cupboard and place a section of angle iron at bottom to stop trips from cats etc. The white box at bottom contains the sensor and Shelly
    20200430_095307.jpg

    IPCam

  • Interfacing Alexa with Reactor via Routines and Dimmer VS
    ElcidE Elcid

    I use an expression set to 0, I update the variable using node-red local alexa(similar to HA Bridge) In reactor I have several RS's that monitor this expression variable for different values, if the reaction is triggered one of the actions will be to set the variable back to 0. You must have no actions in the false reaction, as when expression is reset to 0 the true action will stop as reactor would want to run the false actions. So far no issues. i have 4 RS's monitoring this variable for different values, but it is unlimited.

    Home Assistant

  • Why is this Green and ticked when its not true ? And how to do OR
    ElcidE Elcid

    Yes will fire/go true, if one or more windows,

    You can also add time condition, say you wanted to wait 60 seconds just in case some one just opened window for a few seconds.
    click 3 dots for other options on trigger/condition

    Multi-System Reactor

  • Vera Alexa Plugin 7.32
    ElcidE Elcid

    @librasun Have you tried to install JQuery on the vera, it's is now available with 7.32

    Vera

  • Video Doorbells
    ElcidE Elcid

    I use a
    https://www.ebay.co.uk/itm/AC-110-220V-Microwave-Radar-Sensor-Switch-Body-Motion-Detector-for-LED-Light/274176461640?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649
    connected to a Shelly 1, which is integrated with @therealdb Virtul HTTP Switch as a sensor.

    IPCam
  • Login

  • Don't have an account? Register

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