Node-Red Flow Samples/Sharing

Basically I have a function node that sets IP Address and Hub Name that I then use in http request nodes. I have one for each of my 5 hubs and this is utilized on several flows thus repeating the same information vs ideally having a global variable with a Map/Object that I can set once and reference.

Pardon my noob question as I am really not using NR that much, how do you accomplish this?

Again noob question but how to you setup a flow that does this on startup?

Thanks in advance!

1 Like

Global variables are ideal for what you wish to do. And if you store them on disk, you can recover them easily after restarting NR (or any other time).

The node-red documentation has a section called "Working with Context", linked to by @cjkeenan above. Here's the relevant bit - you'll have to edit settings.js and restart start NR to make the change permanent.

2 Likes

On the "Inject" node, check "Inject once after XX" like this and it will trigger the flow after Node-RED restarts.

EDIT:
Here is an example of setting URLs that I use for my Tesla Powerwall. In this case, all my related flows are on the same flow-editor page, so I use flow variables vs global.

[{"id":"eeb7f918.374db8","type":"group","z":"2b6c3ed9.22a7ea","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["c4581dd4e58dcbe2","4e72725.41b548c","bd511a64.3209b"],"x":32.666595458984375,"y":21,"w":503.6667175292969,"h":135.99999618530273},{"id":"c4581dd4e58dcbe2","type":"comment","z":"2b6c3ed9.22a7ea","g":"eeb7f918.374db8","name":"Set Flow Variables","info":"","x":148.66659545898438,"y":62,"wires":[]},{"id":"4e72725.41b548c","type":"inject","z":"2b6c3ed9.22a7ea","g":"eeb7f918.374db8","name":"Initialize Flow Variables","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":"0.2","topic":"","payload":"","payloadType":"date","x":189.33331298828125,"y":115.99999618530273,"wires":[["bd511a64.3209b"]]},{"id":"bd511a64.3209b","type":"change","z":"2b6c3ed9.22a7ea","g":"eeb7f918.374db8","name":"Set Flow Variables","rules":[{"t":"set","p":"socURL","pt":"flow","to":"192.168.1.123/api/system_status/soe","tot":"str"},{"t":"set","p":"aggregatesURL","pt":"flow","to":"192.168.1.123/api/meters/aggregates","tot":"str"},{"t":"set","p":"loginURL","pt":"flow","to":"192.168.1.123/api/login/Basic","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420.33331298828125,"y":115.66665267944336,"wires":[[]]}]
3 Likes

So I like watching the whole SpaceX Starship thing down in Boca Chica, TX. Periodically (far too often) watch the 24/7 youtube livestreams from Lab Padre & NasaSpaceFlight Now!

Trouble is the ongoing activity is mostly boring punctuated with bouts of excitement here and there. Instead of having youtube up and running constantly I decided to create this simple subflow that parses the video page and extracts the number of people watching.

I set a threshold value that sets a property when it's exceeded. I then send myself an email when triggered or when it falls below. The idea is more people watching means a higher probability that something is going on.

Here is a basic example:

YouTube - "Watching Now" Count Subflow

