Node-Red Flow Samples/Sharing

Good idea!

This thread is being created to give users of the Node-Red platform a place to share 'flows' focused on HE. When posting a flow please be sure to follow the simple formatting outlined below.


Title - this will be used to link your post in the Index on post #1. Please keep them short but descriptive.

Summary - include a brief description of what your flows automates. If it is a complex flow, give as detailed description as possible.

Picture - let everyone visualize the flow and better decide if it could be of use to them.

Flow - put three back-ticks " ``` " (left of the 1 key), and a return in front of, and after your flow json. This will create a code block, and make the code easier to import.

image image

Optional - using the 'Hide Details' option creates a "twist tie" around the code block

image


How to Import a flow from this thread into Node-Red

Click the 'twist tie' to expand the Flow you want to copy

image

Highlight and copy ALL the text in the expanded area. Open Your Node-Red UI, and click the hamburger menu, then 'Import'.

image

Paste the copied text into the open area and click 'Import'

The new flow should now appear in your Node-Red palette

If you are missing nodes that flow needs NR will prompt you. Make note of the nodes need, and install them.

Thanks to all that share, and inspire!!



Index of Shared Flows - Last updated 8-17-2020 17:30 EDT

Motion activated night lighting

Hub restart notification

Z-wave polling ONLY on motion

Office scenes with PC control

Periodic internet speed test

Backup Node Red

Setting the mode when the maid arrives and leaves

All Lux events on 1 trigger

Randomized greeting/departure announcement

Fan control using inside temp comparison with outside temp check.

Outside Light On and Off + Change with Motion

An Example of a boolean usage

motion lighting with dim level adjust

reformat Plex webhook posts to a usable payload object

circadian lighting routine

Log Internet Performance to Influxdb

Sensor offline sends a notice every 24 hours once offline.

Simple button toggle of a switch

Motion Lighting Template

Motion lighting that is disabled with button press

Log Proxmox data to influxDB

Control lights specific to room with Alexa using same phrase

Delay with Intervals Subflow Example

18 Likes

Title - Motion activated night lighting.

Summary - This flow turns a light on at 25%, but only between certain hours. It includes a shut off timer with cancellation if more motion is detected.

EDIT: Update 7/21/2020 - Added/then extended inactive timer to 7:15am to aid final shut off.

