Pictures are nice but with all the "fine" details in nodes I find the actual code better.
Thanks for helping along the way.
Pictures are nice but with all the "fine" details in nodes I find the actual code better.
Thanks for helping along the way.
I generate my alerts over Sonos and have been using this Node.
I have pushover and alexa working in node red for other functions, so no help is needed there. But might need help integrating to speak/notify which sensor was triggered.
I have a mouse or chipmunk in my shed attached to my garage that likes to run around at 2 or 3am
so I listen to whether its just the motion or contact and motion. If its just the motion I can ignore it.
And if the rodent get too active I ask alexa to turn on the work outside switch from this flow to silence the notifications.
Ah okay sorry - just use the "Alexa Routine" node and set it to "Speak"..
I agree although a quick glance at your sequence definitely shows the overall structure/logic which is nice and could be helpful to some people. You can also get creative with Node names to be even more clear... but that is wayyy to close to actually documenting things...
and NOBODY wants that! 
I run all this through a development NR before I deploy.
I had imported some other users flows with HE nodes and it really messed with working flows. 
Yeah it creates bogus HE configs - you have to go into the config editor and remove.
So here's my final working version with help from @aaiyar & @erktrek.
Comments, suggestions, improvements welcome.
[{"id":"0258e697074ba84e","type":"tab","label":"Intrusion Test","disabled":false,"info":"","env":[]},{"id":"799a401b17e58b93","type":"hubitat device","z":"0258e697074ba84e","deviceLabel":"Work Outside","name":"","server":"de459b47a8a34d86","deviceId":"2122","attribute":"switch","sendEvent":false,"x":720,"y":180,"wires":[["63db66ed99e5ab7a"]]},{"id":"d4c35c5c19ea7218","type":"hubitat device","z":"0258e697074ba84e","deviceLabel":"Back Door","name":"","server":"de459b47a8a34d86","deviceId":"454","attribute":"contact","sendEvent":false,"x":710,"y":60,"wires":[["c23cd0c5c4d6eb91"]]},{"id":"6b3595f5b4edbad8","type":"hubitat device","z":"0258e697074ba84e","deviceLabel":"Basement Door","name":"","server":"de459b47a8a34d86","deviceId":"1257","attribute":"contact","sendEvent":false,"x":720,"y":120,"wires":[["38a7d0e6798ba0cb"]]},{"id":"63db66ed99e5ab7a","type":"switch","z":"0258e697074ba84e","name":"on/off","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":890,"y":180,"wires":[[],["4a8efa246035ddfa"]]},{"id":"c23cd0c5c4d6eb91","type":"switch","z":"0258e697074ba84e","name":"open/closed","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"open","vt":"str"},{"t":"eq","v":"closed","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":910,"y":60,"wires":[[],["6b3595f5b4edbad8"]]},{"id":"38a7d0e6798ba0cb","type":"switch","z":"0258e697074ba84e","name":"open/closed","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"open","vt":"str"},{"t":"eq","v":"closed","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":910,"y":120,"wires":[[],["799a401b17e58b93"]]},{"id":"79ddba60da6e7785","type":"switch","z":"0258e697074ba84e","name":"Only Active/Open Events","property":"payload.value","propertyType":"msg","rules":[{"t":"regex","v":"open|\\bactive\\b","vt":"str","case":false}],"checkall":"true","repair":false,"outputs":1,"x":470,"y":120,"wires":[["d4c35c5c19ea7218"]]},{"id":"4a8efa246035ddfa","type":"change","z":"0258e697074ba84e","name":"Open Gate Cmd","rules":[{"t":"set","p":"payload","pt":"msg","to":"open","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":240,"wires":[["43be4718f599d3c1"]]},{"id":"7292f76a5a65de3a","type":"change","z":"0258e697074ba84e","name":"Close Gate Cmd","rules":[{"t":"set","p":"payload","pt":"msg","to":"close","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":300,"wires":[["43be4718f599d3c1"]]},{"id":"43be4718f599d3c1","type":"gate","z":"0258e697074ba84e","name":"","controlTopic":"control","defaultState":"closed","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","persist":true,"x":630,"y":300,"wires":[["541e62c870dcf6dc"]]},{"id":"d8e2dbca1eac71d9","type":"delay","z":"0258e697074ba84e","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":440,"y":180,"wires":[["43be4718f599d3c1","92fa17bca7f03419"]]},{"id":"92fa17bca7f03419","type":"delay","z":"0258e697074ba84e","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":440,"y":240,"wires":[["7292f76a5a65de3a"]]},{"id":"d246c56eebd17d99","type":"inject","z":"0258e697074ba84e","name":"Motion Garage Active","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"name\":\"motion\",\"value\":\"active\",\"displayName\":\"Motion Garage\",\"deviceId\":\"855\",\"descriptionText\":\"Motion Garage is active\",\"unit\":null,\"type\":null,\"data\":null,\"currentValue\":\"active\",\"dataType\":\"ENUM\",\"values\":[\"inactive\",\"active\"]}","payloadType":"json","x":140,"y":60,"wires":[["79ddba60da6e7785","d8e2dbca1eac71d9"]]},{"id":"b2b88b2df9c781de","type":"alexa-remote-routine","z":"0258e697074ba84e","name":"","account":"9eab6fc08db6f334","routineNode":{"type":"speak","payload":{"type":"regular","text":{"type":"msg","value":"payload"},"devices":["abf53d7765f04fe6bdf3e159e2841cda"]}},"x":1140,"y":300,"wires":[[]]},{"id":"be1fd083e96cca9b","type":"template","z":"0258e697074ba84e","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Alert Intrusion {{payload}}","output":"str","x":960,"y":300,"wires":[["b2b88b2df9c781de","67cfcbc6a650eadc"]]},{"id":"3149d8212492fdd9","type":"inject","z":"0258e697074ba84e","name":"Garage Shed Door open","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"name\":\"contact\",\"value\":\"open\",\"displayName\":\"Garage Shed Door\",\"deviceId\":\"454\",\"descriptionText\":\"Garage Shed was opened\",\"unit\":null,\"type\":null,\"data\":null,\"currentValue\":\"open\",\"dataType\":\"ENUM\",\"values\":[\"closed\",\"open\"]}","payloadType":"json","x":150,"y":180,"wires":[["79ddba60da6e7785","d8e2dbca1eac71d9"]]},{"id":"b4ddd4c8963440b0","type":"inject","z":"0258e697074ba84e","name":"Back Shed Door open","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"name\":\"contact\",\"value\":\"open\",\"displayName\":\"Back Shed Door\",\"deviceId\":\"454\",\"descriptionText\":\"Back Shed Door was opened\",\"unit\":null,\"type\":null,\"data\":null,\"currentValue\":\"open\",\"dataType\":\"ENUM\",\"values\":[\"closed\",\"open\"]}","payloadType":"json","x":140,"y":220,"wires":[["79ddba60da6e7785","d8e2dbca1eac71d9"]]},{"id":"13a46806fea6829e","type":"inject","z":"0258e697074ba84e","name":"Motion Garage Shed active","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"name\":\"motion\",\"value\":\"active\",\"displayName\":\"Motion Garage Shed\",\"deviceId\":\"855\",\"descriptionText\":\"Motion Garage Shed is active\",\"unit\":null,\"type\":null,\"data\":null,\"currentValue\":\"active\",\"dataType\":\"ENUM\",\"values\":[\"inactive\",\"active\"]}","payloadType":"json","x":150,"y":100,"wires":[["79ddba60da6e7785","d8e2dbca1eac71d9"]]},{"id":"36c788acbd6c2f33","type":"inject","z":"0258e697074ba84e","name":"Motion Back Shed active","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"name\":\"motion\",\"value\":\"active\",\"displayName\":\"Motion Back Shed\",\"deviceId\":\"855\",\"descriptionText\":\"Motion Back Shed is active\",\"unit\":null,\"type\":null,\"data\":null,\"currentValue\":\"active\",\"dataType\":\"ENUM\",\"values\":[\"inactive\",\"active\"]}","payloadType":"json","x":150,"y":140,"wires":[["79ddba60da6e7785","d8e2dbca1eac71d9"]]},{"id":"0d9698367f04b60d","type":"inject","z":"0258e697074ba84e","name":"Garage Door Left open","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"name\":\"contact\",\"value\":\"open\",\"displayName\":\"Garage Door Left\",\"deviceId\":\"1451\",\"descriptionText\":null,\"unit\":null,\"type\":null,\"data\":null,\"currentValue\":\"open\",\"dataType\":\"ENUM\",\"values\":[\"closed\",\"open\"]}","payloadType":"json","x":140,"y":260,"wires":[["79ddba60da6e7785","d8e2dbca1eac71d9"]]},{"id":"f8dcac7140ea28fb","type":"inject","z":"0258e697074ba84e","name":"Garage Door Right open","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"name\":\"contact\",\"value\":\"open\",\"displayName\":\"Garage Door Right\",\"deviceId\":\"1451\",\"descriptionText\":null,\"unit\":null,\"type\":null,\"data\":null,\"currentValue\":\"open\",\"dataType\":\"ENUM\",\"values\":[\"closed\",\"open\"]}","payloadType":"json","x":150,"y":300,"wires":[["d8e2dbca1eac71d9","79ddba60da6e7785"]]},{"id":"67cfcbc6a650eadc","type":"pushover","z":"0258e697074ba84e","name":"","device":"Mick_LG_G8","title":"","priority":0,"sound":"","url":"","url_title":"","html":false,"x":1120,"y":260,"wires":[]},{"id":"541e62c870dcf6dc","type":"change","z":"0258e697074ba84e","name":"Device to Payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.displayName","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":300,"wires":[["be1fd083e96cca9b"]]},{"id":"de459b47a8a34d86","type":"hubitat config","name":"Hubitat","usetls":false,"host":"0.0.0.0","port":"80","appId":"2798","nodeRedServer":"http://0.0.0.0:1880","webhookPath":"/hubitat/webhook","autoRefresh":true,"useWebsocket":false,"colorEnabled":false,"color":"#ace043"},{"id":"9eab6fc08db6f334","type":"alexa-remote-account","name":"Amazon Acct","authMethod":"proxy","proxyOwnIp":"0.0.0.0","proxyPort":"3456","cookieFile":"/mnt/dietpi_userdata/node-red/applestrudel.txt","refreshInterval":"3","alexaServiceHost":"pitangui.amazon.com","amazonPage":"amazon.com","acceptLanguage":"en-US","onKeywordInLanguage":"on","userAgent":"","useWsMqtt":"on","autoInit":"on"}]
@kuzenkohome good job on this flow. I used something like this but no where closed to what you did, just want to thank you for sharing. What is the node that your are using for the "gate"?
Simple Gate.
Thank you for the info.
Your welcome this is really my first "real" contribution to the HE community. It wouldn't have been possible without the help of many of the other members here.
I usually just lurk and absorb knowledge.
I curious - why do you use the simple gate node in your sequence?
It allows the original device message (if the gate is open, and so I know which sensor was tripped) to get to Alexa and pushover for notifications.
rather than use the gate, you might try just sticking the device in a flow variable and then recalling it when you send it to pushover.
@kuzenkohome - this is one way to do it. Or directly use "msg.topic" while constructing your Pushover message. It will contain the name of the originating device.
i think msg.topic would have the name of the last device in the chain (doesn't msg.topic default to the device name?). either way, you could certainly use a msg.variable rather than a flow.variable.
Yes, that is correct. So it would have to be assigned to a variable as you suggested.
Alternatively (my preference) to put all device states into flow variables, and then just use switch nodes in place of a device node and a switch node. In this scenario, the original msg.topic would be retained.
interesting. why do you do this? Is there a performance benefit, or is it just to make your flows more streamlined?
I suppose you just have a list of all devices used in the flow over to the side somewhere updating their variables?
I feel like I would inevitably end up with typos that would drive me nuts!
I use device state multiple times - so it makes sense to save the desired state as a variable, and just use the variable. For devices that I use across flows, I save them as global variables. And yes, it will makes sequences slightly more streamlined.
I feel like I would inevitably end up with typos that would drive me nuts!
Copy/paste from the context data list .....