[{"id":"bb498e1f93af0410","type":"subflow","name":"YT Watching Now","info":"","category":"","in":[{"x":50,"y":30,"wires":[{"id":"6c862a9df27e9568"}]}],"out":[{"x":1240,"y":300,"wires":[{"id":"0fc72446cbd9f29c","port":0},{"id":"3bcfae689e861aed","port":1}]}],"env":[{"name":"TITLE","type":"str","value":"YouTube Video Title"},{"name":"YT_VIDEO","type":"str","value":"mhJRzQsLZGg"},{"name":"THRESHOLD","type":"num","value":"1200"},{"name":"FILTER_OUTPUT","type":"bool","value":"true"}],"meta":{},"color":"#DDAA99","status":{"x":820,"y":300,"wires":[{"id":"a28cd78c8940c521","port":1},{"id":"875c4bbb68746856","port":1}]}},{"id":"875c4bbb68746856","type":"function","z":"bb498e1f93af0410","name":"Set return message based on current watchers","func":"//msg.payload = parseInt(msg.payload);\nvar currentWatchers = parseInt(msg.payload);\nvar threshold = env.get(\"THRESHOLD\");\nvar title = env.get(\"TITLE\");\nmsg.payload = currentWatchers;\n\nvar status = {};\n\nvar retMsg = {\n    \"topic\": title\n    ,\"result\": {\n        \"title\": title\n        ,\"watching\": currentWatchers\n        ,\"lastChecked\": Date.now().toString()\n        ,\"url\": \"https://www.youtube.com/watch?v=\" + env.get(\"YT_VIDEO\")\n    }\n}\n\nif (currentWatchers < threshold ) {\n    retMsg.result.status = \"Stand Down\";\n    retMsg.payload = \"Stand Down\";\n    retMsg.result.thresholdExceeded = false;\n    status.payload = {fill:\"blue\",shape:\"dot\",text: \"watching: \" + currentWatchers.toString()};\n} else {\n    retMsg.result.status = \"Go Time\";\n    retMsg.payload = \"Go Time\";\n    retMsg.result.thresholdExceeded = true;\n    status.payload = {fill:\"green\",shape:\"dot\",text: \"watching: \" + currentWatchers.toString()};\n}\n\nreturn [retMsg,status];","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":540,"y":160,"wires":[["3bcfae689e861aed"],[]]},{"id":"a28cd78c8940c521","type":"exec","z":"bb498e1f93af0410","command":"","addpay":"payload","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":170,"y":160,"wires":[["875c4bbb68746856"],[],[]]},{"id":"d930ec2b502229ff","type":"template","z":"bb498e1f93af0410","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"curl -s https://www.youtube.com/watch?v={{payload}}  | egrep -o '\\{\\\"text\\\":\\\"[0-9]+\\\"\\},\\{\\\"text\\\":\\\" watching now\\\"\\}' | uniq | egrep -o '[0-9]+'\n\n","output":"str","x":420,"y":80,"wires":[["a28cd78c8940c521"]]},{"id":"6c862a9df27e9568","type":"change","z":"bb498e1f93af0410","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"YT_VIDEO","tot":"env"},{"t":"set","p":"topic","pt":"msg","to":"TITLE","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":80,"wires":[["d930ec2b502229ff"]]},{"id":"0fc72446cbd9f29c","type":"rbe","z":"bb498e1f93af0410","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":1130,"y":160,"wires":[[]]},{"id":"3bcfae689e861aed","type":"switch","z":"bb498e1f93af0410","name":"Filter Results?","property":"FILTER_OUTPUT","propertyType":"env","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":880,"y":160,"wires":[["0fc72446cbd9f29c"],[]]},{"id":"3380589835de6dc8","type":"subflow:bb498e1f93af0410","z":"b38ec3180db9ae33","name":"NSF - Starbase LIVE","env":[{"name":"TITLE","value":"NSF - Starbase LIVE","type":"str"},{"name":"ALERT_ON_VIEWS","value":"3000","type":"num"}],"x":620,"y":1420,"wires":[["eae0098a839ead94"]]},{"id":"3787abc870511012","type":"change","z":"b38ec3180db9ae33","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"\"Might want to check out \" & result.title & \"!\"","tot":"jsonata"},{"t":"set","p":"payload","pt":"msg","to":"\"With \" & result.watching \t& \" people watching something seems to be up.\"\t& \"\\n\"\t& \"\\n\"\t& \"check out: \\n\" & result.url\t\t\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1100,"y":1380,"wires":[["9d77587398b17aef"]]},{"id":"f119c6cadd41f2ba","type":"change","z":"b38ec3180db9ae33","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"result.title & \" is now calm with only \" & result.watching & \" people watching.\"","tot":"jsonata"},{"t":"set","p":"payload","pt":"msg","to":"\"Nothing going on just yet. Check back later.\"\t& \"\\n\"\t& \"\\n\"\t& result.url\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1100,"y":1460,"wires":[["d82e6da02db85487"]]},{"id":"d82e6da02db85487","type":"debug","z":"b38ec3180db9ae33","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1270,"y":1460,"wires":[]},{"id":"9d77587398b17aef","type":"debug","z":"b38ec3180db9ae33","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1270,"y":1380,"wires":[]},{"id":"eae0098a839ead94","type":"switch","z":"b38ec3180db9ae33","name":"thresholdExceeded true?","property":"result.thresholdExceeded","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":870,"y":1420,"wires":[["3787abc870511012"],["f119c6cadd41f2ba"]]},{"id":"809081c3c00e7e5b","type":"inject","z":"b38ec3180db9ae33","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":420,"y":1420,"wires":[["3380589835de6dc8"]]}]

Notes:

  • This uses the "Exec" node with curl.. had difficulty trying to get this to work with the HTTP nodes.

  • Will probably lose the threshold value as the checking can be done outside the subflow via the raw watcher count. Will possibly add some kind of averaging/ smoothing option.. but that might not be necessary if you keep the checking interval on the longish side - 10 minutes or more.

  • This can be used for any youtube video not just Starship

  • For more rocket fun checkout @JustinL's "Lift Off" HE device driver... very cool.
    [RELEASE] Lift Off --> Space-X Launch Schedule Integration

3 Likes

Quick update to the above subflow... it did not handle commas in the reported numbers. Decided to leave the threshold check in for now.

Here is the latest (this node instance example points to NSF Live):

YouTube - Watching Now 1.1.0

[{"id":"bb498e1f93af0410","type":"subflow","name":"YT Watching Now","info":"","category":"","in":[{"x":50,"y":30,"wires":[{"id":"6c862a9df27e9568"}]}],"out":[{"x":1240,"y":300,"wires":[{"id":"0fc72446cbd9f29c","port":0},{"id":"3bcfae689e861aed","port":1}]}],"env":[{"name":"TITLE","type":"str","value":"YouTube Video Title"},{"name":"YT_VIDEO","type":"str","value":"mhJRzQsLZGg"},{"name":"THRESHOLD","type":"num","value":"1200"},{"name":"FILTER_OUTPUT","type":"bool","value":"true"}],"meta":{"version":"1.1.0","desc":"Scrape \"watching now\" value from YouTube streams"},"color":"#DDAA99","status":{"x":820,"y":300,"wires":[{"id":"875c4bbb68746856","port":1},{"id":"6886ed8ff0326333","port":0}]}},{"id":"875c4bbb68746856","type":"function","z":"bb498e1f93af0410","name":"Set return message based on current watchers","func":"//msg.payload = parseInt(msg.payload);\nvar currentWatchers = parseInt(msg.payload);\n//var currentWatchers = 5000;\nvar threshold = env.get(\"THRESHOLD\");\nvar title = env.get(\"TITLE\");\nmsg.payload = currentWatchers;\n\nvar status = {};\nvar retMsg = {\n    \"topic\": title\n    ,\"result\": {\n        \"title\": title\n        ,\"watching\": currentWatchers\n        ,\"lastChecked\": Date.now().toString()\n        ,\"url\": \"https://www.youtube.com/watch?v=\" + env.get(\"YT_VIDEO\")\n    }\n}\n\nif (!isNaN(currentWatchers)) {\n    if (currentWatchers < threshold ) {\n        retMsg.result.status = \"Stand Down\";\n        retMsg.payload = \"Stand Down\";\n        retMsg.result.thresholdExceeded = false;\n        status.payload = {fill:\"blue\",shape:\"dot\",text: \"watching: \" + currentWatchers.toString()};\n    } else {\n        retMsg.result.status = \"Go Time\";\n        retMsg.payload = \"Go Time\";\n        retMsg.result.thresholdExceeded = true;\n        status.payload = {fill:\"green\",shape:\"dot\",text: \"watching: \" + currentWatchers.toString()};\n    }\n    node.send([retMsg,status]);\n}\n\nreturn;","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":540,"y":160,"wires":[["3bcfae689e861aed"],[]]},{"id":"a28cd78c8940c521","type":"exec","z":"bb498e1f93af0410","command":"","addpay":"payload","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":170,"y":160,"wires":[["875c4bbb68746856"],[],["5f69170f12ca817e"]]},{"id":"d930ec2b502229ff","type":"template","z":"bb498e1f93af0410","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"curl -s https://www.youtube.com/watch?v={{payload}} | egrep -o '\\{\\\"text\\\":\\\"[0-9][0-9,]+\\\"\\},\\{\\\"text\\\":\\\" watching now\\\"\\}' | uniq | egrep -o '[0-9][0-9,]+'  | sed 's/[,]//'\n\n","output":"str","x":420,"y":80,"wires":[["a28cd78c8940c521"]]},{"id":"6c862a9df27e9568","type":"change","z":"bb498e1f93af0410","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"YT_VIDEO","tot":"env"},{"t":"set","p":"topic","pt":"msg","to":"TITLE","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":80,"wires":[["d930ec2b502229ff"]]},{"id":"0fc72446cbd9f29c","type":"rbe","z":"bb498e1f93af0410","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":1130,"y":160,"wires":[[]]},{"id":"3bcfae689e861aed","type":"switch","z":"bb498e1f93af0410","name":"Filter Results?","property":"FILTER_OUTPUT","propertyType":"env","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":880,"y":160,"wires":[["0fc72446cbd9f29c"],[]]},{"id":"6886ed8ff0326333","type":"change","z":"bb498e1f93af0410","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\t   \"fill\":\"red\",\t   \"shape\":\"dot\",\t   \"text\": ( payload.code = 1 ? \"Stream Unavailable\" : \"Unknown Error\" )\t}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":300,"wires":[[]]},{"id":"5f69170f12ca817e","type":"switch","z":"bb498e1f93af0410","name":"","property":"payload.code","propertyType":"msg","rules":[{"t":"neq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":410,"y":300,"wires":[["6886ed8ff0326333"]]},{"id":"52596f85517d818f","type":"subflow:bb498e1f93af0410","z":"b38ec3180db9ae33","name":"NSF - Starbase LIVE","env":[{"name":"TITLE","value":"NSF - Starbase LIVE","type":"str"},{"name":"THRESHOLD","value":"3000","type":"num"},{"name":"ALERT_ON_VIEWS","value":"3000","type":"num"}],"x":500,"y":680,"wires":[["bd4e12c456eb339e"]]}]

3 Likes

Self moderating from this thread - [BETA] Tesla Vehicle via TeslaMate MQTT

If you guys are going to this level of effort just to get a Tesla into Hubitat (not to mention additional hardware), I would highly recommend just biting the bullet and transitioning into node-red automation. It really opens up a bunch of new possibilities.

Things like:

  • Checking to see if the car is locked and locking it if it's not at bedtime (it also yells at me if it's not plugged in, but you can do that without node-red).
  • Tying it to Google calendar to preconditioning it before I go somewhere (super awesome in Chicago winters).
  • For unscheduled trips - I can just ask Google Home to warm up the car without pulling out my phone.

Just saying! I love tempting people down the same rabbit holes I've been sucked into. :grinning:

GottaMakeItDifferentGottaMakeItDifferentGottaMakeItDifferentGottaMakeItDifferentGottaMakeItDifferentGottaMakeItDifferentGottaMakeItDifferentGottaMakeItDifferentGottaMakeItDifferentGottaMakeItDifferent

2 Likes

I agree with this..

When using community apps and drivers the thing you have to be careful with HE is resource overhead. Going to a separate rules controller like NR helps reduce memory consumption etc. Also since you have more control over the NR environment you can add storage / memory as necessary.

For my home system I am now running HomeAssistant with the NR addon as a new companion server. Both HA and NR offer some nice capabilities while HE handles all the Zigbee/Z-Wave/Lutron devices and some cool additional system services like Alexa.

1 Like

:exploding_head: Me too. I think there needs to be a beginner edition. Call it Node-Green.

I haven't see this posted anywhere before... Alexa voice commands for lighting with dynamic timers. For example, "Alexa, turn on the living room lights for 20 minutes." Or, "Alexa, turn off the lights for 45 seconds." Or even, "Alexa, disable office motion for 1 hour."

So, after creating some lighting flows with my motion sensors, I realized they often turned the lights off more quickly than I wanted, or kept them on longer than I wanted. Somewhere I found a flow that allowed me to disable the motion sensors whenever I gave a voice command to turn on the lights, but that still didn't really cut it for a variety of reasons. I got the idea of dynamic timers using Alexa voice commands and after a bunch of searching around I came across @stephen_nutt's post here at #116 (thank you kind sir!) After tinkering with his flows I came up with this...

There are essentially two different methods at play here. One is using "on" and "off" hubitat command nodes for my light groups. The other is on the other side of the link-out nodes where I use @yadomi/node-red-contrib-philipshue-events to take care of my lighting. Here is an example...

The reason for two methods is because I was originally using Hue Magic to control everything, but as luck would have it, it stopped working. So, I've been slowly converting everything over to method two as I have time. Frankly, once you figure it out, the philipshue-events method is way better than Hue Magic.

I've only been at this home automation thing for a few weeks, and I whipped this first flow out in the last three or four hours, so I'm sure it could use some work. I wanted to get it out though because I thought people might be interested in this particular application of using Alexa to turn on light groups with dynamic timers.

Besides the contrib mentioned above, these flows use node-red-contrib-stoptimer-varidelay, node-red-contrib-ecolect, node-red-contrib-alexa-remote2-applestrudel, and node-red-contrib-boolean-logic-ultimate. I should also mention these flows were created in Node-RED 3.0 beta 3. If anyone has any questions, suggestions or wants more information, please hit me up.

EDIT: One limitation I've discovered is the timer will only work for the last command you gave Alexa. So, if you told her to turn on your living room lights for an hour and then during that hour, told her to turn on your kitchen lights for 5 minutes, it will reset the timer to 5 minutes.

[
    {
        "id": "25bc6f35f2a44cb7",
        "type": "tab",
        "label": "Flow 9",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "65e8c3c1e958d3ea",
        "type": "group",
        "z": "25bc6f35f2a44cb7",
        "style": {
            "stroke": "#000000",
            "label": true,
            "fill": "#addb7b",
            "color": "#000000"
        },
        "nodes": [
            "98a49fe9e4e49101",
            "04a0a024d2811afd",
            "f1190985f2bc844f",
            "be315601ea68f849",
            "93ccf8606e4db7ec",
            "8f79b7c924abff02",
            "6bcdbfe69cafb699",
            "f629d61ac9189375",
            "baec9cd6f13d2225",
            "9be4a146ec75a4a7",
            "04562dfaf46c5bf3",
            "ed0794686d944bf3",
            "86f54ac3daaf7768",
            "e826ee85e975ffa4",
            "84ff480ae5725c14",
            "b072027c6d1d6e64",
            "8f7f56ba872e61f0",
            "6e1f8cc4f1ab07e0",
            "a8f3dd512cfb7be4",
            "919572594d214e9a"
        ],
        "x": 188,
        "y": 574,
        "w": 1444,
        "h": 1052
    },
    {
        "id": "a8f3dd512cfb7be4",
        "type": "group",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "name": "Alexa Local Light Voice Control ",
        "style": {
            "stroke": "#000000",
            "fill": "#bfdbef",
            "label": true,
            "color": "#000000"
        },
        "nodes": [
            "f547e027474194f6",
            "a27c511addeda301",
            "15adfeaf0f1dcb7a",
            "1a4c9334cd28463e",
            "2eef74b5af789246",
            "0c68db52072968f3",
            "0c6a84a9b1dadc54",
            "6f4ae984d0fb9410",
            "966b3c2392432a60",
            "6b5aeb1c80fc63eb",
            "05a0037e8e57b876",
            "eae5abcd46cb1c12",
            "62cfa8a173b8235d",
            "ba28246ca58d1781",
            "370756c64ae1a442",
            "626bd71df581ea5a",
            "6c0c3bf8a453a80c",
            "1b64c986a124f861",
            "5d43fb69a17a6eef",
            "4630e3f5d44bdf5b"
        ],
        "x": 214,
        "y": 899,
        "w": 1392,
        "h": 409.5
    },
    {
        "id": "8f7f56ba872e61f0",
        "type": "junction",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "x": 1220,
        "y": 600,
        "wires": [
            [
                "f1190985f2bc844f"
            ]
        ]
    },
    {
        "id": "6e1f8cc4f1ab07e0",
        "type": "junction",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "x": 1220,
        "y": 1600,
        "wires": [
            [
                "8f79b7c924abff02"
            ]
        ]
    },
    {
        "id": "eae5abcd46cb1c12",
        "type": "junction",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "x": 1200,
        "y": 940,
        "wires": [
            [
                "966b3c2392432a60"
            ]
        ]
    },
    {
        "id": "1b64c986a124f861",
        "type": "junction",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "x": 560,
        "y": 1160,
        "wires": [
            [
                "f547e027474194f6",
                "15adfeaf0f1dcb7a"
            ]
        ]
    },
    {
        "id": "98a49fe9e4e49101",
        "type": "switch",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "name": "Voice Commands",
        "property": "payload.description.summary",
        "propertyType": "msg",
        "rules": [
            {
                "t": "cont",
                "v": "turn on",
                "vt": "str"
            },
            {
                "t": "cont",
                "v": "lights on",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 850,
        "y": 760,
        "wires": [
            [
                "04a0a024d2811afd"
            ],
            [
                "04a0a024d2811afd"
            ]
        ]
    },
    {
        "id": "04a0a024d2811afd",
        "type": "switch",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "name": "Which Device?",
        "property": "payload.deviceSerialNumber",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "Alexa Serial Number Here",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Alexa Serial Number Here",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Alexa Serial Number Here",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Alexa Serial Number Here",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Alexa Serial Number Here",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Alexa Serial Number Here",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Alexa Serial Number Here",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Alexa Serial Number Here",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Alexa Serial Number Here",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 9,
        "x": 1080,
        "y": 760,
        "wires": [
            [
                "8f7f56ba872e61f0"
            ],
            [
                "8f7f56ba872e61f0",
                "be315601ea68f849",
                "86f54ac3daaf7768"
            ],
            [
                "8f7f56ba872e61f0"
            ],
            [
                "8f7f56ba872e61f0",
                "f629d61ac9189375"
            ],
            [
                "8f7f56ba872e61f0",
                "e826ee85e975ffa4"
            ],
            [
                "8f7f56ba872e61f0",
                "86f54ac3daaf7768",
                "be315601ea68f849"
            ],
            [
                "8f7f56ba872e61f0",
                "9be4a146ec75a4a7"
            ],
            [
                "8f7f56ba872e61f0"
            ],
            [
                "8f7f56ba872e61f0"
            ]
        ],
        "outputLabels": [
            "Bedroom Echo",
            "Family Room Echo",
            "Garage Echo",
            "Guest Room Echo",
            "Hallway Echo",
            "Kitchen Echo",
            "Living Room Echo",
            "Master Bath Echo",
            "Office Echo"
        ]
    },
    {
        "id": "f1190985f2bc844f",
        "type": "debug",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "name": "debug 515",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": true,
        "complete": "true",
        "targetType": "full",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 1070,
        "y": 640,
        "wires": []
    },
    {
        "id": "be315601ea68f849",
        "type": "hubitat command",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "deviceLabel": "",
        "name": "",
        "server": "",
        "deviceId": "",
        "command": "",
        "commandArgs": "",
        "x": 1520,
        "y": 620,
        "wires": [
            []
        ]
    },
    {
        "id": "93ccf8606e4db7ec",
        "type": "switch",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "name": "Which Device?",
        "property": "payload.deviceSerialNumber",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "Alexa Serial Number Here",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Alexa Serial Number Here",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Alexa Serial Number Here",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Alexa Serial Number Here",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Alexa Serial Number Here",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Alexa Serial Number Here",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Alexa Serial Number Here",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Alexa Serial Number Here",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Alexa Serial Number Here",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 9,
        "x": 1080,
        "y": 1440,
        "wires": [
            [
                "6e1f8cc4f1ab07e0"
            ],
            [
                "6e1f8cc4f1ab07e0",
                "6bcdbfe69cafb699",
                "ed0794686d944bf3"
            ],
            [
                "6e1f8cc4f1ab07e0"
            ],
            [
                "6e1f8cc4f1ab07e0",
                "baec9cd6f13d2225"
            ],
            [
                "6e1f8cc4f1ab07e0",
                "84ff480ae5725c14"
            ],
            [
                "6e1f8cc4f1ab07e0",
                "ed0794686d944bf3",
                "6bcdbfe69cafb699"
            ],
            [
                "6e1f8cc4f1ab07e0",
                "04562dfaf46c5bf3"
            ],
            [
                "6e1f8cc4f1ab07e0"
            ],
            [
                "6e1f8cc4f1ab07e0"
            ]
        ],
        "outputLabels": [
            "Bedroom Echo",
            "Family Room Echo",
            "Garage Echo",
            "Guest Room Echo",
            "Hallway Echo",
            "Kitchen Echo",
            "Living Room Echo",
            "Master Bath Echo",
            "Office Echo"
        ]
    },
    {
        "id": "8f79b7c924abff02",
        "type": "debug",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "name": "debug 516",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": true,
        "complete": "true",
        "targetType": "full",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 1070,
        "y": 1560,
        "wires": []
    },
    {
        "id": "6bcdbfe69cafb699",
        "type": "hubitat command",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "deviceLabel": "",
        "name": "",
        "server": "",
        "deviceId": "",
        "command": "",
        "commandArgs": "",
        "x": 1520,
        "y": 1340,
        "wires": [
            []
        ]
    },
    {
        "id": "f629d61ac9189375",
        "type": "hubitat command",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "deviceLabel": "",
        "name": "",
        "server": "",
        "deviceId": "",
        "command": "",
        "commandArgs": "",
        "x": 1520,
        "y": 680,
        "wires": [
            []
        ]
    },
    {
        "id": "baec9cd6f13d2225",
        "type": "hubitat command",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "deviceLabel": "",
        "name": "",
        "server": "",
        "deviceId": "",
        "command": "",
        "commandArgs": "",
        "x": 1520,
        "y": 1400,
        "wires": [
            []
        ]
    },
    {
        "id": "9be4a146ec75a4a7",
        "type": "hubitat command",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "deviceLabel": "",
        "name": "",
        "server": "",
        "deviceId": "",
        "command": "",
        "commandArgs": "",
        "x": 1520,
        "y": 860,
        "wires": [
            []
        ]
    },
    {
        "id": "04562dfaf46c5bf3",
        "type": "hubitat command",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "deviceLabel": "",
        "name": "",
        "server": "",
        "deviceId": "",
        "command": "",
        "commandArgs": "",
        "x": 1520,
        "y": 1580,
        "wires": [
            []
        ]
    },
    {
        "id": "ed0794686d944bf3",
        "type": "hubitat command",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "deviceLabel": "",
        "name": "",
        "server": "",
        "deviceId": "",
        "command": "",
        "commandArgs": "",
        "x": 1520,
        "y": 1520,
        "wires": [
            []
        ]
    },
    {
        "id": "86f54ac3daaf7768",
        "type": "hubitat command",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "deviceLabel": "",
        "name": "",
        "server": "",
        "deviceId": "",
        "command": "",
        "commandArgs": "",
        "x": 1520,
        "y": 800,
        "wires": [
            []
        ]
    },
    {
        "id": "e826ee85e975ffa4",
        "type": "hubitat command",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "deviceLabel": "",
        "name": "",
        "server": "",
        "deviceId": "",
        "command": "",
        "commandArgs": "",
        "x": 1520,
        "y": 740,
        "wires": [
            []
        ]
    },
    {
        "id": "84ff480ae5725c14",
        "type": "hubitat command",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "deviceLabel": "",
        "name": "",
        "server": "",
        "deviceId": "",
        "command": "",
        "commandArgs": "",
        "x": 1520,
        "y": 1460,
        "wires": [
            []
        ]
    },
    {
        "id": "b072027c6d1d6e64",
        "type": "switch",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "name": "Voice Commands",
        "property": "payload.description.summary",
        "propertyType": "msg",
        "rules": [
            {
                "t": "cont",
                "v": "lights off",
                "vt": "str"
            },
            {
                "t": "cont",
                "v": "turn off",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 850,
        "y": 1440,
        "wires": [
            [
                "93ccf8606e4db7ec"
            ],
            [
                "93ccf8606e4db7ec"
            ]
        ]
    },
    {
        "id": "f547e027474194f6",
        "type": "change",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "name": "set numbers",
        "rules": [
            {
                "t": "change",
                "p": "values.number",
                "pt": "msg",
                "from": "one",
                "fromt": "str",
                "to": "1",
                "tot": "num"
            },
            {
                "t": "change",
                "p": "values.number",
                "pt": "msg",
                "from": "two",
                "fromt": "str",
                "to": "2",
                "tot": "num"
            },
            {
                "t": "change",
                "p": "values.number",
                "pt": "msg",
                "from": "three",
                "fromt": "str",
                "to": "3",
                "tot": "num"
            },
            {
                "t": "change",
                "p": "values.number",
                "pt": "msg",
                "from": "four",
                "fromt": "str",
                "to": "4",
                "tot": "num"
            },
            {
                "t": "change",
                "p": "values.number",
                "pt": "msg",
                "from": "five",
                "fromt": "str",
                "to": "5",
                "tot": "num"
            },
            {
                "t": "change",
                "p": "values.number",
                "pt": "msg",
                "from": "six",
                "fromt": "str",
                "to": "6",
                "tot": "num"
            },
            {
                "t": "change",
                "p": "values.number",
                "pt": "msg",
                "from": "seven",
                "fromt": "str",
                "to": "7",
                "tot": "num"
            },
            {
                "t": "change",
                "p": "values.number",
                "pt": "msg",
                "from": "eight",
                "fromt": "str",
                "to": "8",
                "tot": "num"
            },
            {
                "t": "change",
                "p": "values.number",
                "pt": "msg",
                "from": "nine",
                "fromt": "str",
                "to": "9",
                "tot": "num"
            },
            {
                "t": "change",
                "p": "values.number",
                "pt": "msg",
                "from": "ten",
                "fromt": "str",
                "to": "10",
                "tot": "num"
            },
            {
                "t": "change",
                "p": "values.number",
                "pt": "msg",
                "from": "fifteen",
                "fromt": "str",
                "to": "15",
                "tot": "num"
            },
            {
                "t": "change",
                "p": "values.number",
                "pt": "msg",
                "from": "twenty",
                "fromt": "str",
                "to": "20",
                "tot": "num"
            },
            {
                "t": "change",
                "p": "values.number",
                "pt": "msg",
                "from": "thirty",
                "fromt": "str",
                "to": "30",
                "tot": "num"
            },
            {
                "t": "change",
                "p": "values.number",
                "pt": "msg",
                "from": "fourty",
                "fromt": "str",
                "to": "40",
                "tot": "num"
            },
            {
                "t": "change",
                "p": "values.number",
                "pt": "msg",
                "from": "fifty",
                "fromt": "str",
                "to": "50",
                "tot": "num"
            },
            {
                "t": "change",
                "p": "values.number",
                "pt": "msg",
                "from": "sixty",
                "fromt": "str",
                "to": "60",
                "tot": "num"
            },
            {
                "t": "set",
                "p": "delay",
                "pt": "msg",
                "to": "values.number",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 670,
        "y": 1160,
        "wires": [
            [
                "1a4c9334cd28463e"
            ]
        ]
    },
    {
        "id": "a27c511addeda301",
        "type": "stoptimer-varidelay",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "duration": "60",
        "durationType": "num",
        "units": "Minute",
        "payloadtype": "str",
        "payloadval": "off",
        "name": "",
        "reporting": "last_minute_seconds",
        "persist": true,
        "ignoretimerpass": false,
        "x": 940,
        "y": 1260,
        "wires": [
            [
                "05a0037e8e57b876",
                "93ccf8606e4db7ec"
            ],
            [],
            []
        ]
    },
    {
        "id": "15adfeaf0f1dcb7a",
        "type": "change",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "name": "set units",
        "rules": [
            {
                "t": "set",
                "p": "units",
                "pt": "msg",
                "to": "values.units",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 680,
        "y": 1240,
        "wires": [
            [
                "1a4c9334cd28463e"
            ]
        ]
    },
    {
        "id": "1a4c9334cd28463e",
        "type": "join",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "name": "",
        "mode": "custom",
        "build": "array",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": false,
        "timeout": "",
        "count": "2",
        "reduceRight": false,
        "reduceExp": "",
        "reduceInit": "",
        "reduceInitType": "",
        "reduceFixup": "",
        "x": 810,
        "y": 1200,
        "wires": [
            [
                "a27c511addeda301"
            ]
        ]
    },
    {
        "id": "2eef74b5af789246",
        "type": "ecolect",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "name": "Voice Commands for Lighting",
        "topics": [
            {
                "name": "lights",
                "phrases": "turn {state} the {item} for {number} {units}\nturn {state} the {item} in the {area} for {number} {units}\nturn {state} the {item} in the {area}\n{state} {item}\n{item}{state}\nturn {state} the {area} {item} for {number} {units}\nturn {state} the {area} {item} \nturn {state} the {item} in the {area}\nturn {state} the {item} in the {area} for {number} {units}\n",
                "values": [
                    {
                        "name": "item",
                        "type": "enumeration",
                        "enumerations": [
                            "lights",
                            "light",
                            "motion",
                            "motion sensors",
                            "sensors"
                        ]
                    },
                    {
                        "name": "units",
                        "type": "enumeration",
                        "enumerations": [
                            "seconds",
                            "minutes",
                            "hours"
                        ]
                    },
                    {
                        "name": "state",
                        "type": "enumeration",
                        "enumerations": [
                            "on",
                            "off",
                            "disable",
                            "enable",
                            "activate",
                            "deactivate"
                        ]
                    },
                    {
                        "name": "number",
                        "type": "enumeration",
                        "enumerations": [
                            "one",
                            "two",
                            "three",
                            "four",
                            "five",
                            "six",
                            "seven",
                            "eight",
                            "nine",
                            "ten",
                            "eleven",
                            "twelve",
                            "thirteen",
                            "fourteen",
                            "fifteen",
                            "sixteen",
                            "seventeen",
                            "eighteen",
                            "ninteen",
                            "twenty",
                            "twenty-one",
                            "twenty-two",
                            "twenty-three",
                            "twenty-four",
                            "twenty-five",
                            "thirty",
                            "fourty",
                            "fourty-five",
                            "fifty",
                            "sixty"
                        ]
                    },
                    {
                        "name": "area",
                        "type": "enumeration",
                        "enumerations": [
                            "bathroom",
                            "bedroom",
                            "dining room",
                            "entryway",
                            "family room",
                            "garage",
                            "guest room",
                            "hallway",
                            "kitchen",
                            "laundry room",
                            "living room",
                            "master bathroom",
                            "master bath",
                            "office",
                            "outside"
                        ]
                    }
                ]
            }
        ],
        "outputs": 2,
        "x": 650,
        "y": 1080,
        "wires": [
            [
                "0c6a84a9b1dadc54",
                "1b64c986a124f861"
            ],
            []
        ]
    },
    {
        "id": "0c68db52072968f3",
        "type": "change",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "name": "set payload from summary",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "payload.description.summary",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 480,
        "y": 1020,
        "wires": [
            [
                "2eef74b5af789246"
            ]
        ]
    },
    {
        "id": "0c6a84a9b1dadc54",
        "type": "change",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "name": "set state",
        "rules": [
            {
                "t": "change",
                "p": "values.state",
                "pt": "msg",
                "from": "on",
                "fromt": "str",
                "to": "true",
                "tot": "bool"
            },
            {
                "t": "change",
                "p": "values.state",
                "pt": "msg",
                "from": "off",
                "fromt": "str",
                "to": "false",
                "tot": "bool"
            },
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "values.state",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 920,
        "y": 1040,
        "wires": [
            [
                "6f4ae984d0fb9410"
            ]
        ]
    },
    {
        "id": "6f4ae984d0fb9410",
        "type": "switch",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "name": "Room/Area",
        "property": "values.area",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "bathroom",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "bedroom",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "dining room",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "entryway",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "family room",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "garage",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "guest room",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "hallway",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "kitchen",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "laundry",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "living room",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "master bath",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "office",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "outside",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 14,
        "x": 1090,
        "y": 1080,
        "wires": [
            [
                "eae5abcd46cb1c12"
            ],
            [
                "eae5abcd46cb1c12",
                "370756c64ae1a442"
            ],
            [
                "eae5abcd46cb1c12"
            ],
            [
                "eae5abcd46cb1c12",
                "6b5aeb1c80fc63eb"
            ],
            [
                "eae5abcd46cb1c12"
            ],
            [
                "eae5abcd46cb1c12",
                "626bd71df581ea5a"
            ],
            [
                "eae5abcd46cb1c12"
            ],
            [
                "eae5abcd46cb1c12",
                "6c0c3bf8a453a80c"
            ],
            [
                "eae5abcd46cb1c12"
            ],
            [
                "eae5abcd46cb1c12",
                "62cfa8a173b8235d"
            ],
            [
                "eae5abcd46cb1c12"
            ],
            [
                "eae5abcd46cb1c12"
            ],
            [
                "eae5abcd46cb1c12",
                "ba28246ca58d1781"
            ],
            [
                "eae5abcd46cb1c12"
            ]
        ],
        "outputLabels": [
            "Bathroom",
            "Bedroom",
            "Dining Room",
            "Entryway",
            "Family Room",
            "Garage",
            "Guest Room",
            "Hallway",
            "Kitchen",
            "Laundry Room",
            "Living Room",
            "Master Bath",
            "Office",
            "Outside"
        ]
    },
    {
        "id": "966b3c2392432a60",
        "type": "debug",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "name": "debug 517",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": true,
        "complete": "true",
        "targetType": "full",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 1310,
        "y": 940,
        "wires": []
    },
    {
        "id": "6b5aeb1c80fc63eb",
        "type": "link out",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "name": "Entryway Lights",
        "mode": "link",
        "links": [
            "1cbe1d67bbf89d7c"
        ],
        "x": 1500,
        "y": 1020,
        "wires": [],
        "icon": "node-red/light.svg",
        "l": true
    },
    {
        "id": "05a0037e8e57b876",
        "type": "change",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "name": "set state",
        "rules": [
            {
                "t": "change",
                "p": "values.state",
                "pt": "msg",
                "from": "on",
                "fromt": "str",
                "to": "false",
                "tot": "bool"
            },
            {
                "t": "change",
                "p": "values.state",
                "pt": "msg",
                "from": "off",
                "fromt": "str",
                "to": "true",
                "tot": "bool"
            },
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "values.state",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 920,
        "y": 1120,
        "wires": [
            [
                "6f4ae984d0fb9410"
            ]
        ]
    },
    {
        "id": "62cfa8a173b8235d",
        "type": "link out",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "name": "Laundry Room Lights",
        "mode": "link",
        "links": [
            "2d4d225366c81a39"
        ],
        "x": 1480,
        "y": 1200,
        "wires": [],
        "icon": "node-red/light.svg",
        "l": true
    },
    {
        "id": "ba28246ca58d1781",
        "type": "link out",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "name": "Office Lights",
        "mode": "link",
        "links": [
            "e127b95333e569fd",
            "27f951496da4f276",
            "5445e96a55d1da7f",
            "a03c0d4ba6e71fda"
        ],
        "x": 1510,
        "y": 1260,
        "wires": [],
        "icon": "node-red/light.svg",
        "l": true
    },
    {
        "id": "370756c64ae1a442",
        "type": "link out",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "name": "Bedroom Lights",
        "mode": "link",
        "links": [
            "21ebd38950e29f43",
            "5c8badb0bd0992fe"
        ],
        "x": 1500,
        "y": 960,
        "wires": [],
        "icon": "node-red/light.svg",
        "l": true
    },
    {
        "id": "626bd71df581ea5a",
        "type": "link out",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "name": "Garage Lights",
        "mode": "link",
        "links": [],
        "x": 1500,
        "y": 1080,
        "wires": [],
        "icon": "node-red/light.svg",
        "l": true
    },
    {
        "id": "6c0c3bf8a453a80c",
        "type": "link out",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "name": "Hallway Lights",
        "mode": "link",
        "links": [
            "2d4d225366c81a39",
            "a7e452d41c38e273"
        ],
        "x": 1500,
        "y": 1140,
        "wires": [],
        "icon": "node-red/light.svg",
        "l": true
    },
    {
        "id": "5d43fb69a17a6eef",
        "type": "alexa-remote-event",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "name": "",
        "account": "",
        "event": "ws-device-activity",
        "x": 330,
        "y": 1080,
        "wires": [
            [
                "98a49fe9e4e49101",
                "b072027c6d1d6e64",
                "0c68db52072968f3"
            ]
        ]
    },
    {
        "id": "919572594d214e9a",
        "type": "comment",
        "z": "25bc6f35f2a44cb7",
        "g": "65e8c3c1e958d3ea",
        "name": "Regarding Hubitat Command Nodes",
        "info": "You will need ot add your own device info into\nthe command nodes. The top row are \"on\" nodes\nthe bottom row are \"off\" nodes.",
        "x": 1100,
        "y": 860,
        "wires": []
    },
    {
        "id": "4630e3f5d44bdf5b",
        "type": "comment",
        "z": "25bc6f35f2a44cb7",
        "g": "a8f3dd512cfb7be4",
        "name": "Conenct your alexa account here",
        "info": "Details for how to set this up can be found \nin the contrib",
        "x": 370,
        "y": 960,
        "wires": []
    }
]
3 Likes

Sorry for the double post, but I ran out of characters for the second part of the flow. So, here it is...

[
    {
        "id": "313c0097.f1216",
        "type": "subflow",
        "name": "HUE - Motion Sensor Event Filter",
        "info": "",
        "category": "",
        "in": [
            {
                "x": 380,
                "y": 280,
                "wires": [
                    {
                        "id": "f00de543.b72668"
                    }
                ]
            }
        ],
        "out": [
            {
                "x": 960,
                "y": 200,
                "wires": [
                    {
                        "id": "6bf15156.15b6f",
                        "port": 0
                    }
                ]
            },
            {
                "x": 960,
                "y": 280,
                "wires": [
                    {
                        "id": "6bf15156.15b6f",
                        "port": 0
                    },
                    {
                        "id": "26f8a17a.e1b86e",
                        "port": 0
                    }
                ]
            },
            {
                "x": 960,
                "y": 360,
                "wires": [
                    {
                        "id": "26f8a17a.e1b86e",
                        "port": 0
                    }
                ]
            }
        ],
        "env": [],
        "meta": {},
        "color": "#DDAA99"
    },
    {
        "id": "f00de543.b72668",
        "type": "switch",
        "z": "313c0097.f1216",
        "name": "payload.data.0.motion.motion",
        "property": "payload.data.0.motion.motion",
        "propertyType": "msg",
        "rules": [
            {
                "t": "true"
            },
            {
                "t": "false"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 570,
        "y": 280,
        "wires": [
            [
                "6bf15156.15b6f"
            ],
            [
                "26f8a17a.e1b86e"
            ]
        ]
    },
    {
        "id": "6bf15156.15b6f",
        "type": "change",
        "z": "313c0097.f1216",
        "name": "true",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "true",
                "tot": "bool"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 830,
        "y": 240,
        "wires": [
            []
        ]
    },
    {
        "id": "26f8a17a.e1b86e",
        "type": "change",
        "z": "313c0097.f1216",
        "name": "false",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "false",
                "tot": "bool"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 830,
        "y": 320,
        "wires": [
            []
        ]
    },
    {
        "id": "94e24bce.4cf888",
        "type": "comment",
        "z": "313c0097.f1216",
        "name": "PLEASE READ - DOUBLE CLICK",
        "info": "Output 1:\nWill send just an **true** when Motion is detected\n\nOutput 2:\nWill send an **true** when Motion is detected and a **false** if no motion is detected any longer.\n\nOutput 3:\nWill send just an **false** when no Motion is detected any longer.\n\n\n-----------------------\nAll outputs are boolean\n-----------------------\n\nMost easy Subflow, but convinient when lots of sensors need to be set up.",
        "x": 580,
        "y": 240,
        "wires": []
    },
    {
        "id": "3c1e2a8e.9361c6",
        "type": "comment",
        "z": "313c0097.f1216",
        "name": "motion true",
        "info": "",
        "x": 1060,
        "y": 200,
        "wires": []
    },
    {
        "id": "dad8bfd3.3e71d",
        "type": "comment",
        "z": "313c0097.f1216",
        "name": "motion false",
        "info": "",
        "x": 1070,
        "y": 360,
        "wires": []
    },
    {
        "id": "ed505a4f.d8e6d8",
        "type": "comment",
        "z": "313c0097.f1216",
        "name": "motion true / false",
        "info": "",
        "x": 1090,
        "y": 280,
        "wires": []
    },
    {
        "id": "90cd7dbdce9813de",
        "type": "tab",
        "label": "Flow 13",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "1e8c0c2383272a95",
        "type": "group",
        "z": "90cd7dbdce9813de",
        "name": "Office",
        "style": {
            "stroke": "#000000",
            "fill": "#bfdbef",
            "label": true,
            "color": "#000000"
        },
        "nodes": [
            "d8d99c143f6da609",
            "94fda84f9545bbb1",
            "92233f0422649d61",
            "d8be590aa66d05ee",
            "5bad0618defdff77",
            "acfc5c9fd8876a6e",
            "a03c0d4ba6e71fda",
            "ba0f961f9d691fbd",
            "d3ab02f1d575d876",
            "ef34b880d18038e4",
            "d71d10ef843fe35e",
            "24fc7357ef1e7118",
            "7dd59e39458f5f85",
            "7d149c75ac88f0ec",
            "18efe3a973fdd95a",
            "a011d7f9ebdff679",
            "0e3373c46e63ba00",
            "655d3b3f0c816b88",
            "61867b525430fd57",
            "abd6180e01d8c7df",
            "ccf5f024cdc85f58",
            "9f8f56f1212f0f3b",
            "0180b565ee3c5df3",
            "c19962b5d186eee4",
            "0ee55c2909231d48",
            "f06f62e72bda7a0c",
            "22282658e3aae18d",
            "6d0c2fd71bf88e7d"
        ],
        "x": 44,
        "y": 199,
        "w": 1882,
        "h": 382
    },
    {
        "id": "0ee55c2909231d48",
        "type": "junction",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "x": 1060,
        "y": 300,
        "wires": [
            [
                "5bad0618defdff77"
            ]
        ]
    },
    {
        "id": "f06f62e72bda7a0c",
        "type": "junction",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "x": 380,
        "y": 300,
        "wires": [
            [
                "0ee55c2909231d48"
            ]
        ]
    },
    {
        "id": "d8d99c143f6da609",
        "type": "FilterUltimate",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "On/Off",
        "x": 250,
        "y": 340,
        "wires": [
            [
                "ba0f961f9d691fbd",
                "7d149c75ac88f0ec",
                "f06f62e72bda7a0c"
            ],
            [
                "ba0f961f9d691fbd",
                "7d149c75ac88f0ec"
            ]
        ],
        "icon": "font-awesome/fa-lightbulb-o"
    },
    {
        "id": "94fda84f9545bbb1",
        "type": "link in",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "Hallway Motion / Sleep Presence",
        "links": [
            "1ae21f4d68f8c02c",
            "4195a8482f917cc9",
            "fd1054ebd817e7d6",
            "401995578a2312ef",
            "02fceb2a9fedad8a",
            "b6b811232ee4161b",
            "15087f3ae88fb8ad",
            "b94278acbee61495",
            "07f76a5ed54737a9",
            "79efc42d7e6397d2",
            "b01796562034455d",
            "345739aa08e13a64"
        ],
        "x": 1235,
        "y": 540,
        "wires": [
            [
                "d3ab02f1d575d876"
            ]
        ],
        "icon": "font-awesome/fa-moon-o"
    },
    {
        "id": "92233f0422649d61",
        "type": "inject",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "On",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "true",
        "payloadType": "bool",
        "x": 105,
        "y": 300,
        "wires": [
            [
                "d8d99c143f6da609"
            ]
        ],
        "outputLabels": [
            "On"
        ],
        "icon": "font-awesome/fa-toggle-on",
        "l": false
    },
    {
        "id": "d8be590aa66d05ee",
        "type": "inject",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "Off",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "false",
        "payloadType": "bool",
        "x": 105,
        "y": 380,
        "wires": [
            [
                "d8d99c143f6da609"
            ]
        ],
        "outputLabels": [
            "Off"
        ],
        "icon": "font-awesome/fa-toggle-off",
        "l": false
    },
    {
        "id": "5bad0618defdff77",
        "type": "change",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "RESET",
        "rules": [
            {
                "t": "set",
                "p": "reset",
                "pt": "msg",
                "to": "true",
                "tot": "bool"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1235,
        "y": 460,
        "wires": [
            [
                "22282658e3aae18d"
            ]
        ],
        "icon": "font-awesome/fa-refresh",
        "l": false
    },
    {
        "id": "acfc5c9fd8876a6e",
        "type": "switch",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "Home Mode",
        "property": "HomeMode",
        "propertyType": "global",
        "rules": [
            {
                "t": "eq",
                "v": "Day",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Evening",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Night",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 3,
        "x": 1490,
        "y": 300,
        "wires": [
            [
                "abd6180e01d8c7df"
            ],
            [
                "c19962b5d186eee4"
            ],
            [
                "61867b525430fd57"
            ]
        ],
        "icon": "font-awesome/fa-home"
    },
    {
        "id": "a03c0d4ba6e71fda",
        "type": "link in",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "Office Light Voice Control",
        "links": [
            "657ee5c0b4a5595c",
            "ad5f454508d872df",
            "c420b86918417d51",
            "ba28246ca58d1781"
        ],
        "x": 125,
        "y": 340,
        "wires": [
            [
                "d8d99c143f6da609"
            ]
        ],
        "icon": "font-awesome/fa-bullhorn"
    },
    {
        "id": "ba0f961f9d691fbd",
        "type": "change",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "Office Lights",
        "rules": [
            {
                "t": "set",
                "p": "endpoint",
                "pt": "msg",
                "to": "grouped_light",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "your ID number here",
                "tot": "str"
            },
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "true",
                "fromt": "bool",
                "to": "{\"on\":{\"on\":true}}",
                "tot": "json"
            },
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "false",
                "fromt": "bool",
                "to": "{\"on\":{\"on\":false}}",
                "tot": "json"
            },
            {
                "t": "set",
                "p": "verb",
                "pt": "msg",
                "to": "put",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 450,
        "y": 340,
        "wires": [
            [
                "18efe3a973fdd95a"
            ]
        ],
        "icon": "font-awesome/fa-lightbulb-o"
    },
    {
        "id": "d3ab02f1d575d876",
        "type": "change",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "Office Lights - OFF",
        "rules": [
            {
                "t": "set",
                "p": "endpoint",
                "pt": "msg",
                "to": "grouped_light",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "your ID number here",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "{\"on\":{\"on\":false}}",
                "tot": "json"
            },
            {
                "t": "set",
                "p": "verb",
                "pt": "msg",
                "to": "put",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1510,
        "y": 540,
        "wires": [
            [
                "ef34b880d18038e4"
            ]
        ]
    },
    {
        "id": "ef34b880d18038e4",
        "type": "link out",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "Hue",
        "mode": "link",
        "links": [
            "0763283cf82ea3ab"
        ],
        "x": 1850,
        "y": 540,
        "wires": [],
        "l": true
    },
    {
        "id": "d71d10ef843fe35e",
        "type": "hubitat device",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "deviceLabel": "",
        "name": "Office",
        "server": "",
        "deviceId": "",
        "attribute": "",
        "sendEvent": false,
        "x": 130,
        "y": 240,
        "wires": [
            []
        ]
    },
    {
        "id": "24fc7357ef1e7118",
        "type": "switch",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "D'Dee Sleep Status",
        "property": "state.DDeeSleepState.value",
        "propertyType": "global",
        "rules": [
            {
                "t": "eq",
                "v": "Awake",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Asleep",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 1270,
        "y": 380,
        "wires": [
            [
                "7dd59e39458f5f85"
            ],
            [
                "61867b525430fd57"
            ]
        ],
        "icon": "font-awesome/fa-bed"
    },
    {
        "id": "7dd59e39458f5f85",
        "type": "switch",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "Rich Sleep Status",
        "property": "state.RichSleepState.value",
        "propertyType": "global",
        "rules": [
            {
                "t": "eq",
                "v": "Awake",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Asleep",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 1270,
        "y": 320,
        "wires": [
            [
                "acfc5c9fd8876a6e"
            ],
            [
                "61867b525430fd57"
            ]
        ],
        "icon": "font-awesome/fa-bed"
    },
    {
        "id": "7d149c75ac88f0ec",
        "type": "change",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "Motion Sensor",
        "rules": [
            {
                "t": "set",
                "p": "endpoint",
                "pt": "msg",
                "to": "motion",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "your ID number here",
                "tot": "str"
            },
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "false",
                "fromt": "bool",
                "to": "{\"enabled\":true}",
                "tot": "json"
            },
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "true",
                "fromt": "bool",
                "to": "{\"enabled\":false}",
                "tot": "json"
            },
            {
                "t": "set",
                "p": "verb",
                "pt": "msg",
                "to": "put",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 460,
        "y": 380,
        "wires": [
            [
                "18efe3a973fdd95a"
            ]
        ],
        "icon": "node-red-contrib-huemagic/hue-motion.svg"
    },
    {
        "id": "18efe3a973fdd95a",
        "type": "link out",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "Hue",
        "mode": "link",
        "links": [
            "0763283cf82ea3ab"
        ],
        "x": 630,
        "y": 400,
        "wires": [],
        "l": true
    },
    {
        "id": "a011d7f9ebdff679",
        "type": "switch",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "Motion Event Stream",
        "property": "payload.data.0.id",
        "propertyType": "msg",
        "rules": [
            {
                "t": "cont",
                "v": "your ID numer here",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 860,
        "y": 400,
        "wires": [
            [
                "0e3373c46e63ba00"
            ]
        ]
    },
    {
        "id": "0e3373c46e63ba00",
        "type": "subflow:313c0097.f1216",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "",
        "x": 920,
        "y": 480,
        "wires": [
            [
                "5bad0618defdff77",
                "24fc7357ef1e7118"
            ],
            [],
            [
                "22282658e3aae18d"
            ]
        ]
    },
    {
        "id": "655d3b3f0c816b88",
        "type": "link in",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "Events  IN",
        "links": [
            "d3cbfa9016794115"
        ],
        "x": 800,
        "y": 340,
        "wires": [
            [
                "a011d7f9ebdff679"
            ]
        ],
        "l": true
    },
    {
        "id": "61867b525430fd57",
        "type": "change",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "Nightlight",
        "rules": [
            {
                "t": "set",
                "p": "endpoint",
                "pt": "msg",
                "to": "scene",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "your ID number here",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "{\"recall\":{\"action\":\"active\"}}",
                "tot": "json"
            },
            {
                "t": "set",
                "p": "verb",
                "pt": "msg",
                "to": "put",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1660,
        "y": 340,
        "wires": [
            [
                "ef34b880d18038e4"
            ]
        ],
        "icon": "font-awesome/fa-star"
    },
    {
        "id": "abd6180e01d8c7df",
        "type": "change",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "Bright",
        "rules": [
            {
                "t": "set",
                "p": "endpoint",
                "pt": "msg",
                "to": "scene",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "your ID number here",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "{\"recall\":{\"action\":\"active\"}}",
                "tot": "json"
            },
            {
                "t": "set",
                "p": "verb",
                "pt": "msg",
                "to": "put",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1650,
        "y": 260,
        "wires": [
            [
                "ef34b880d18038e4"
            ]
        ],
        "icon": "font-awesome/fa-star"
    },
    {
        "id": "ccf5f024cdc85f58",
        "type": "FilterUltimate",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "On/Off",
        "x": 250,
        "y": 460,
        "wires": [
            [
                "0180b565ee3c5df3"
            ],
            [
                "0180b565ee3c5df3"
            ]
        ],
        "icon": "node-red-contrib-huemagic/hue-motion.svg"
    },
    {
        "id": "9f8f56f1212f0f3b",
        "type": "link in",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "Voice Control Office Motion",
        "links": [
            "1353fc597bda05de",
            "3484300f1307bf98",
            "565fd1bf0358f579"
        ],
        "x": 95,
        "y": 460,
        "wires": [
            [
                "ccf5f024cdc85f58"
            ]
        ],
        "icon": "font-awesome/fa-bullhorn"
    },
    {
        "id": "0180b565ee3c5df3",
        "type": "change",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "Motion Sensor",
        "rules": [
            {
                "t": "set",
                "p": "endpoint",
                "pt": "msg",
                "to": "motion",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "your ID number here",
                "tot": "str"
            },
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "true",
                "fromt": "bool",
                "to": "{\"enabled\":true}",
                "tot": "json"
            },
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "false",
                "fromt": "bool",
                "to": "{\"enabled\":false}",
                "tot": "json"
            },
            {
                "t": "set",
                "p": "verb",
                "pt": "msg",
                "to": "put",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 460,
        "y": 460,
        "wires": [
            [
                "18efe3a973fdd95a"
            ]
        ],
        "icon": "node-red-contrib-huemagic/hue-motion.svg"
    },
    {
        "id": "c19962b5d186eee4",
        "type": "change",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "Dimmed",
        "rules": [
            {
                "t": "set",
                "p": "endpoint",
                "pt": "msg",
                "to": "scene",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "your ID number here",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "{\"recall\":{\"action\":\"active\"}}",
                "tot": "json"
            },
            {
                "t": "set",
                "p": "verb",
                "pt": "msg",
                "to": "put",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1660,
        "y": 300,
        "wires": [
            [
                "ef34b880d18038e4"
            ]
        ],
        "icon": "font-awesome/fa-star"
    },
    {
        "id": "22282658e3aae18d",
        "type": "trigger",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "3 Minutes",
        "op1": "",
        "op2": "false",
        "op1type": "nul",
        "op2type": "bool",
        "duration": "3",
        "extend": true,
        "overrideDelay": false,
        "units": "min",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 1320,
        "y": 500,
        "wires": [
            [
                "d3ab02f1d575d876"
            ]
        ],
        "icon": "node-red-contrib-bigtimer/timer.png"
    },
    {
        "id": "6d0c2fd71bf88e7d",
        "type": "comment",
        "z": "90cd7dbdce9813de",
        "g": "1e8c0c2383272a95",
        "name": "Groups, lights and scenes info",
        "info": "You'll need to add your ID numbers to the lighting\nnodes if you want to use the hueevents method. \n",
        "x": 780,
        "y": 240,
        "wires": []
    }
]
3 Likes

This may not be the best place to ask this, but I've gotten a lot of help from this group so here goes. I'd like to move my NodeRed installation from my raspberry pi to a VM on an Intel NUC I already have running other VM's. I like this setup for ease of backups and the safety net of checkpoints within hyper-v. I can setup NodeRed in a linux VM without issue, but does anyone have any info on the best way to move all my current flows and configs into the new installation?

Sure - just do a full export (All Flows)... then import on the new instance. You might have to tweak some things but it should work fine. If you used DHCP reservations you can change the IP from the RPi to the new VM.

I just did this when moving NR from an RPi running Ubuntu server to an RPi running HomeAssistant + NR Addon. Easy Peasy!

2 Likes

Thank you. That's interesting... I'm running home assistant in its own VM on that NUC already. What are your thoughts on using the home assistant NR Addon vs running NodeRed on its own?

So I really like it so far and think it might be worth playing around with - the only drawback is you are at the mercy of the maintainers to update it. So the new V3 release is a no go currently. There are also some additional tweaks you have to do - the webhook as an additional "/endpoint/" added to the URL..

1 Like

I make regular backups of my Node-RED instance on a Pi (the .node-red folder). Just to make sure I could restore it on a different machine, I took the zipped file and copied the contents over to the Node-RED (fresh install) folder on my Mac. Apart from having to rename the flows file to whatever the new "hostname" is (default file name is flows_.json everything worked. If you don't do this, it will create a new flows file but will not overwrite the old one. Also, if you have your flows file defined in the settings.js, you may not need to do even rename the flows file.

Hope this helps.

1 Like

Is this in reference to the Node-RED that comes with HA? I haven't seen any issues in the little bit of playing around that I have done (but mine is a standalone instance, just talking to Hubitat).

Yep - the NR addon maintainers have to release the update which is one of the drawbacks of using Home Assistant as an "app manager" but am not in a hurry on my production system. On my dev installation (an RPi) - easily upgraded to V3 and that has been working great. The new junction feature of the wires (right click on a wire and select junction!) is kinda cool but like others have traditionally used NO-OP.

Aaaaandd as I was typing I checked my HA and the update is in.. so upgrading now. Devs are fast apparently.

:wink:

Followup: NR V3 has been installed and is working fine so far.

2 Likes

Is that the only gotcha? I was meaning to migrate NR to HA OS a couple of weeks ago but haven't gotten around to it yet.

Migrated successfully. I set up Node-Red and installed all necessary modules. I exported all flows and shutdown the existing service on the raspberry pi. Imported all flows into the new install, Swapped IP addresses via DHCP reservation, rebooted and tested. All good.

1 Like