Flow
[{"id":"b9d2f5a.b069808","type":"within-time-switch","z":"a0d5236f.7d257","name":"8pm-7am","nameInt":"","positionConfig":"b3a05d3c.fb68f","startTime":"20:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"07:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":640,"y":2400,"wires":[["5caa8700.52a368"],[]]},{"id":"4c989f0d.1db49","type":"hubitat device","z":"a0d5236f.7d257","name":"Kitchen Beam Motion","server":"e56053d2.c7d11","deviceId":"2376","attribute":"motion","sendEvent":true,"x":240,"y":2420,"wires":[["a1e2897e.949af8"]]},{"id":"526127dd.9443f8","type":"hubitat command","z":"a0d5236f.7d257","name":"Under cabinet lights On","server":"e56053d2.c7d11","deviceId":"590","command":"on","commandArgs":"","x":1010,"y":2400,"wires":[["6363f6d0.70cdc8"]]},{"id":"a1e2897e.949af8","type":"switch","z":"a0d5236f.7d257","name":"Active/Inactive","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"active","vt":"str"},{"t":"eq","v":"inactive","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":460,"y":2440,"wires":[["b9d2f5a.b069808"],["b8bd09de.78a078"]]},{"id":"829fb8e2.b63f98","type":"hubitat command","z":"a0d5236f.7d257","name":"Under cabinet lights Off","server":"e56053d2.c7d11","deviceId":"590","command":"off","commandArgs":"","x":1690,"y":2380,"wires":[[]]},{"id":"5caa8700.52a368","type":"hubitat command","z":"a0d5236f.7d257","name":"Set to 25%","server":"e56053d2.c7d11","deviceId":"590","command":"setLevel","commandArgs":"25","x":810,"y":2400,"wires":[["526127dd.9443f8"]]},{"id":"7b372bbe.16e194","type":"comment","z":"a0d5236f.7d257","name":"Under Cabinet Night Lighting","info":" - ","x":200,"y":2360,"wires":[]},{"id":"473d9685.076ab8","type":"stoptimer","z":"a0d5236f.7d257","duration":"1","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":1480,"y":2380,"wires":[["829fb8e2.b63f98"],[]]},{"id":"6363f6d0.70cdc8","type":"change","z":"a0d5236f.7d257","name":"Send STOP","rules":[{"t":"set","p":"payload","pt":"msg","to":"STOP","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":2400,"wires":[["473d9685.076ab8"]]},{"id":"4b5b8e3.96a0f7","type":"hubitat device","z":"a0d5236f.7d257","name":"Kitchen Wide Motion","server":"e56053d2.c7d11","deviceId":"2759","attribute":"motion","sendEvent":true,"x":240,"y":2480,"wires":[["a1e2897e.949af8"]]},{"id":"6b48a2ff.a8ea3c","type":"switch","z":"a0d5236f.7d257","name":"Active/Inactive","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"active","vt":"str"},{"t":"eq","v":"inactive","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1460,"y":2460,"wires":[[],["473d9685.076ab8"]]},{"id":"910035fe.692fc8","type":"hubitat device","z":"a0d5236f.7d257","name":"Kitchen Wide Motion","server":"e56053d2.c7d11","deviceId":"2759","attribute":"motion","sendEvent":false,"x":1260,"y":2460,"wires":[["6b48a2ff.a8ea3c"]]},{"id":"46332d79.b15bc4","type":"hubitat device","z":"a0d5236f.7d257","name":"Kitchen Beam Motion","server":"e56053d2.c7d11","deviceId":"2376","attribute":"motion","sendEvent":false,"x":860,"y":2460,"wires":[["9e308a92.69c2a8"]]},{"id":"9e308a92.69c2a8","type":"switch","z":"a0d5236f.7d257","name":"Active/Inactive","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"active","vt":"str"},{"t":"eq","v":"inactive","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1060,"y":2460,"wires":[[],["910035fe.692fc8"]]},{"id":"b8bd09de.78a078","type":"within-time-switch","z":"a0d5236f.7d257","name":"8pm-7:15am","nameInt":"","positionConfig":"b3a05d3c.fb68f","startTime":"20:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"07:15","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":650,"y":2460,"wires":[["46332d79.b15bc4"],[]]},{"id":"b3a05d3c.fb68f","type":"position-config","z":"","name":"localPosition","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":"99","timeZoneDST":"0","stateTimeFormat":"3","stateDateFormat":"12"},{"id":"e56053d2.c7d11","type":"hubitat config","z":"","name":"Devices Hub","usetls":false,"host":"10.13.9.11","port":"80","appId":"2532","nodeRedServer":"http://10.13.9.28:1880","webhookPath":"/hubitat/webhook__","autoRefresh":true,"useWebsocket":false}]
3 Likes

Title: Reboot notifier
This flow notifies me when either hub has restarted. It also updates a global variable so I can see at an instant how long the hub has been up. You could modify the inject node for a regularly scheduled reboot if necessary.

Summary

[{"id":"1333bb52.429db5","type":"group","z":"12b33325.27e27d","name":"Hub restart notification","style":{"stroke":"#0070c0","fill":"#bfdbef","label":true,"label-position":"nw","color":"#0070c0"},"nodes":["8f2ea924.bfec08","b9034e29.1868b","32584f53.0a3e3","cb8ac681.d779e8","9ac6a6c6.8de0e8","77463c4c.9da2d4","d4762cac.6c5e1","1db0e593.2ea0ca","f3197161.26456"],"x":394,"y":239,"w":892,"h":122},{"id":"cb12a8bd.1d64c8","type":"subflow","name":"Pushover Mechanical","info":"","category":"","in":[{"x":60,"y":80,"wires":[{"id":"babdbeec.49966"}]}],"out":[],"env":[],"color":"#3FADB5","inputLabels":["Message to send"],"icon":"node-red-contrib-pushover/pushover.svg"},{"id":"f9956a67.deab98","type":"pushover api","z":"cb12a8bd.1d64c8","keys":"9adb152e.dc3bc8","title":"","name":"","x":380,"y":80,"wires":[]},{"id":"babdbeec.49966","type":"change","z":"cb12a8bd.1d64c8","name":"mechanical","rules":[{"t":"set","p":"sound","pt":"msg","to":"mechanical","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":190,"y":80,"wires":[["f9956a67.deab98"]]},{"id":"9adb152e.dc3bc8","type":"pushover-keys","z":"","name":"NR Pushover Key"},{"id":"8f2ea924.bfec08","type":"hubitat location","z":"12b33325.27e27d","g":"1333bb52.429db5","name":"Hub 1","server":"83c9a93c.3e4bf8","x":470,"y":280,"wires":[["b9034e29.1868b"]]},{"id":"b9034e29.1868b","type":"switch","z":"12b33325.27e27d","g":"1333bb52.429db5","name":"systemStart","property":"payload.name","propertyType":"msg","rules":[{"t":"eq","v":"systemStart","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":610,"y":280,"wires":[["1db0e593.2ea0ca"]]},{"id":"32584f53.0a3e3","type":"hubitat location","z":"12b33325.27e27d","g":"1333bb52.429db5","name":"Hub 2","server":"8e2931b3.ce395","x":470,"y":320,"wires":[["cb8ac681.d779e8"]]},{"id":"cb8ac681.d779e8","type":"switch","z":"12b33325.27e27d","g":"1333bb52.429db5","name":"systemStart","property":"payload.name","propertyType":"msg","rules":[{"t":"eq","v":"systemStart","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":610,"y":320,"wires":[["f3197161.26456"]]},{"id":"9ac6a6c6.8de0e8","type":"change","z":"12b33325.27e27d","g":"1333bb52.429db5","name":"Hub 1","rules":[{"t":"set","p":"payload","pt":"msg","to":"Hub 1 has restarted.","tot":"str"},{"t":"set","p":"priority","pt":"msg","to":"-1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":280,"wires":[["d4762cac.6c5e1"]]},{"id":"77463c4c.9da2d4","type":"change","z":"12b33325.27e27d","g":"1333bb52.429db5","name":"Hub 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"Hub 2 has restarted.","tot":"str"},{"t":"set","p":"priority","pt":"msg","to":"-1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":320,"wires":[["d4762cac.6c5e1"]]},{"id":"d4762cac.6c5e1","type":"subflow:cb12a8bd.1d64c8","z":"12b33325.27e27d","g":"1333bb52.429db5","name":"","env":[],"x":1160,"y":300,"wires":[]},{"id":"1db0e593.2ea0ca","type":"moment","z":"12b33325.27e27d","g":"1333bb52.429db5","name":"","topic":"","input":"","inputType":"date","inTz":"America/Indianapolis","adjAmount":0,"adjType":"days","adjDir":"add","format":"LLL","locale":"en_US","output":"hub1Reset","outputType":"global","outTz":"America/Indianapolis","x":800,"y":280,"wires":[["9ac6a6c6.8de0e8"]]},{"id":"f3197161.26456","type":"moment","z":"12b33325.27e27d","g":"1333bb52.429db5","name":"","topic":"","input":"","inputType":"date","inTz":"America/Indianapolis","adjAmount":0,"adjType":"days","adjDir":"add","format":"LLL","locale":"en_US","output":"hub2Reset","outputType":"global","outTz":"America/Indianapolis","x":800,"y":320,"wires":[["77463c4c.9da2d4"]]},{"id":"83c9a93c.3e4bf8","type":"hubitat config","z":"","name":"Hubitat 1","usetls":false,"host":"192.168.4.40","port":"80","appId":"4988","nodeRedServer":"http://192.168.4.198:1880","webhookPath":"/hubitat/webhook_","autoRefresh":true},{"id":"8e2931b3.ce395","type":"hubitat config","z":"","name":"Hubitat 2","usetls":false,"host":"192.168.4.194","port":"80","appId":"196","nodeRedServer":"http://192.168.4.198:1880","webhookPath":"/hubitat2/webhook","autoRefresh":true}]

6 Likes

Title: Device poller
A better way to poll those pre-Z-wave Plus switches. It only polls the device when motion is active in the room. (No one can manually press a switch if they're not in the room.)

Summary

[{"id":"fd187656.080608","type":"inject","z":"f03992cc.3a6bd","g":"42a9e22c.f8cecc","name":"8 sec","repeat":"8","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":1560,"wires":[["8d41f91f.944dc8","c44e9168.69fdc","90576dba.49d0f","f5ea51d9.53c4a","d296c6a0.079838"]]},{"id":"8d41f91f.944dc8","type":"hubitat device","z":"f03992cc.3a6bd","g":"42a9e22c.f8cecc","name":"Motion Kitchen","server":"83c9a93c.3e4bf8","deviceId":"464","attribute":"motion","sendEvent":true,"x":340,"y":1480,"wires":[["eebe0f4f.73c9"]]},{"id":"c44e9168.69fdc","type":"hubitat device","z":"f03992cc.3a6bd","g":"42a9e22c.f8cecc","name":"Motion Back Hall","server":"83c9a93c.3e4bf8","deviceId":"132","attribute":"motion","sendEvent":true,"x":350,"y":1520,"wires":[["28a67605.85544a"]]},{"id":"90576dba.49d0f","type":"hubitat device","z":"f03992cc.3a6bd","g":"42a9e22c.f8cecc","name":"Motion Shower","server":"83c9a93c.3e4bf8","deviceId":"403","attribute":"motion","sendEvent":true,"x":340,"y":1560,"wires":[["e16847d8.a9a318"]]},{"id":"f5ea51d9.53c4a","type":"hubitat device","z":"f03992cc.3a6bd","g":"42a9e22c.f8cecc","name":"Motion Bathroom","server":"83c9a93c.3e4bf8","deviceId":"2195","attribute":"motion","sendEvent":true,"x":350,"y":1600,"wires":[["e16847d8.a9a318"]]},{"id":"d296c6a0.079838","type":"hubitat device","z":"f03992cc.3a6bd","g":"42a9e22c.f8cecc","name":"Office Sensor","server":"83c9a93c.3e4bf8","deviceId":"3062","attribute":"motion","sendEvent":true,"x":340,"y":1640,"wires":[["416e5d51.084c64"]]},{"id":"416e5d51.084c64","type":"switch","z":"f03992cc.3a6bd","g":"42a9e22c.f8cecc","name":"active","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"active","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":510,"y":1640,"wires":[["282b91f.1db986e"]]},{"id":"e16847d8.a9a318","type":"switch","z":"f03992cc.3a6bd","g":"42a9e22c.f8cecc","name":"active","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"active","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":510,"y":1580,"wires":[["f826cde3.9ea0f"]]},{"id":"28a67605.85544a","type":"switch","z":"f03992cc.3a6bd","g":"42a9e22c.f8cecc","name":"active","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"active","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":510,"y":1520,"wires":[["60c66c9.3225294"]]},{"id":"eebe0f4f.73c9","type":"switch","z":"f03992cc.3a6bd","g":"42a9e22c.f8cecc","name":"active","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"active","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":510,"y":1480,"wires":[["4ab6391a.119068"]]},{"id":"4ab6391a.119068","type":"hubitat command","z":"f03992cc.3a6bd","g":"42a9e22c.f8cecc","name":"Kitchen Sink Light","server":"83c9a93c.3e4bf8","deviceId":"467","command":"poll","commandArgs":"","x":690,"y":1480,"wires":[[]]},{"id":"60c66c9.3225294","type":"hubitat command","z":"f03992cc.3a6bd","g":"42a9e22c.f8cecc","name":"Laundry Light","server":"83c9a93c.3e4bf8","deviceId":"270","command":"poll","commandArgs":"","x":680,"y":1520,"wires":[[]]},{"id":"f826cde3.9ea0f","type":"hubitat command","z":"f03992cc.3a6bd","g":"42a9e22c.f8cecc","name":"Shower Light","server":"83c9a93c.3e4bf8","deviceId":"175","command":"poll","commandArgs":"","x":670,"y":1580,"wires":[[]]},{"id":"282b91f.1db986e","type":"hubitat command","z":"f03992cc.3a6bd","g":"42a9e22c.f8cecc","name":"Office Closet Light","server":"83c9a93c.3e4bf8","deviceId":"3574","command":"poll","commandArgs":"","x":690,"y":1640,"wires":[[]]},{"id":"83c9a93c.3e4bf8","type":"hubitat config","z":"","name":"Hubitat 1","usetls":false,"host":"192.168.4.40","port":"80","appId":"4988","nodeRedServer":"http://192.168.4.198:1880","webhookPath":"/hubitat/webhook_","autoRefresh":true}]

5 Likes

Title Office scenes with PC control

Summary -
Part 1 - Work Alarm turns mode to "work Time" at 7:00AM If I am home and if it's a weekday.
Part 2 - Office Scenes when mode changes turn on/ off devices, mute/unmute computer and turn on/off computer monitors. This uses https://assistantcomputercontrol.com/ on a windows machine bypassing IFTT and dropbox by writing directly to a windows share.

discussed here Node-RED work and bed time flows

flow

[
{
"id": "16c8a7d5.e07098",
"type": "tab",
"label": "Week Day Alarm",
"disabled": false,
"info": ""
},
{
"id": "1ed910a2.658ddf",
"type": "cronplus",
"z": "16c8a7d5.e07098",
"name": "weekday 7AM",
"outputField": "payload",
"timeZone": "America/New_York",
"persistDynamic": false,
"commandResponseMsgOutput": "output1",
"outputs": 1,
"options": [
{
"name": "7AM weekday",
"topic": "7AM weekday",
"payloadType": "str",
"payload": "",
"expressionType": "cron",
"expression": "0 7 * * 1-5 ",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
}
],
"x": 120,
"y": 280,
"wires": [
[
"9457d1a7.e9a53"
]
]
},
{
"id": "9457d1a7.e9a53",
"type": "hubitat device",
"z": "16c8a7d5.e07098",
"name": "Pat Richards’s iPhone XS max",
"server": "6b0c5f4f.a782d",
"deviceId": "8",
"attribute": "presence",
"sendEvent": true,
"x": 390,
"y": 280,
"wires": [
[
"eeecdf71.ac468"
]
],
"info": "If Pat's home"
},
{
"id": "eeecdf71.ac468",
"type": "switch",
"z": "16c8a7d5.e07098",
"name": "if present",
"property": "payload.currentValue",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "present",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 650,
"y": 280,
"wires": [
[
"a1dc5328.f6f7b"
]
]
},
{
"id": "a1dc5328.f6f7b",
"type": "hubitat mode-setter",
"z": "16c8a7d5.e07098",
"name": "Set WorkTime",
"server": "6b0c5f4f.a782d",
"modeId": "5",
"x": 860,
"y": 280,
"wires": [
[]
]
},
{
"id": "fb8a7795.755618",
"type": "hubitat mode",
"z": "16c8a7d5.e07098",
"name": "",
"server": "6b0c5f4f.a782d",
"sendEvent": true,
"x": 80,
"y": 440,
"wires": [
[
"3c2864af.26696c"
]
]
},
{
"id": "3c2864af.26696c",
"type": "switch",
"z": "16c8a7d5.e07098",
"name": "",
"property": "payload.value",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "Work Time",
"vt": "str"
},
{
"t": "eq",
"v": "Bed time",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 210,
"y": 440,
"wires": [
[
"2ac28f0b.a1b1b"
],
[
"172b1b3a.ba57b5"
]
]
},
{
"id": "2ac28f0b.a1b1b",
"type": "hubitat command",
"z": "16c8a7d5.e07098",
"name": "Activate Worktime Scene",
"server": "6b0c5f4f.a782d",
"deviceId": "17",
"command": "on",
"commandArgs": "",
"x": 410,
"y": 360,
"wires": [
[
"1ebd0a36.e33af6"
]
]
},
{
"id": "172b1b3a.ba57b5",
"type": "hubitat command",
"z": "16c8a7d5.e07098",
"name": "Actvate Bedtime Scene",
"server": "6b0c5f4f.a782d",
"deviceId": "18",
"command": "on",
"commandArgs": "",
"x": 410,
"y": 480,
"wires": [
[
"5109eb60.350d44"
]
]
},
{
"id": "88df61cd.48dd1",
"type": "file",
"z": "16c8a7d5.e07098",
"name": "Send command to ACC",
"filename": "/mnt/ACC/mute.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 870,
"y": 360,
"wires": [
[
"1f0bffc.264b7"
]
]
},
{
"id": "1ebd0a36.e33af6",
"type": "change",
"z": "16c8a7d5.e07098",
"name": "unmute command",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "mute:false",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 650,
"y": 360,
"wires": [
[
"88df61cd.48dd1"
]
]
},
{
"id": "5109eb60.350d44",
"type": "change",
"z": "16c8a7d5.e07098",
"name": "mute command",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "mute:true",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 640,
"y": 480,
"wires": [
[
"9af79771.648408"
]
]
},
{
"id": "9af79771.648408",
"type": "file",
"z": "16c8a7d5.e07098",
"name": "Send command to ACC",
"filename": "/mnt/ACC/mute.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 870,
"y": 480,
"wires": [
[
"9466b2ed.4dc53"
]
]
},
{
"id": "86b1c8ae.7f64b8",
"type": "file",
"z": "16c8a7d5.e07098",
"name": "Send command to ACC",
"filename": "/mnt/ACC/run.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 870,
"y": 540,
"wires": [
[]
]
},
{
"id": "9466b2ed.4dc53",
"type": "change",
"z": "16c8a7d5.e07098",
"name": "Monitors off",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "open:c:\scratch\screenoff 2.exe",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 630,
"y": 540,
"wires": [
[
"86b1c8ae.7f64b8"
]
]
},
{
"id": "1f0bffc.264b7",
"type": "change",
"z": "16c8a7d5.e07098",
"name": "Monitors on",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "key_shortcut:SPACE",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 630,
"y": 420,
"wires": [
[
"463a73a0.22883c"
]
]
},
{
"id": "463a73a0.22883c",
"type": "file",
"z": "16c8a7d5.e07098",
"name": "Send command to ACC",
"filename": "/mnt/ACC/space.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 870,
"y": 420,
"wires": [
[]
]
},
{
"id": "6b0c5f4f.a782d",
"type": "hubitat config",
"z": "",
"name": "",
"usetls": false,
"host": "192.168.1.74",
"port": "80",
"appId": "45",
"nodeRedServer": "http://192.168.1.74:1880",
"webhookPath": "/hubitat/webhook",
"autoRefresh": true,
"useWebsocket": true
}
]

3 Likes

Can you share the scripts you are using, if they are not 'sensative' (passwords)?

Like mute.txt, and run.txt

no scripts :slight_smile: its in the message payload generated in the change node that precede each send command to ACC

1 Like

Title: Periodic internet speed test

Summary:
This sequence keeps track of my internet speed (every hour) and plots the data out in NR dashboard. I'm posting it because it gives a simple example of how to save and retrieve data.

Summary

[{"id":"f11a13be.36e21","type":"simpletime","z":"641677fe.7efb8","name":"","x":410,"y":660,"wires":[["c48f441a.c64868","12bb40d7.cee35f"]]},{"id":"c48f441a.c64868","type":"template","z":"641677fe.7efb8","name":"time","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{mydate}} {{mytimes}}","output":"str","x":650,"y":620,"wires":[["ef753891.93342"]]},{"id":"12bb40d7.cee35f","type":"switch","z":"641677fe.7efb8","name":"down < 100","property":"payload.speeds.download","propertyType":"msg","rules":[{"t":"lt","v":"100","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":670,"y":820,"wires":[["ff368af4.ae96d"]]},{"id":"9e3f58fe.e530e","type":"speedtest","z":"641677fe.7efb8","name":"Speedtest","serverId":"","maxTime":"120000","x":410,"y":600,"wires":[["aa623598.74eb98","b2a90ab2.32421","dbc3c3e7.20861","6755d730.02674","a012c307.cb4028","f11a13be.36e21"]]},{"id":"ef753891.93342","type":"ui_text","z":"641677fe.7efb8","group":"2a046f7e.21973","order":6,"width":0,"height":0,"name":"Last Speedtest","label":"Last Speedtest","format":"<font color=\"cyan\">{{msg.payload}}</font>","layout":"col-center","x":920,"y":620,"wires":[]},{"id":"ff368af4.ae96d","type":"change","z":"641677fe.7efb8","name":"Speed Test","rules":[{"t":"set","p":"topic","pt":"msg","to":"Speed Test","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":850,"y":820,"wires":[["aa219933.4c2e6"]]},{"id":"aa623598.74eb98","type":"change","z":"641677fe.7efb8","name":"download","rules":[{"t":"set","p":"topic","pt":"msg","to":"Download","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload.speeds.download","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":540,"wires":[["b61f1f5e.41d8b8","288318fc.e25458"]]},{"id":"b2a90ab2.32421","type":"change","z":"641677fe.7efb8","name":"upload","rules":[{"t":"set","p":"topic","pt":"msg","to":"Upload","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload.speeds.upload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":580,"wires":[["bd35f52c.df077","288318fc.e25458"]]},{"id":"dbc3c3e7.20861","type":"change","z":"641677fe.7efb8","name":"ping","rules":[{"t":"set","p":"topic","pt":"msg","to":"Ping","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload.server.ping","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":660,"wires":[["8b605dac.f72bd","1ee5385b.d78bb"]]},{"id":"6755d730.02674","type":"change","z":"641677fe.7efb8","name":"distance","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.server.distanceMi","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"Distance","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":700,"wires":[["4402db66.176ac4","1ee5385b.d78bb"]]},{"id":"a012c307.cb4028","type":"change","z":"641677fe.7efb8","name":"ISP","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.server.sponsor","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":740,"wires":[["ce98fa70.5faaa"]]},{"id":"9015ffc1.ef6a1","type":"ui_button","z":"641677fe.7efb8","name":"","group":"2a046f7e.21973","order":3,"width":0,"height":0,"label":"SpeedTest Now!","color":"","icon":"","payload":"","payloadType":"date","topic":"","x":190,"y":560,"wires":[["9e3f58fe.e530e"]]},{"id":"5493692d.1d584","type":"cronplus","z":"641677fe.7efb8","name":"5 minutes past the hour","outputField":"payload","timeZone":"","outputs":1,"options":[{"topic":"5 past every hour","payload":"start","type":"str","expression":"5 * * * *","name":"5 past every hour"}],"x":170,"y":640,"wires":[["9e3f58fe.e530e"]]},{"id":"aa219933.4c2e6","type":"template","z":"641677fe.7efb8","name":"SMS","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Internet speed was {{payload.speeds.download}}/{{payload.speeds.upload}} (down/up Mbits/s) at {{mytimes}} on {{mymonthn}}/{{mydom}}. Speedtest server was {{payload.server.sponsor}}.","output":"str","x":1010,"y":820,"wires":[["5b712b3b.4d3b0c"]]},{"id":"b61f1f5e.41d8b8","type":"ui_gauge","z":"641677fe.7efb8","name":"","group":"2a046f7e.21973","order":7,"width":0,"height":0,"gtype":"gage","title":"Download Speed","label":"Download Mbits","format":"{{value}}","min":0,"max":"150","colors":["#ff002d","#e4b400","#03f81f"],"seg1":"50","seg2":"100","x":930,"y":540,"wires":[]},{"id":"288318fc.e25458","type":"ui_chart","z":"641677fe.7efb8","name":"Performance Chart","group":"6dbda234.52c8cc","order":2,"width":12,"height":6,"label":"Performance Chart","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"2","removeOlderPoints":"","removeOlderUnit":"86400","cutout":"","useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"x":930,"y":340,"wires":[["4860da2.4f503a4"]]},{"id":"bd35f52c.df077","type":"ui_gauge","z":"641677fe.7efb8","name":"","group":"2a046f7e.21973","order":8,"width":0,"height":0,"gtype":"gage","title":"Upload Speed","label":"Upload MBits","format":"{{value}}","min":0,"max":"15","colors":["#ff002d","#ffed36","#03f81f"],"seg1":"2","seg2":"8","x":920,"y":580,"wires":[]},{"id":"8b605dac.f72bd","type":"ui_text","z":"641677fe.7efb8","group":"2a046f7e.21973","order":4,"width":0,"height":0,"name":"","label":"Ping Time","format":"<font color=\"cyan\">{{msg.payload}}</font>","layout":"col-center","x":910,"y":660,"wires":[]},{"id":"1ee5385b.d78bb","type":"ui_chart","z":"641677fe.7efb8","name":"Latency Chart","group":"6dbda234.52c8cc","order":4,"width":12,"height":6,"label":"Latency Chart","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"2","removeOlderPoints":"","removeOlderUnit":"86400","cutout":"","useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"x":920,"y":460,"wires":[["84fc2070.d9275"]]},{"id":"4402db66.176ac4","type":"ui_text","z":"641677fe.7efb8","group":"2a046f7e.21973","order":5,"width":0,"height":0,"name":"","label":"Distance","format":"<font color=\"cyan\">{{msg.payload}} mi</font>","layout":"col-center","x":900,"y":700,"wires":[]},{"id":"ce98fa70.5faaa","type":"ui_text","z":"641677fe.7efb8","group":"2a046f7e.21973","order":2,"width":0,"height":0,"name":"","label":"Hosted By","format":"<font color=\"cyan\">{{msg.payload}}</font>","layout":"col-center","x":910,"y":740,"wires":[]},{"id":"5b712b3b.4d3b0c","type":"e-mail","z":"641677fe.7efb8","server":"localhost","port":"25","secure":false,"tls":false,"name":"5042727138@msg.fi.google.com","dname":"SMS Notification","x":1190,"y":820,"wires":[]},{"id":"4860da2.4f503a4","type":"file","z":"641677fe.7efb8","name":"Speed Test Data Save","filename":"/home/odroid/.node-red/data/speedtest/speedtestData.json","appendNewline":false,"createDir":false,"overwriteFile":"true","encoding":"none","x":1180,"y":340,"wires":[[]]},{"id":"976aad37.93366","type":"json","z":"641677fe.7efb8","name":"","x":1150,"y":280,"wires":[["288318fc.e25458"]]},{"id":"84fc2070.d9275","type":"file","z":"641677fe.7efb8","name":"Speed Test Data Save","filename":"/home/odroid/.node-red/data/speedtest/speedtestDataPD.json","appendNewline":false,"createDir":false,"overwriteFile":"true","x":1180,"y":420,"wires":[[]]},{"id":"1b6007eb.95fd98","type":"json","z":"641677fe.7efb8","name":"","x":1150,"y":520,"wires":[["1ee5385b.d78bb"]]},{"id":"559e7829.3d7fb","type":"file in","z":"641677fe.7efb8","name":"Speed Test Data Restore","filename":"/home/odroid/.node-red/data/speedtest/speedtestData.json","format":"utf8","x":1190,"y":380,"wires":[["976aad37.93366"]]},{"id":"1d72d587.de0bd2","type":"file in","z":"641677fe.7efb8","name":"Speed Test Data Restore","filename":"/home/odroid/.node-red/data/speedtest/speedtestDataPD.json","format":"utf8","x":1190,"y":460,"wires":[["1b6007eb.95fd98"]]},{"id":"e65149c6.542d","type":"inject","z":"641677fe.7efb8","name":"","repeat":"","crontab":"","once":true,"topic":"","payload":"restore","payloadType":"str","x":920,"y":400,"wires":[["559e7829.3d7fb","1d72d587.de0bd2"]]},{"id":"2a046f7e.21973","type":"ui_group","z":"","name":"Graphs","tab":"929d3236.90d2","order":1,"disp":false,"width":"6","collapse":false},{"id":"6dbda234.52c8cc","type":"ui_group","z":"","name":"Charts","tab":"929d3236.90d2","order":2,"disp":false,"width":"12","collapse":false},{"id":"929d3236.90d2","type":"ui_tab","z":"","name":"Internet Speed","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

13 Likes

Title - Backup Node Red

Summary
This flow is one I found, I'm not sure where though so unable to credit the person who created it. But thought it useful after I trashed my Node Red recently, due to an oversight on my part (oops).

This requires a piece of software installing on your PI called Resilio.
Instructions can be found here. You can also install on Windows too on their main website here.

To configure, browse to you PI IP and port 8888, you can then set up the pairing, and share the key to yourself, for another machine to access your backups.

The flow

You can modify the paths accordingly in the nodes "backup .node-red" and "delete older than 7 days" (and the number of days to keep). I added Pushover and receive a nice message when complete. Which I use as a reminder to copy the backup back.

The Flow

[{"id":"cad1c731.992228","type":"tab","label":"Pi-Backup","disabled":false,"info":"Rotating backup of .node-red folder"},{"id":"9f50db03.848e48","type":"exec","z":"cad1c731.992228","command":"sudo zip -rq /home/royski/sync/Backups/node-red-pi4-backup-$(date +%Y-%m-%d).zip /home/royski/.node-red","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"backup .node-red","x":410,"y":40,"wires":[["ef8d10db.d8e83"],["ef8d10db.d8e83"],["1bd3ae23.6e9f22"]]},{"id":"a7b79704.1505c8","type":"inject","z":"cad1c731.992228","name":"daily @2200","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 22 * * ","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":40,"wires":[["9f50db03.848e48"]]},{"id":"ad21052b.df89d8","type":"debug","z":"cad1c731.992228","name":"backup-log","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":990,"y":120,"wires":[]},{"id":"1bd3ae23.6e9f22","type":"switch","z":"cad1c731.992228","name":"check op success","property":"payload.code","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":230,"y":180,"wires":[["b329b40c.035f38"],["45de1bdb.02cd24"]]},{"id":"b329b40c.035f38","type":"exec","z":"cad1c731.992228","command":"sudo find /home/royski/sync/Backups/.zip -mtime +7 -type f -delete","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"delete older than 7 days","x":470,"y":140,"wires":[["ef8d10db.d8e83"],["ef8d10db.d8e83"],["954f68c7.dc2988"]]},{"id":"45de1bdb.02cd24","type":"change","z":"cad1c731.992228","name":"custom error msg","rules":[{"t":"set","p":"payload","pt":"msg","to":":red_circle: There was an error in Pi4 backup flow. Check logs.","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":260,"wires":[["ad21052b.df89d8","a45d5a55.614c48"]]},{"id":"954f68c7.dc2988","type":"switch","z":"cad1c731.992228","name":"check op success","property":"payload.code","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":490,"y":200,"wires":[["17260390.570bec"],["45de1bdb.02cd24"]]},{"id":"17260390.570bec","type":"template","z":"cad1c731.992228","name":"success msg","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":":white_check_mark: RPi4 Backup compelete.","output":"str","x":750,"y":120,"wires":[["ad21052b.df89d8","a45d5a55.614c48"]]},{"id":"ef8d10db.d8e83","type":"switch","z":"cad1c731.992228","name":"filter null","property":"payload","propertyType":"msg","rules":[{"t":"nnull"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":660,"y":40,"wires":[["ad21052b.df89d8"],[]]},{"id":"a45d5a55.614c48","type":"pushover api","z":"cad1c731.992228","keys":"54ad51a1.76db6","title":"","name":"","x":960,"y":260,"wires":[]},{"id":"54ad51a1.76db6","type":"pushover-keys","z":"","name":"Pushover"}]

The backup is scheduled, but can be changed in the first node, and executes here at 22:00 every day.

4 Likes

27 posts were split to a new topic: What platforms are folks running Node-Red on?

Title: Setting the mode when the maid arrives and leaves

Summary:
My maid doesn't like to work when I'm at home. But I want the house to be comfortable etc. when she comes here. So I set the mode to Home mode when she uses her key code (also get notified by SMS that she has arrived). I also set a global variable called "maid switch" to be on when she arrives. Similarly, when she leaves, I set the mode to be Away (if I am also away), and set "maid switch" to be off. The maid switch global variable is used to prevent motion lighting sequences from running while she's here.

Summary

[{"id":"3c08dd61.fb19fa","type":"comment","z":"bb5edffe.27e038","name":"Maid's lock code turns on Home mode (via MQTT) and Maid global variable (via MQTT). Also sends me an SMS.","info":"","x":430,"y":620,"wires":[]},{"id":"99473dd5.c0c138","type":"hubitat device","z":"bb5edffe.27e038","name":"Front Door Lock","server":"a22e0ea9.276dc8","deviceId":"1219","attribute":"lastCodeName","sendEvent":true,"x":140,"y":737,"wires":[["d792b281.1c7338"]]},{"id":"d792b281.1c7338","type":"switch","z":"bb5edffe.27e038","name":"Maid's code","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"Pattie Poehl","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":330,"y":737,"wires":[["f06444a.681b6b8","363507d.56160f8","dde624a.c8cd958"]]},{"id":"a620554b.47e9f8","type":"switch","z":"bb5edffe.27e038","name":"off","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":310,"y":1140,"wires":[["cb00eedc.83c16"]]},{"id":"cb00eedc.83c16","type":"hubitat device","z":"bb5edffe.27e038","name":"Ashok's Combined Presence","server":"662851c4.3ccad","deviceId":"2475","attribute":"presence","sendEvent":false,"x":520,"y":1140,"wires":[["e5351536.64c718"]]},{"id":"e5351536.64c718","type":"switch","z":"bb5edffe.27e038","name":"not present","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"not present","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":750,"y":1140,"wires":[["fbfb3ea5.4b1b1"]]},{"id":"7ee04fa.91fc2b","type":"switch","z":"bb5edffe.27e038","name":"button","property":"payload.descriptionText","propertyType":"msg","rules":[{"t":"cont","v":"button","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":990,"y":940,"wires":[["ab84a1a0.3506f8","f6c63738.bfcb98"]]},{"id":"83125a3a.360738","type":"switch","z":"bb5edffe.27e038","name":"locked","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"locked","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":850,"y":940,"wires":[["7ee04fa.91fc2b"]]},{"id":"ab84a1a0.3506f8","type":"change","z":"bb5edffe.27e038","name":"topic","rules":[{"t":"set","p":"topic","pt":"msg","to":"Pattie Poehl status","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":1000,"wires":[["3f430222.6cf72e"]]},{"id":"3f430222.6cf72e","type":"simpletime","z":"bb5edffe.27e038","name":"","x":950,"y":1000,"wires":[["641deb38.d130f4"]]},{"id":"c72e4492.76603","type":"switch","z":"bb5edffe.27e038","name":"maid_status = on","property":"pp_status","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":670,"y":940,"wires":[["83125a3a.360738"]]},{"id":"641deb38.d130f4","type":"template","z":"bb5edffe.27e038","name":"SMS","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Pattie Poehl left at {{mytimes}} on {{mymonthn}}/{{mydom}}.","output":"str","x":1110,"y":1000,"wires":[["9701371.e9c0d48"]]},{"id":"9701371.e9c0d48","type":"link out","z":"bb5edffe.27e038","name":"SMS-out","links":["67fd4532.52d0e4"],"x":1215,"y":1000,"wires":[]},{"id":"6163fdea.92a344","type":"hubitat device","z":"bb5edffe.27e038","name":"Front Door Lock","server":"a22e0ea9.276dc8","deviceId":"1219","attribute":"","sendEvent":true,"x":140,"y":940,"wires":[["8e53d7d.2c9d6a8"]]},{"id":"8e53d7d.2c9d6a8","type":"time-range-switch","z":"bb5edffe.27e038","name":"11:00-15:00","lat":"29.977091","lon":"-90.143000","startTime":"11:00","endTime":"15:00","startOffset":0,"endOffset":0,"x":330,"y":940,"wires":[["932e2a41.490068"],[]]},{"id":"932e2a41.490068","type":"weekday","z":"bb5edffe.27e038","name":"M-F","sun":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":false,"x":490,"y":940,"wires":[["c72e4492.76603"],[]]},{"id":"9d464d55.a36148","type":"comment","z":"bb5edffe.27e038","name":"Front door locked using button on the outside on M-F (11am-3pm) if the Maid global variable was on, sets the variable to off (via MQTT) and sends me a text","info":"","x":570,"y":880,"wires":[]},{"id":"41a4c581.08a0f4","type":"comment","z":"bb5edffe.27e038","name":"Maid global variable being set to off when I am away will turn on Away mode","info":"","x":310,"y":1080,"wires":[]},{"id":"f06444a.681b6b8","type":"change","z":"bb5edffe.27e038","name":"topic","rules":[{"t":"set","p":"topic","pt":"msg","to":"Pattie Poehl status","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":737,"wires":[["9943c928.172678"]]},{"id":"9943c928.172678","type":"simpletime","z":"bb5edffe.27e038","name":"","x":650,"y":737,"wires":[["74c72516.e2fb2c"]]},{"id":"74c72516.e2fb2c","type":"template","z":"bb5edffe.27e038","name":"SMS","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Pattie Poehl arived at {{mytimes}} on {{mymonthn}}/{{mydom}}.","output":"str","x":810,"y":737,"wires":[["eaf3c2c4.54562"]]},{"id":"eaf3c2c4.54562","type":"link out","z":"bb5edffe.27e038","name":"SMS-out","links":["67fd4532.52d0e4"],"x":915,"y":737,"wires":[]},{"id":"b8bba3d5.32c01","type":"switch","z":"bb5edffe.27e038","name":"maid_status = off","property":"pp_status","propertyType":"global","rules":[{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1090,"y":1140,"wires":[["301416e1.17ef2a"]]},{"id":"fbfb3ea5.4b1b1","type":"delay","z":"bb5edffe.27e038","name":"5m","pauseType":"delay","timeout":"5","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":910,"y":1140,"wires":[["b8bba3d5.32c01"]]},{"id":"363507d.56160f8","type":"change","z":"bb5edffe.27e038","name":"home","rules":[{"t":"set","p":"payload","pt":"msg","to":"home","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":685,"wires":[["5b10d719.8cc428"]]},{"id":"5b10d719.8cc428","type":"mqtt out","z":"bb5edffe.27e038","name":"mode","topic":"mode","qos":"2","retain":"false","broker":"40144fb8.a1c1e","x":630,"y":685,"wires":[]},{"id":"301416e1.17ef2a","type":"change","z":"bb5edffe.27e038","name":"away","rules":[{"t":"set","p":"payload","pt":"msg","to":"away","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1270,"y":1140,"wires":[["539b816e.69def"]]},{"id":"539b816e.69def","type":"mqtt out","z":"bb5edffe.27e038","name":"mode","topic":"mode","qos":"2","retain":"false","broker":"40144fb8.a1c1e","x":1410,"y":1140,"wires":[]},{"id":"16193ab2.624a7d","type":"mqtt out","z":"bb5edffe.27e038","name":"maid","topic":"switch/maid","qos":"2","retain":"false","broker":"40144fb8.a1c1e","x":1270,"y":940,"wires":[]},{"id":"94f91fc7.32cef8","type":"mqtt out","z":"bb5edffe.27e038","name":"maid","topic":"switch/maid","qos":"2","retain":"false","broker":"40144fb8.a1c1e","x":630,"y":785,"wires":[]},{"id":"8f338150.94dbe8","type":"mqtt in","z":"bb5edffe.27e038","name":"maid","topic":"switch/maid","qos":"2","datatype":"auto","broker":"40144fb8.a1c1e","x":170,"y":1140,"wires":[["a620554b.47e9f8"]]},{"id":"f6c63738.bfcb98","type":"change","z":"bb5edffe.27e038","name":"off","rules":[{"t":"set","p":"payload","pt":"msg","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1130,"y":940,"wires":[["16193ab2.624a7d"]]},{"id":"dde624a.c8cd958","type":"change","z":"bb5edffe.27e038","name":"on","rules":[{"t":"set","p":"payload","pt":"msg","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":785,"wires":[["94f91fc7.32cef8"]]},{"id":"a22e0ea9.276dc8","type":"hubitat config","z":"","name":"HubitatM","usetls":false,"host":"192.168.1.46","port":"80","appId":"1522","nodeRedServer":"http://192.168.1.4:1880","webhookPath":"/hubitat/webhook","autoRefresh":true,"useWebsocket":false},{"id":"662851c4.3ccad","type":"hubitat config","z":"","name":"HubitatS","usetls":false,"host":"192.168.1.36","port":"80","appId":"4489","nodeRedServer":"http://192.168.1.4:1880","webhookPath":"/hubitat/webhook2","autoRefresh":true,"useWebsocket":false},{"id":"40144fb8.a1c1e","type":"mqtt-broker","z":"","name":"","broker":"127.0.0.1","port":"1883","tls":"","clientid":"","usetls":false,"compatmode":false,"keepalive":"15","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeRetain":"false","closePayload":"","willTopic":"","willQos":"0","willRetain":"false","willPayload":""}]

4 Likes

@aaiyar ok I tried copy and pasting the net monitoring flow and am getting an unexpected token at 2060 font color="cyan">{{msg.

any ideas

1 Like

Yep me too.

It's the first one you post, internet speed test

Waiting in line - will fix it when I’m back home. Basically, its a linkout to an email node that sends me an SMS.

1 Like

Title - All Lux events on 1 trigger

Summary - very basic, but posting as an idea that you can have all your lux based events on one lux trigger rather than using many. This could help minimize processing time, and allow all flows to operate smoother (in theory). For me it also helps troubleshooting. Also using Groups and colors to know which is an On/Off group

Flow

[{"id":"892e3f54.4c9e3","type":"group","z":"3e9ba05f.df3bc","name":"","style":{"stroke":"#999999","fill":"#bfdbef","fill-opacity":"0.47","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["95c0fdb.5b485","c08812cf.47394","dc7da0cf.7122c","e969ed8e.eac46","3df09ee1.4898d2","6f089d3c.c1f6f4","533b7de2.542fb4","2abcab9c.915934","29def96f.4d8636","d5aca7ad.c83d18","2628c75e.a7bd18","2aee9a01.736f96"],"x":34,"y":139,"w":1572,"h":222},{"id":"95c0fdb.5b485","type":"switch","z":"3e9ba05f.df3bc","g":"892e3f54.4c9e3","name":"+/- 1 Lux","property":"payload.value","propertyType":"msg","rules":[{"t":"gt","v":"1","vt":"str"},{"t":"lt","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":440,"y":320,"wires":[["c08812cf.47394"],[]]},{"id":"c08812cf.47394","type":"hubitat command","z":"3e9ba05f.df3bc","g":"892e3f54.4c9e3","name":"Mnt Multch Light Off","server":"e40ec0b5.83be","deviceId":"526","command":"off","commandArgs":"","x":640,"y":320,"wires":[[]]},{"id":"dc7da0cf.7122c","type":"switch","z":"3e9ba05f.df3bc","g":"892e3f54.4c9e3","name":"On?","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":710,"y":220,"wires":[["533b7de2.542fb4"]]},{"id":"e969ed8e.eac46","type":"switch","z":"3e9ba05f.df3bc","g":"892e3f54.4c9e3","name":"+/- 100","property":"payload.value","propertyType":"msg","rules":[{"t":"lt","v":"100","vt":"str"},{"t":"gt","v":"100","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1080,"y":220,"wires":[["d5aca7ad.c83d18"],[]]},{"id":"3df09ee1.4898d2","type":"hubitat command","z":"3e9ba05f.df3bc","g":"892e3f54.4c9e3","name":"Family Room - Bias Lighting On","server":"e40ec0b5.83be","deviceId":"2631","command":"on","commandArgs":"","x":1450,"y":220,"wires":[[]]},{"id":"6f089d3c.c1f6f4","type":"hubitat device","z":"3e9ba05f.df3bc","g":"892e3f54.4c9e3","name":"Living Room - -Harmoney Hub","server":"cd3ac91b.fa39d8","deviceId":"257","attribute":"switch","sendEvent":false,"x":510,"y":220,"wires":[["dc7da0cf.7122c"]]},{"id":"533b7de2.542fb4","type":"hubitat device","z":"3e9ba05f.df3bc","g":"892e3f54.4c9e3","name":"Front Porch Lux","server":"e40ec0b5.83be","deviceId":"455","attribute":"illuminance","sendEvent":false,"x":860,"y":220,"wires":[["2abcab9c.915934"]]},{"id":"2abcab9c.915934","type":"rbe","z":"3e9ba05f.df3bc","g":"892e3f54.4c9e3","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":975,"y":220,"wires":[["e969ed8e.eac46"]],"l":false},{"id":"29def96f.4d8636","type":"hubitat device","z":"3e9ba05f.df3bc","g":"892e3f54.4c9e3","name":"Front Porch Lux","server":"e40ec0b5.83be","deviceId":"455","attribute":"illuminance","sendEvent":true,"x":140,"y":320,"wires":[["6f089d3c.c1f6f4","95c0fdb.5b485"]]},{"id":"d5aca7ad.c83d18","type":"hubitat command","z":"3e9ba05f.df3bc","g":"892e3f54.4c9e3","name":"Set to 25%","server":"e40ec0b5.83be","deviceId":"2631","command":"setLevel","commandArgs":"25","x":1230,"y":220,"wires":[["3df09ee1.4898d2"]]},{"id":"2628c75e.a7bd18","type":"comment","z":"3e9ba05f.df3bc","g":"892e3f54.4c9e3","name":"TV Bias Lighting ON at dark if TV was on before dark","info":"","x":570,"y":180,"wires":[]},{"id":"2aee9a01.736f96","type":"comment","z":"3e9ba05f.df3bc","g":"892e3f54.4c9e3","name":"Mount Multh Off when day light","info":"","x":510,"y":280,"wires":[]},{"id":"e40ec0b5.83be","type":"hubitat config","z":"","name":"Devices Hub","usetls":false,"host":"10.13.9.11","port":"80","appId":"2532","nodeRedServer":"http://10.13.9.15:1880","webhookPath":"/hubitat/webhook","autoRefresh":true,"useWebsocket":false},{"id":"cd3ac91b.fa39d8","type":"hubitat config","z":"","name":"Apps Hub","usetls":false,"host":"10.13.9.12","port":"80","appId":"899","nodeRedServer":"http://10.13.9.15:1880","webhookPath":"/hubitat/webhook___","autoRefresh":true,"useWebsocket":false}]

1 Like

A lot of things to learn here thank you everyone.

1 Like

@TechMedX @pat.richards

Sorry for the delay. Gone over to spend Friday night with my godson and his parents. With a dozen Krispy Kreme donuts (think I'm lying - ask @april.brandt - I sent her video skyped her while waiting in line for one whole hour!).

Here's the part that's missing from both the sequences that I posted above:

Summary

[{"id":"78b9084e.935e2","type":"e-mail","z":"6badeeaa.cb9518","server":"localhost","port":"25","secure":false,"tls":false,"name":"5042727138@msg.fi.google.com","dname":"SMS Notification","x":750,"y":1160,"wires":[]},{"id":"67fd4532.52d0e4","type":"link in","z":"6badeeaa.cb9518","name":"SMS-in","links":["2e3271f3.42e9be","422e0d17.3032a4","c932aab.1bb8fd8","aa45f9ea.b2fbc8","cf9097fd.a158a8","3c8c9fab.8e114","7d540651.415d88","da5eea2.6ba5098","ebcf3eae.d42478","6eb7b011.78713","4683f5e2.ab0b74","e0970025.c70f18","a2d34170.2cc12","4f40776b.8fd0c","f48f9ffb.182e1","49bcf55e.f16744","14d97c87.6e95d3","68859b84.6b280c","20caca0d.100d9e","fc5950de.b235","35481e59.802562","a6bbfea4.4396a","b118f2ac.a6e25","2999bfe8.73de68","ca807e0e.c358d8","c5881a95.4c5ae","ad8be50f.a61a1","99c8f064.7e33c8","d1a330e.c2a2ed","84508d27.afb278","3e51173d.baa278","9588f2c7.86342","87d8486d.b3309","544741ea.cd94d8","3d9b6fca.7fac2","bdd18ede.d5c6a8","33976a29.61f596","ac249be8.1d6868","c46003d7.5cfc38","9701371.e9c0d48","5e636255.6b5b6c","c4e379a5.8244a8","eaf3c2c4.54562","cdc220c7.3ee598","107fe150.d2e157","ab5560ba.d61b98","d49d9e27.4c2008","f6482c7.ad570d","a18e470f.6f8bf","3f3ae1aa.ff4246","c34e3c47.50b0d8","c55cbcac.76832","be415b8c.8405f","532d3ae9.823684","2dd0e288.9f4876","11a88d1d.b7c843","45682217.091ddc","b236688d.49048","22c0ccbf.2bc3fc","6319926a.216ddc","dd7ef8b5.bb007","fb96c6c2.75906","ce9eb216.30e02","f446c605.1feee"],"x":575,"y":1160,"wires":[["78b9084e.935e2"]]}]

2 Likes

I can attest to that as long as you don't tattle on me for skype-n-driving. My husband tells me that it's their anniversary today and that you can get TWO DOZEN for the price of one. @aaiyar you're holding out?

2 Likes

Hour seriously? Guess I take Krispy Kreme for granted growing up near where they got started. Was interesting to watch when I lived in CA as they were opening stores and people would be carrying 2 dozen in the airport as if they were precious goods.

2 Likes

I did get two dozen. I gave one dozen to my godson's parents (mom is expecting his younger brother). I gave half-a-dozen to a medical resident that lives down the street. Not sure what happened to the last half-dozen. Couldn't be me - I'm diabetic.

3 Likes