Bondhome.io in Node-RED

Hi All,

I figured i’d pass this on to anyone also interested. I put this together using elements from another article I found online and it’s been great. All the heavy lifting is done in Node-RED and you can bring in virtual sensors from anywhere or don’t it’s really your choice. In our house we don’t use the remotes or the bondhome app so I don’t bother updating the virtual sensors only use them to make the commands so edit as you feel free and share back here for others.

[{"id":"9150e92d64a2c5fb","type":"tab","label":"Bondhome.io","disabled":false,"info":""},{"id":"9e526ea2.3e5eb8","type":"switch","z":"9150e92d64a2c5fb","name":"Error?","property":"rc.code","propertyType":"msg","rules":[{"t":"gt","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":810,"y":200,"wires":[["960bade0eb8d4f2e"]]},{"id":"962210ca.8017e","type":"exec","z":"9150e92d64a2c5fb","command":"","addpay":"payload","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Curl","x":670,"y":200,"wires":[[],[],["9e526ea2.3e5eb8"]]},{"id":"969b04fb.127f78","type":"comment","z":"9150e92d64a2c5fb","name":"Set topics for Bondhome.io flow","info":"","x":150,"y":60,"wires":[]},{"id":"3d5a80f8.6f6cd","type":"template","z":"9150e92d64a2c5fb","name":"Fans","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"curl -H \"BOND-Token: {{token}}\" -X PUT -i http://{{host}}/v2/devices/{{id}}/actions/{{command}} -d {}\n","output":"str","x":510,"y":200,"wires":[["962210ca.8017e"]]},{"id":"b0115be.8060d28","type":"template","z":"9150e92d64a2c5fb","name":"Fans/Shades","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"curl -H \"BOND-Token: {{token}}\" -i http://{{host}}/v2/devices/{{id}}/actions/{{command}} -X PUT -d \"{\\\"argument\\\": {{argument}}}\"\n","output":"str","x":530,"y":300,"wires":[["962210ca.8017e"]]},{"id":"2cfb3178.206bde","type":"change","z":"9150e92d64a2c5fb","name":"off","rules":[{"t":"set","p":"host","pt":"msg","to":"host","tot":"flow"},{"t":"set","p":"id","pt":"msg","to":"id","tot":"flow"},{"t":"set","p":"token","pt":"msg","to":"token","tot":"flow"},{"t":"set","p":"command","pt":"msg","to":"TurnOff","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":240,"wires":[["3d5a80f8.6f6cd"]]},{"id":"441c03bc.2e73d4","type":"change","z":"9150e92d64a2c5fb","name":"reverse","rules":[{"t":"set","p":"host","pt":"msg","to":"host","tot":"flow"},{"t":"set","p":"id","pt":"msg","to":"id","tot":"flow"},{"t":"set","p":"token","pt":"msg","to":"token","tot":"flow"},{"t":"set","p":"command","pt":"msg","to":"ToggleDirection","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":200,"wires":[["3d5a80f8.6f6cd"]]},{"id":"a52094417199e7f1","type":"change","z":"9150e92d64a2c5fb","name":"set token and host","rules":[{"t":"set","p":"token","pt":"flow","to":"YOURBONDTOKEN","tot":"str"},{"t":"set","p":"host","pt":"flow","to":"YOURBONDIP","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":100,"wires":[[]]},{"id":"7e90fc6447cdd675","type":"change","z":"9150e92d64a2c5fb","name":"low","rules":[{"t":"set","p":"host","pt":"msg","to":"host","tot":"flow"},{"t":"set","p":"id","pt":"msg","to":"id","tot":"flow"},{"t":"set","p":"token","pt":"msg","to":"token","tot":"flow"},{"t":"set","p":"command","pt":"msg","to":"SetSpeed","tot":"str"},{"t":"set","p":"argument","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":300,"wires":[["b0115be.8060d28"]]},{"id":"67999b2957a9cea1","type":"switch","z":"9150e92d64a2c5fb","name":"status?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"auto","vt":"str"},{"t":"eq","v":"off","vt":"str"},{"t":"eq","v":"low","vt":"str"},{"t":"eq","v":"medium-low","vt":"str"},{"t":"eq","v":"medium","vt":"str"},{"t":"eq","v":"medium-high","vt":"str"},{"t":"eq","v":"high","vt":"str"},{"t":"eq","v":"open","vt":"str"},{"t":"eq","v":"closed","vt":"str"},{"t":"eq","v":"preset","vt":"str"}],"checkall":"true","repair":false,"outputs":10,"x":180,"y":260,"wires":[["441c03bc.2e73d4"],["2cfb3178.206bde"],["7e90fc6447cdd675"],["d73908a5a59db1c6"],["52c8e20781513d03"],["bb7df5bf0ca72258"],["6b4c9caa4e062e37"],["5462460ca2d09b34"],["5e9a571e20e5cde7"],["451f361ff3727187"]]},{"id":"52c8e20781513d03","type":"change","z":"9150e92d64a2c5fb","name":"medium","rules":[{"t":"set","p":"host","pt":"msg","to":"host","tot":"flow"},{"t":"set","p":"id","pt":"msg","to":"id","tot":"flow"},{"t":"set","p":"token","pt":"msg","to":"token","tot":"flow"},{"t":"set","p":"command","pt":"msg","to":"SetSpeed","tot":"str"},{"t":"set","p":"argument","pt":"msg","to":"3","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":380,"wires":[["b0115be.8060d28"]]},{"id":"d73908a5a59db1c6","type":"change","z":"9150e92d64a2c5fb","name":"medium-low","rules":[{"t":"set","p":"host","pt":"msg","to":"host","tot":"flow"},{"t":"set","p":"id","pt":"msg","to":"id","tot":"flow"},{"t":"set","p":"token","pt":"msg","to":"token","tot":"flow"},{"t":"set","p":"command","pt":"msg","to":"SetSpeed","tot":"str"},{"t":"set","p":"argument","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":340,"wires":[["b0115be.8060d28"]]},{"id":"bb7df5bf0ca72258","type":"change","z":"9150e92d64a2c5fb","name":"midium-high","rules":[{"t":"set","p":"host","pt":"msg","to":"host","tot":"flow"},{"t":"set","p":"id","pt":"msg","to":"id","tot":"flow"},{"t":"set","p":"token","pt":"msg","to":"token","tot":"flow"},{"t":"set","p":"command","pt":"msg","to":"SetSpeed","tot":"str"},{"t":"set","p":"argument","pt":"msg","to":"4","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":420,"wires":[["b0115be.8060d28"]]},{"id":"6b4c9caa4e062e37","type":"change","z":"9150e92d64a2c5fb","name":"high","rules":[{"t":"set","p":"host","pt":"msg","to":"host","tot":"flow"},{"t":"set","p":"id","pt":"msg","to":"id","tot":"flow"},{"t":"set","p":"token","pt":"msg","to":"token","tot":"flow"},{"t":"set","p":"command","pt":"msg","to":"SetSpeed","tot":"str"},{"t":"set","p":"argument","pt":"msg","to":"5","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":460,"wires":[["b0115be.8060d28"]]},{"id":"a643d8f6f30354ea","type":"string","z":"9150e92d64a2c5fb","name":"Strip value","methods":[{"name":"delRightMost","params":[{"type":"str","value":""}]}],"prop":"payload.value","propout":"payload","object":"msg","objectout":"msg","x":310,"y":1560,"wires":[["67999b2957a9cea1","741f4e14366ff48b"]]},{"id":"c8b88ae37aade327","type":"comment","z":"9150e92d64a2c5fb","name":"Parent flow to handle comms to bondhome.io from virtual sensors","info":"","x":250,"y":160,"wires":[]},{"id":"90ba181e536cebb2","type":"comment","z":"9150e92d64a2c5fb","name":"Parent flow to handle comms to bondhome.io from virtual fan controllers","info":"","x":270,"y":1520,"wires":[]},{"id":"c9ecb44e991f0ba1","type":"hubitat device","z":"9150e92d64a2c5fb","deviceLabel":"Study Ceiling Fan","name":"","server":"8f5b2746.525448","deviceId":"4807","attribute":"speed","sendEvent":true,"x":110,"y":1560,"wires":[["a643d8f6f30354ea"]]},{"id":"5e81de94aadd41aa","type":"hubitat device","z":"9150e92d64a2c5fb","deviceLabel":"Guest Ceiling Fan","name":"","server":"8f5b2746.525448","deviceId":"4808","attribute":"speed","sendEvent":true,"x":110,"y":1620,"wires":[["64df40173297895a"]]},{"id":"ad081db2470cc9f3","type":"hubitat device","z":"9150e92d64a2c5fb","deviceLabel":"Lounge Ceiling Fan","name":"","server":"8f5b2746.525448","deviceId":"4809","attribute":"speed","sendEvent":true,"x":110,"y":1680,"wires":[["281b692efc18bf53"]]},{"id":"c772238d1cc8d121","type":"hubitat device","z":"9150e92d64a2c5fb","deviceLabel":"Gym Ceiling Fan","name":"","server":"8f5b2746.525448","deviceId":"4810","attribute":"speed","sendEvent":true,"x":110,"y":1740,"wires":[["261c04e131c9f38e"]]},{"id":"f8cc3aad2ae4f0b8","type":"hubitat device","z":"9150e92d64a2c5fb","deviceLabel":"Main Ceiling Fan","name":"","server":"8f5b2746.525448","deviceId":"4811","attribute":"speed","sendEvent":true,"x":110,"y":1800,"wires":[["2780777d1b47a3b3"]]},{"id":"2dacb2341abac0c9","type":"hubitat device","z":"9150e92d64a2c5fb","deviceLabel":"Deck Ceiling Fan","name":"","server":"8f5b2746.525448","deviceId":"4812","attribute":"speed","sendEvent":true,"x":110,"y":1860,"wires":[["c76b70e84093b70b"]]},{"id":"64df40173297895a","type":"string","z":"9150e92d64a2c5fb","name":"Strip value","methods":[{"name":"delRightMost","params":[{"type":"str","value":""}]}],"prop":"payload.value","propout":"payload","object":"msg","objectout":"msg","x":310,"y":1620,"wires":[["67999b2957a9cea1","12b3535e11aa0e0d"]]},{"id":"281b692efc18bf53","type":"string","z":"9150e92d64a2c5fb","name":"Strip value","methods":[{"name":"delRightMost","params":[{"type":"str","value":""}]}],"prop":"payload.value","propout":"payload","object":"msg","objectout":"msg","x":310,"y":1680,"wires":[["67999b2957a9cea1","57adfcf4ebb58c25"]]},{"id":"261c04e131c9f38e","type":"string","z":"9150e92d64a2c5fb","name":"Strip value","methods":[{"name":"delRightMost","params":[{"type":"str","value":""}]}],"prop":"payload.value","propout":"payload","object":"msg","objectout":"msg","x":310,"y":1740,"wires":[["67999b2957a9cea1","566782c296c4ad71"]]},{"id":"2780777d1b47a3b3","type":"string","z":"9150e92d64a2c5fb","name":"Strip value","methods":[{"name":"delRightMost","params":[{"type":"str","value":""}]}],"prop":"payload.value","propout":"payload","object":"msg","objectout":"msg","x":310,"y":1800,"wires":[["67999b2957a9cea1","113385d532d931c3"]]},{"id":"c76b70e84093b70b","type":"string","z":"9150e92d64a2c5fb","name":"Strip value","methods":[{"name":"delRightMost","params":[{"type":"str","value":""}]}],"prop":"payload.value","propout":"payload","object":"msg","objectout":"msg","x":310,"y":1860,"wires":[["67999b2957a9cea1","3456ef613abff739"]]},{"id":"12b3535e11aa0e0d","type":"change","z":"9150e92d64a2c5fb","name":"set id","rules":[{"t":"set","p":"id","pt":"flow","to":"5c6332df","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":1620,"wires":[[]]},{"id":"741f4e14366ff48b","type":"change","z":"9150e92d64a2c5fb","name":"set id","rules":[{"t":"set","p":"id","pt":"flow","to":"10775f39","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":1560,"wires":[[]]},{"id":"57adfcf4ebb58c25","type":"change","z":"9150e92d64a2c5fb","name":"set id","rules":[{"t":"set","p":"id","pt":"flow","to":"071f0f56","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":1680,"wires":[[]]},{"id":"566782c296c4ad71","type":"change","z":"9150e92d64a2c5fb","name":"set id","rules":[{"t":"set","p":"id","pt":"flow","to":"3da4fca7","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":1740,"wires":[[]]},{"id":"113385d532d931c3","type":"change","z":"9150e92d64a2c5fb","name":"set id","rules":[{"t":"set","p":"id","pt":"flow","to":"7d061666","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":1800,"wires":[[]]},{"id":"3456ef613abff739","type":"change","z":"9150e92d64a2c5fb","name":"set id","rules":[{"t":"set","p":"id","pt":"flow","to":"1a1e1620","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":1860,"wires":[[]]},{"id":"960bade0eb8d4f2e","type":"link out","z":"9150e92d64a2c5fb","name":"","links":["c6b71311.ad4a6"],"x":915,"y":200,"wires":[]},{"id":"174e117c49ba4601","type":"inject","z":"9150e92d64a2c5fb","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payloadType":"date","x":110,"y":100,"wires":[["a52094417199e7f1"]]},{"id":"5462460ca2d09b34","type":"change","z":"9150e92d64a2c5fb","name":"open","rules":[{"t":"set","p":"host","pt":"msg","to":"host","tot":"flow"},{"t":"set","p":"id","pt":"msg","to":"id","tot":"flow"},{"t":"set","p":"token","pt":"msg","to":"token","tot":"flow"},{"t":"set","p":"command","pt":"msg","to":"Open","tot":"str"},{"t":"set","p":"argument","pt":"msg","to":"null","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":500,"wires":[["b0115be.8060d28"]]},{"id":"5e9a571e20e5cde7","type":"change","z":"9150e92d64a2c5fb","name":"close","rules":[{"t":"set","p":"host","pt":"msg","to":"host","tot":"flow"},{"t":"set","p":"id","pt":"msg","to":"id","tot":"flow"},{"t":"set","p":"token","pt":"msg","to":"token","tot":"flow"},{"t":"set","p":"command","pt":"msg","to":"Close","tot":"str"},{"t":"set","p":"argument","pt":"msg","to":"null","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":540,"wires":[["b0115be.8060d28"]]},{"id":"a31f78851503e979","type":"hubitat device","z":"9150e92d64a2c5fb","deviceLabel":"Rear Shade (L)","name":"","server":"8f5b2746.525448","deviceId":"4819","attribute":"windowShade","sendEvent":true,"x":100,"y":680,"wires":[["4889b65543027b7a"]]},{"id":"4a1bc0e20e910432","type":"comment","z":"9150e92d64a2c5fb","name":"Parent flow to handle comms to bondhome.io from virtual shades","info":"","x":250,"y":640,"wires":[]},{"id":"ed492e78e9d052e1","type":"change","z":"9150e92d64a2c5fb","name":"set id","rules":[{"t":"set","p":"id","pt":"flow","to":"62921f5f","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":680,"wires":[[]]},{"id":"4889b65543027b7a","type":"string","z":"9150e92d64a2c5fb","name":"Strip value","methods":[{"name":"delRightMost","params":[{"type":"str","value":""}]}],"prop":"payload.value","propout":"payload","object":"msg","objectout":"msg","x":290,"y":680,"wires":[["ed492e78e9d052e1","67999b2957a9cea1"]]},{"id":"a7ac2e3aaa0221eb","type":"change","z":"9150e92d64a2c5fb","name":"set id","rules":[{"t":"set","p":"id","pt":"flow","to":"7f199fbc","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":920,"wires":[[]]},{"id":"4123f86fe360d9cb","type":"string","z":"9150e92d64a2c5fb","name":"Strip value","methods":[{"name":"delRightMost","params":[{"type":"str","value":""}]}],"prop":"payload.value","propout":"payload","object":"msg","objectout":"msg","x":290,"y":920,"wires":[["a7ac2e3aaa0221eb","67999b2957a9cea1"]]},{"id":"75da85b7a4651c45","type":"hubitat device","z":"9150e92d64a2c5fb","deviceLabel":"Main Shade (R)","name":"","server":"8f5b2746.525448","deviceId":"4820","attribute":"windowShade","sendEvent":true,"x":100,"y":920,"wires":[["4123f86fe360d9cb"]]},{"id":"caaaa4fbf541566c","type":"hubitat device","z":"9150e92d64a2c5fb","deviceLabel":"Rear Shade (R)","name":"","server":"8f5b2746.525448","deviceId":"4821","attribute":"windowShade","sendEvent":true,"x":100,"y":740,"wires":[["fb3a664ad6b21841"]]},{"id":"fb3a664ad6b21841","type":"string","z":"9150e92d64a2c5fb","name":"Strip value","methods":[{"name":"delRightMost","params":[{"type":"str","value":""}]}],"prop":"payload.value","propout":"payload","object":"msg","objectout":"msg","x":290,"y":740,"wires":[["de2ead39a91d184e","67999b2957a9cea1"]]},{"id":"de2ead39a91d184e","type":"change","z":"9150e92d64a2c5fb","name":"set id","rules":[{"t":"set","p":"id","pt":"flow","to":"13b867a5","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":740,"wires":[[]]},{"id":"6730375def0fd3b8","type":"hubitat device","z":"9150e92d64a2c5fb","deviceLabel":"Kitchen Shade","name":"","server":"8f5b2746.525448","deviceId":"4822","attribute":"windowShade","sendEvent":true,"x":100,"y":980,"wires":[["7ead03d85584e3a8"]]},{"id":"7ead03d85584e3a8","type":"string","z":"9150e92d64a2c5fb","name":"Strip value","methods":[{"name":"delRightMost","params":[{"type":"str","value":""}]}],"prop":"payload.value","propout":"payload","object":"msg","objectout":"msg","x":290,"y":980,"wires":[["754906e7ad4295ea","67999b2957a9cea1"]]},{"id":"754906e7ad4295ea","type":"change","z":"9150e92d64a2c5fb","name":"set id","rules":[{"t":"set","p":"id","pt":"flow","to":"524612f6","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":980,"wires":[[]]},{"id":"8833858df7eaed1a","type":"hubitat device","z":"9150e92d64a2c5fb","deviceLabel":"Main Shade (L)","name":"","server":"8f5b2746.525448","deviceId":"4825","attribute":"windowShade","sendEvent":true,"x":100,"y":800,"wires":[["a566d1cbb6753ca8"]]},{"id":"a566d1cbb6753ca8","type":"string","z":"9150e92d64a2c5fb","name":"Strip value","methods":[{"name":"delRightMost","params":[{"type":"str","value":""}]}],"prop":"payload.value","propout":"payload","object":"msg","objectout":"msg","x":290,"y":800,"wires":[["ec634a799f263c94","67999b2957a9cea1"]]},{"id":"ec634a799f263c94","type":"change","z":"9150e92d64a2c5fb","name":"set id","rules":[{"t":"set","p":"id","pt":"flow","to":"3b9d1384","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":800,"wires":[[]]},{"id":"14363ca91f4b4a01","type":"hubitat device","z":"9150e92d64a2c5fb","deviceLabel":"TV Shade (L)","name":"","server":"8f5b2746.525448","deviceId":"4823","attribute":"windowShade","sendEvent":true,"x":90,"y":1040,"wires":[["f22be9c803d53a12"]]},{"id":"f22be9c803d53a12","type":"string","z":"9150e92d64a2c5fb","name":"Strip value","methods":[{"name":"delRightMost","params":[{"type":"str","value":""}]}],"prop":"payload.value","propout":"payload","object":"msg","objectout":"msg","x":270,"y":1040,"wires":[["9a6065f18d4fc736","67999b2957a9cea1"]]},{"id":"9a6065f18d4fc736","type":"change","z":"9150e92d64a2c5fb","name":"set id","rules":[{"t":"set","p":"id","pt":"flow","to":"0cffb7f8","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":1040,"wires":[[]]},{"id":"493120ac01239865","type":"hubitat device","z":"9150e92d64a2c5fb","deviceLabel":"TV Shade (R)","name":"","server":"8f5b2746.525448","deviceId":"4824","attribute":"windowShade","sendEvent":true,"x":100,"y":1160,"wires":[["17836668556a97f3"]]},{"id":"17836668556a97f3","type":"string","z":"9150e92d64a2c5fb","name":"Strip value","methods":[{"name":"delRightMost","params":[{"type":"str","value":""}]}],"prop":"payload.value","propout":"payload","object":"msg","objectout":"msg","x":290,"y":1160,"wires":[["edc06b50e941cdbd","67999b2957a9cea1"]]},{"id":"edc06b50e941cdbd","type":"change","z":"9150e92d64a2c5fb","name":"set id","rules":[{"t":"set","p":"id","pt":"flow","to":"1e5e1c78","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":1160,"wires":[[]]},{"id":"00efe9e929f81d4b","type":"hubitat device","z":"9150e92d64a2c5fb","deviceLabel":"Entry Shade","name":"","server":"8f5b2746.525448","deviceId":"4826","attribute":"windowShade","sendEvent":true,"x":90,"y":1280,"wires":[["b01b560475192c7f"]]},{"id":"b01b560475192c7f","type":"string","z":"9150e92d64a2c5fb","name":"Strip value","methods":[{"name":"delRightMost","params":[{"type":"str","value":""}]}],"prop":"payload.value","propout":"payload","object":"msg","objectout":"msg","x":270,"y":1280,"wires":[["72fde64baf0e6d2c","67999b2957a9cea1"]]},{"id":"72fde64baf0e6d2c","type":"change","z":"9150e92d64a2c5fb","name":"set id","rules":[{"t":"set","p":"id","pt":"flow","to":"0c95602a","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":1280,"wires":[[]]},{"id":"7217f03de423c497","type":"hubitat device","z":"9150e92d64a2c5fb","deviceLabel":"Rear Outdoor (L)","name":"","server":"8f5b2746.525448","deviceId":"4827","attribute":"windowShade","sendEvent":true,"x":110,"y":1340,"wires":[["af84dd0c1dfb5ced"]]},{"id":"af84dd0c1dfb5ced","type":"string","z":"9150e92d64a2c5fb","name":"Strip value","methods":[{"name":"delRightMost","params":[{"type":"str","value":""}]}],"prop":"payload.value","propout":"payload","object":"msg","objectout":"msg","x":310,"y":1340,"wires":[["e1600150532908d9"]]},{"id":"e1600150532908d9","type":"change","z":"9150e92d64a2c5fb","name":"set id","rules":[{"t":"set","p":"id","pt":"flow","to":"66922720","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":1340,"wires":[["67999b2957a9cea1"]]},{"id":"ac033451a7b5be3f","type":"hubitat device","z":"9150e92d64a2c5fb","deviceLabel":"Rear Outdoor (R)","name":"","server":"8f5b2746.525448","deviceId":"4828","attribute":"windowShade","sendEvent":true,"x":110,"y":1400,"wires":[["3bf7210650b14528"]]},{"id":"3bf7210650b14528","type":"string","z":"9150e92d64a2c5fb","name":"Strip value","methods":[{"name":"delRightMost","params":[{"type":"str","value":""}]}],"prop":"payload.value","propout":"payload","object":"msg","objectout":"msg","x":310,"y":1400,"wires":[["ef046a33b59ce862"]]},{"id":"ef046a33b59ce862","type":"change","z":"9150e92d64a2c5fb","name":"set id","rules":[{"t":"set","p":"id","pt":"flow","to":"4fc3bcc6","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":1400,"wires":[["67999b2957a9cea1"]]},{"id":"d9eaad3f95f096c1","type":"hubitat device","z":"9150e92d64a2c5fb","deviceLabel":"Rear Outdoor (C)","name":"","server":"8f5b2746.525448","deviceId":"4829","attribute":"windowShade","sendEvent":true,"x":110,"y":1460,"wires":[["a2e7f0814444c291"]]},{"id":"a2e7f0814444c291","type":"string","z":"9150e92d64a2c5fb","name":"Strip value","methods":[{"name":"delRightMost","params":[{"type":"str","value":""}]}],"prop":"payload.value","propout":"payload","object":"msg","objectout":"msg","x":310,"y":1460,"wires":[["f43e7fe4f4af1270"]]},{"id":"f43e7fe4f4af1270","type":"change","z":"9150e92d64a2c5fb","name":"set id","rules":[{"t":"set","p":"id","pt":"flow","to":"19b014b7","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":1460,"wires":[["67999b2957a9cea1"]]},{"id":"451f361ff3727187","type":"change","z":"9150e92d64a2c5fb","name":"preset","rules":[{"t":"set","p":"host","pt":"msg","to":"host","tot":"flow"},{"t":"set","p":"id","pt":"msg","to":"id","tot":"flow"},{"t":"set","p":"token","pt":"msg","to":"token","tot":"flow"},{"t":"set","p":"command","pt":"msg","to":"Preset","tot":"str"},{"t":"set","p":"argument","pt":"msg","to":"null","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":580,"wires":[["b0115be.8060d28"]]},{"id":"eec435d4e1cbd7b1","type":"hubitat command","z":"9150e92d64a2c5fb","deviceLabel":"Main Shade (L)","name":"","server":"8f5b2746.525448","deviceId":"4825","command":"setPosition","commandArgs":"50","x":160,"y":860,"wires":[["4415b48baad5bf94","ec634a799f263c94"]]},{"id":"4415b48baad5bf94","type":"change","z":"9150e92d64a2c5fb","name":"set preset","rules":[{"t":"set","p":"payload","pt":"msg","to":"preset","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":860,"wires":[["67999b2957a9cea1"]]},{"id":"701f54164cfed7dc","type":"link in","z":"9150e92d64a2c5fb","name":"Main Shade (Set Preset)","links":["cabcaf8d9ac1dc33","728e6406b30f3575"],"x":35,"y":860,"wires":[["eec435d4e1cbd7b1"]]},{"id":"a262f5ffc8765f90","type":"hubitat command","z":"9150e92d64a2c5fb","deviceLabel":"TV Shade (L)","name":"","server":"8f5b2746.525448","deviceId":"4823","command":"setPosition","commandArgs":"50","x":150,"y":1100,"wires":[["dc68412f18906de3","9a6065f18d4fc736"]]},{"id":"dc68412f18906de3","type":"change","z":"9150e92d64a2c5fb","name":"set preset","rules":[{"t":"set","p":"payload","pt":"msg","to":"preset","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":1100,"wires":[["67999b2957a9cea1"]]},{"id":"fd5ba2f88366b942","type":"hubitat command","z":"9150e92d64a2c5fb","deviceLabel":"TV Shade (R)","name":"","server":"8f5b2746.525448","deviceId":"4824","command":"setPosition","commandArgs":"50","x":160,"y":1220,"wires":[["1ae8982be49dd3b9","edc06b50e941cdbd"]]},{"id":"1ae8982be49dd3b9","type":"change","z":"9150e92d64a2c5fb","name":"set preset","rules":[{"t":"set","p":"payload","pt":"msg","to":"preset","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":1220,"wires":[["67999b2957a9cea1"]]},{"id":"3d4d4011736588c2","type":"link in","z":"9150e92d64a2c5fb","name":"TV Shade (L) (Set Preset)","links":["20f499255fd1a6dd","5b29f50584de02e7"],"x":35,"y":1100,"wires":[["a262f5ffc8765f90"]]},{"id":"b252c69a9da3a313","type":"link in","z":"9150e92d64a2c5fb","name":"TV Shade (R) (Set Preset)","links":["410839f5688579b1"],"x":35,"y":1220,"wires":[["fd5ba2f88366b942"]]},{"id":"48902d2eab5bf91e","type":"inject","z":"9150e92d64a2c5fb","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":650,"y":1720,"wires":[["c9ecb44e991f0ba1"]]},{"id":"8f5b2746.525448","type":"hubitat config","name":"Maker API (Everything else)","usetls":false,"host":"192.168.30.9","port":"80","appId":"1953","nodeRedServer":"http://192.168.20.45:1880","webhookPath":"/hubitat/webhook","autoRefresh":true,"useWebsocket":false,"colorEnabled":false,"color":"#000000"}]
3 Likes

I have updated the code to include my position to use preset positions for shades.