Arm / by-pass message not broadcast-ed to MySensor module
-
I was busy creating a security type of sensor which i needed to set in the arm and by-pass mode.
However Vera showed the correct status (arm/by-pass) the sensor was not aware that it was by-passed.Looking trough the Vera: I_Arduino.lua code i did figure out the setArmed on caused a local variable update.
Bij adding a sendCommand function call my mysensor gets an update on setArmed. This is the new code (MySensors version 1.4.1):
-- Security commands function setArmed(device, newArmedValue) -- Line added by BartE sendCommand(luup.devices[device].id,"ARMED",newArmedValue) -- Add ends setVariableIfChanged(tVarTypes.ARMED[2], tVarTypes.ARMED[3], newArmedValue, device) end
In a sketch running on an Arduino one can handle the setArmed like this
void incomingMessage(const MyMessage &message) { if (message.type==V_ARMED) { bArmed = message.getBool(); // Do something wise with the global bArmed boolean } }
-
You might very well be the first one using the ARMED command.
See my previous comment about creating a pull request for this change so others can use it as well.
-
Nice
I did make both pull requests
-
Both merged! Thanks.
1 out of 4
Suggested Topics
-
OpenLoop Noob, need to know if what I want to do is possible
Vera • 14 Apr 2020, 17:30 • tamorgen 2 Jan 2021, 14:14 -
Vera and Moteino USB as Gateway
Vera • 23 Mar 2017, 17:06 • kincaidj001 30 Nov 2021, 16:00 -
Vera Plus plugin issues (and choosing the right controller in general)
Vera • 6 Jun 2021, 10:16 • Max Kurilov 6 Jun 2021, 16:55 -
MySensors node not working with Alexa on my Vera
Vera • 28 Apr 2024, 01:21 • dbemowsk 28 Apr 2024, 01:21 -
Library Compatabilty under Vera UI7
Vera • 23 Feb 2020, 23:34 • mntlvr 18 Mar 2020, 17:07