GergoIO

Casting Loop for CATT

Jul 25th, 2021
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 37.20 KB | None | 0 0
  1. [{"id":"681cd879.82d618","type":"tab","label":"Hub MWE","disabled":false,"info":""},{"id":"a224616a.c8166","type":"bigssh","z":"681cd879.82d618","name":"Install only ver. 0.11.3","commandLine":"pip3 install catt==0.11.3","commandArgs":"","minError":1,"minWarning":1,"noStdin":true,"format":"utf8","payloadIsArg":false,"myssh":"ffce6bac.9eda88","x":680,"y":40,"wires":[[],[],[]]},{"id":"d44d00e5.8bada","type":"bigssh","z":"681cd879.82d618","name":"Upgrade","commandLine":"pip3 install --upgrade pip","commandArgs":"","minError":1,"minWarning":1,"noStdin":true,"format":"utf8","payloadIsArg":false,"myssh":"ffce6bac.9eda88","x":640,"y":100,"wires":[[],[],[]]},{"id":"c1daeabc.d6d008","type":"comment","z":"681cd879.82d618","name":"Notes on CATT","info":"Main thing is to check logs for what IP requests are coming from - \nfor hubs it was often from 192.168.1.1\n\nIf ssh node exits with error code 127 then the two ssh nodes to install CATT and upgrade something need to be run. The degub info for these confirms if it installed successfully.\n\nThings that may help:\n-Turned off duckdns - didn't seem to change stuff but did work with it off.\n-auth_providers above packages in the configuration.yaml\n\n","x":120,"y":40,"wires":[]},{"id":"b1237d49.b8185","type":"inject","z":"681cd879.82d618","name":"0600 every day","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 06 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":340,"y":80,"wires":[["9321a1c8.1cfb2","a224616a.c8166"]]},{"id":"9321a1c8.1cfb2","type":"delay","z":"681cd879.82d618","name":"20s","pauseType":"delay","timeout":"20","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":530,"y":100,"wires":[["d44d00e5.8bada"]]},{"id":"41ca40c8.4f509","type":"api-call-service","z":"681cd879.82d618","name":"Set LR Hub Status","server":"","version":3,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"input_select.living_room_hub_status","data":"{\"option\":\"{{status}}\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","x":470,"y":380,"wires":[[]]},{"id":"d9b1da16.daf308","type":"link in","z":"681cd879.82d618","name":"Set LR Hub Status","links":["3fa1607c.1c843","771a4ecb.9aaaa","729955ca.1c89ec","9dac3cbd.c92d3","e6214b60.e85b68","a1666184.da823"],"x":250,"y":380,"wires":[["41ca40c8.4f509"]],"l":true},{"id":"8ff7842f.88ae58","type":"switch","z":"681cd879.82d618","name":"State?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"},{"t":"eq","v":"playing","vt":"str"},{"t":"eq","v":"idle","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":310,"y":480,"wires":[["e32c9916.119878"],["fa586dfe.b121f"],["d9447180.87cf6"]]},{"id":"e6214b60.e85b68","type":"link out","z":"681cd879.82d618","name":"Set LR Hub Status","links":["d9b1da16.daf308"],"x":650,"y":480,"wires":[],"l":true},{"id":"e32c9916.119878","type":"change","z":"681cd879.82d618","name":"Off","rules":[{"t":"set","p":"status","pt":"msg","to":"Off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":440,"wires":[["e6214b60.e85b68"]]},{"id":"fa586dfe.b121f","type":"change","z":"681cd879.82d618","name":"Playing","rules":[{"t":"set","p":"status","pt":"msg","to":"Playing","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":480,"wires":[["e6214b60.e85b68"]]},{"id":"d9447180.87cf6","type":"change","z":"681cd879.82d618","name":"Idle","rules":[{"t":"set","p":"status","pt":"msg","to":"Idle","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":520,"wires":[["e6214b60.e85b68"]]},{"id":"66d5068c.2b4188","type":"server-state-changed","z":"681cd879.82d618","name":"TV","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"media_player.android_tv","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":1040,"wires":[["44d7663e.7ad758"]]},{"id":"b169bc1e.3fbfc","type":"server-state-changed","z":"681cd879.82d618","name":"TV OFF for 2mins","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"media_player.android_tv","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"2","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":210,"y":1080,"wires":[["eb612079.d0811"],[]]},{"id":"eb612079.d0811","type":"change","z":"681cd879.82d618","name":"RESET","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":335,"y":1080,"wires":[["44d7663e.7ad758","96caf7ed.5317f8"]],"icon":"node-red/timer.svg","l":false},{"id":"44d7663e.7ad758","type":"delay","z":"681cd879.82d618","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"10","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":500,"y":1040,"wires":[["8821a99.39d5d58"]]},{"id":"f114f8bd.54bd68","type":"api-current-state","z":"681cd879.82d618","name":"Hub is Avail.?","server":"","version":2,"outputs":2,"halt_if":"Off, Idle, Dashboard, Temporary Cast","halt_if_type":"str","halt_if_compare":"includes","entity_id":"input_select.living_room_hub_status","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":500,"y":800,"wires":[["8b479923.0e0b18"],[]]},{"id":"9110324a.16dbf","type":"api-call-service","z":"681cd879.82d618","name":"Cast TV Info to Hub","server":"","version":3,"debugenabled":false,"service_domain":"hassio","service":"addon_stdin","entityId":"","data":"{\"addon\":\"a0d7b954_ssh\",\"input\":\"catt -d '***Cast Device Name goes here***' cast_site ***URL goes here***\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1270,"y":860,"wires":[["b6be05e0.99fa48"]]},{"id":"e55b570a.da0058","type":"api-current-state","z":"681cd879.82d618","name":"TV is playing?","server":"","version":2,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","entity_id":"media_player.android_tv","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":1080,"y":860,"wires":[["9110324a.16dbf"],["9ceec2e3.84e06"]]},{"id":"b166b98a.aa66e8","type":"change","z":"681cd879.82d618","name":"TV Info","rules":[{"t":"set","p":"hub_content","pt":"msg","to":"TV Info","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":1040,"wires":[["f92fb4c7.83c0d8"]]},{"id":"58b4f419.b9ac5c","type":"switch","z":"681cd879.82d618","name":"Requested Content?","property":"hub_content","propertyType":"msg","rules":[{"t":"eq","v":"Dashboard","vt":"str"},{"t":"eq","v":"Morning Info","vt":"str"},{"t":"eq","v":"Sabine Info","vt":"str"},{"t":"eq","v":"Map Info","vt":"str"},{"t":"eq","v":"TV Info","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":840,"y":780,"wires":[[],[],["65825112.717e2"],[],["e55b570a.da0058"]]},{"id":"ae006a8f.f6a758","type":"link in","z":"681cd879.82d618","name":"Restart Loop","links":["b54b856b.28d388"],"x":510,"y":740,"wires":[["8b479923.0e0b18"]],"l":true},{"id":"e121b22f.498de","type":"trigger","z":"681cd879.82d618","name":"10s","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"10","extend":true,"overrideDelay":false,"units":"s","reset":"","bytopic":"topic","topic":"hub_content","outputs":1,"x":1570,"y":860,"wires":[["fb2a8f68.1bb63"]]},{"id":"fb2a8f68.1bb63","type":"api-call-service","z":"681cd879.82d618","name":"Un-mute Hub","server":"","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_mute","entityId":"","data":"{\"entity_id\":\"media_player.living_room_hub\",\"is_volume_muted\":false}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1690,"y":860,"wires":[[]]},{"id":"8b479923.0e0b18","type":"api-call-service","z":"681cd879.82d618","name":"Mute Hub","server":"","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_mute","entityId":"","data":"{\"entity_id\":\"media_player.living_room_hub\",\"is_volume_muted\":true}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":680,"y":780,"wires":[["58b4f419.b9ac5c"]]},{"id":"8b6313f6.91184","type":"trigger","z":"681cd879.82d618","name":"10m","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"590","extend":true,"overrideDelay":false,"units":"s","reset":"","bytopic":"topic","topic":"hub_content","outputs":1,"x":1570,"y":900,"wires":[["b54b856b.28d388"]]},{"id":"b54b856b.28d388","type":"link out","z":"681cd879.82d618","name":"Restart Loop","links":["ae006a8f.f6a758"],"x":1690,"y":900,"wires":[],"l":true},{"id":"13ec625c.75eb8e","type":"change","z":"681cd879.82d618","name":"RESET","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1455,"y":900,"wires":[["8b6313f6.91184"]],"icon":"node-red/timer.svg","l":false},{"id":"46b585c0.ddadbc","type":"api-call-service","z":"681cd879.82d618","name":"Stop Cast","server":"","version":3,"debugenabled":false,"service_domain":"hassio","service":"addon_stdin","entityId":"","data":"{\"addon\":\"a0d7b954_ssh\",\"input\":\"catt -d '***Cast Device Name goes here***' stop\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1700,"y":940,"wires":[["72ce49e4.566128"]]},{"id":"6ae7ee80.115ec","type":"api-call-service","z":"681cd879.82d618","name":"Mute Hub","server":"","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_mute","entityId":"","data":"{\"entity_id\":\"media_player.living_room_hub\",\"is_volume_muted\":true}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1580,"y":940,"wires":[["46b585c0.ddadbc"]]},{"id":"e9cd718b.544a9","type":"api-call-service","z":"681cd879.82d618","name":"Un-mute Hub","server":"","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_mute","entityId":"","data":"{\"entity_id\":\"media_player.living_room_hub\",\"is_volume_muted\":false}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1930,"y":940,"wires":[[]]},{"id":"72ce49e4.566128","type":"trigger","z":"681cd879.82d618","name":"10s","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"10","extend":true,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":1810,"y":940,"wires":[["e9cd718b.544a9"]]},{"id":"9fb01a09.c72fd8","type":"change","z":"681cd879.82d618","name":"Next","rules":[{"t":"delete","p":"reset","pt":"msg"},{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1395,"y":900,"wires":[["13ec625c.75eb8e","972ef075.79f6f"]],"icon":"font-awesome/fa-long-arrow-right","l":false},{"id":"9ceec2e3.84e06","type":"change","z":"681cd879.82d618","name":"Next","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":1195,"y":900,"wires":[["9fb01a09.c72fd8"]],"icon":"font-awesome/fa-long-arrow-right","l":false},{"id":"e892d1d7.af7e9","type":"link in","z":"681cd879.82d618","name":"Start Cast","links":["c3645eb.781f0a","9a4e510b.22323","22fd9dac.bcef42","f92fb4c7.83c0d8","fc2aa36a.74847"],"x":220,"y":780,"wires":[["8e91e139.c7eab"]],"l":true},{"id":"7203500d.8cef2","type":"link in","z":"681cd879.82d618","name":"Stop Cast","links":["18be81c9.8fbebe","970ff5b7.4d0768","b823a67d.5cdef8","15fe5ea5.8f3da1","bfb9ce69.6b244"],"x":220,"y":900,"wires":[["129c528b.ed199d"]],"l":true},{"id":"f92fb4c7.83c0d8","type":"link out","z":"681cd879.82d618","name":"Start Cast","links":["e892d1d7.af7e9"],"x":940,"y":1040,"wires":[],"l":true},{"id":"bfb9ce69.6b244","type":"link out","z":"681cd879.82d618","name":"Stop Cast","links":["7203500d.8cef2"],"x":940,"y":1080,"wires":[],"l":true},{"id":"b6be05e0.99fa48","type":"change","z":"681cd879.82d618","name":"Next","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":1455,"y":860,"wires":[["e121b22f.498de","8b6313f6.91184","8715295.df350d8"]],"icon":"font-awesome/fa-long-arrow-right","l":false},{"id":"b2eeb578.2005e8","type":"server-state-changed","z":"681cd879.82d618","name":"Sabine Cleaning?","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"vacuum.sabine","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"cleaning","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":200,"y":1160,"wires":[["aa5804b4.3694c8"],[]]},{"id":"4b9aa6a0.488d68","type":"server-state-changed","z":"681cd879.82d618","name":"Sabine Docked > 5m?","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"vacuum.sabine","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"docked","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"5","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":220,"y":1240,"wires":[["4961eef3.bcfc3"],[]]},{"id":"c3645eb.781f0a","type":"link out","z":"681cd879.82d618","name":"Start Cast","links":["e892d1d7.af7e9"],"x":940,"y":1180,"wires":[],"l":true},{"id":"15fe5ea5.8f3da1","type":"link out","z":"681cd879.82d618","name":"Stop Cast","links":["7203500d.8cef2"],"x":940,"y":1240,"wires":[],"l":true},{"id":"99e84300.a6c11","type":"change","z":"681cd879.82d618","name":"Sabine Info","rules":[{"t":"set","p":"hub_content","pt":"msg","to":"Sabine Info","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":1180,"wires":[["c3645eb.781f0a"]]},{"id":"1b65fb2f.cbdb45","type":"api-call-service","z":"681cd879.82d618","name":"Cast Sabine Info to Hub","server":"","version":3,"debugenabled":false,"service_domain":"hassio","service":"addon_stdin","entityId":"","data":"{\"addon\":\"a0d7b954_ssh\",\"input\":\"catt -d '***Cast Device Name goes here***' cast_site ***URL goes here***\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1250,"y":780,"wires":[["b6be05e0.99fa48"]]},{"id":"96caf7ed.5317f8","type":"change","z":"681cd879.82d618","name":"TV Info","rules":[{"t":"set","p":"hub_content","pt":"msg","to":"TV Info","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":1080,"wires":[["bfb9ce69.6b244"]]},{"id":"65825112.717e2","type":"change","z":"681cd879.82d618","name":"Next","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":1015,"y":780,"wires":[["1b65fb2f.cbdb45"]],"icon":"font-awesome/fa-long-arrow-right","l":false},{"id":"4961eef3.bcfc3","type":"change","z":"681cd879.82d618","name":"Sabine Info","rules":[{"t":"set","p":"hub_content","pt":"msg","to":"Sabine Info","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":1220,"wires":[["15fe5ea5.8f3da1"]]},{"id":"729955ca.1c89ec","type":"link out","z":"681cd879.82d618","name":"Set Hub Status","links":["d9b1da16.daf308"],"x":1760,"y":820,"wires":[],"l":true},{"id":"972ef075.79f6f","type":"change","z":"681cd879.82d618","name":"Next","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":1455,"y":940,"wires":[["6ae7ee80.115ec","bee3292a.844918"]],"icon":"font-awesome/fa-long-arrow-right","l":false},{"id":"bee3292a.844918","type":"change","z":"681cd879.82d618","name":"Off","rules":[{"t":"set","p":"status","pt":"msg","to":"Off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1570,"y":980,"wires":[["3fa1607c.1c843"]]},{"id":"3fa1607c.1c843","type":"link out","z":"681cd879.82d618","name":"Set Hub Status","links":["d9b1da16.daf308"],"x":1700,"y":980,"wires":[],"l":true},{"id":"f36fdee4.683e5","type":"switch","z":"681cd879.82d618","name":"Stopping Displayed Content?","property":"hub_content","propertyType":"msg","rules":[{"t":"eq","v":"hub_status_current","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":680,"y":920,"wires":[["b0e67c4e.bd5ec"]]},{"id":"3ed057e4.fe4de8","type":"api-current-state","z":"681cd879.82d618","name":"Hub Status?","server":"","version":2,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"includes","entity_id":"input_select.living_room_hub_status","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"hub_status_current","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":490,"y":920,"wires":[["f36fdee4.683e5"]]},{"id":"42d5891f.91f808","type":"api-current-state","z":"681cd879.82d618","name":"Sabine?","server":"","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.living_room_hub_sabine_info","state_type":"str","blockInputOverrides":false,"outputProperties":[],"x":595,"y":1180,"wires":[["99e84300.a6c11"],[]],"icon":"font-awesome/fa-paint-brush","l":false},{"id":"8821a99.39d5d58","type":"api-current-state","z":"681cd879.82d618","name":"TV?","server":"","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.living_room_hub_tv_info","state_type":"str","blockInputOverrides":false,"outputProperties":[],"x":595,"y":1040,"wires":[["b166b98a.aa66e8"],[]],"icon":"font-awesome/fa-tv","l":false},{"id":"8e91e139.c7eab","type":"switch","z":"681cd879.82d618","name":"Override?","property":"override","propertyType":"msg","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":340,"y":780,"wires":[["8b479923.0e0b18"],["f114f8bd.54bd68"]]},{"id":"6708b3c2.cf0ddc","type":"switch","z":"681cd879.82d618","name":"Force Cast by Voice?","property":"payload.event.service_data.entity_id","propertyType":"msg","rules":[{"t":"cont","v":"cast_hub_stop_all","vt":"str"},{"t":"cont","v":"cast_hub_dashboard","vt":"str"},{"t":"cont","v":"cast_hub_morning_info","vt":"str"},{"t":"cont","v":"cast_hub_sabine_info","vt":"str"},{"t":"cont","v":"cast_hub_map_info","vt":"str"},{"t":"cont","v":"cast_hub_tv_info","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":380,"y":1440,"wires":[["e7ee0786.94af68"],[],[],["9a2acba7.ae4678"],[],["6b8ab386.4ac49c"]]},{"id":"6b8ab386.4ac49c","type":"change","z":"681cd879.82d618","name":"TV Info","rules":[{"t":"set","p":"hub_content","pt":"msg","to":"TV Info","tot":"str"},{"t":"set","p":"override","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":1600,"wires":[["493fe0b0.c7f5"]]},{"id":"9a2acba7.ae4678","type":"change","z":"681cd879.82d618","name":"Sabine Info","rules":[{"t":"set","p":"hub_content","pt":"msg","to":"Sabine Info","tot":"str"},{"t":"set","p":"override","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":1520,"wires":[["a96cddc6.22d48"]]},{"id":"d02806bb.b36028","type":"link out","z":"681cd879.82d618","name":"Stop ALL Cast","links":["250ab072.3fcfe","a502ab4b.216d38","53ca1586.220ddc","4158b069.a2f5c"],"x":740,"y":1360,"wires":[],"l":true},{"id":"4158b069.a2f5c","type":"link in","z":"681cd879.82d618","name":"","links":["d02806bb.b36028"],"x":595,"y":1240,"wires":[["4961eef3.bcfc3"]]},{"id":"53ca1586.220ddc","type":"link in","z":"681cd879.82d618","name":"","links":["d02806bb.b36028"],"x":595,"y":1100,"wires":[["96caf7ed.5317f8"]]},{"id":"771a4ecb.9aaaa","type":"link out","z":"681cd879.82d618","name":"Set Hub Status","links":["d9b1da16.daf308"],"x":840,"y":1400,"wires":[],"l":true},{"id":"e7ee0786.94af68","type":"change","z":"681cd879.82d618","name":"Next","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":595,"y":1400,"wires":[["d02806bb.b36028","b447f0eb.56a9f"]],"icon":"font-awesome/fa-long-arrow-right","l":false},{"id":"de7c2e9d.31e2f","type":"server-state-changed","z":"681cd879.82d618","name":"LR Hub Status to OFF?","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_select.living_room_hub_status","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"Off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":260,"y":560,"wires":[["8aea863.708c578"],[]]},{"id":"8aea863.708c578","type":"link out","z":"681cd879.82d618","name":"Stop ALL Casts","links":["6cb2ba2b.8302c4","16aab47c.a74dbc","7f66a05.ca8c36","8193f82a.734ec8"],"x":460,"y":580,"wires":[],"l":true},{"id":"1664ef82.559f3","type":"api-call-service","z":"681cd879.82d618","name":"Cast TV Info to Hub","server":"","version":3,"debugenabled":false,"service_domain":"hassio","service":"addon_stdin","entityId":"","data":"{\"addon\":\"a0d7b954_ssh\",\"input\":\"catt -d '***Cast Device Name goes here***' cast_site ***URL goes here***\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":970,"y":1600,"wires":[["8b27fbf6.d69108"]]},{"id":"1b642a0c.4160e6","type":"api-call-service","z":"681cd879.82d618","name":"Cast Sabine Info to Hub","server":"","version":3,"debugenabled":false,"service_domain":"hassio","service":"addon_stdin","entityId":"","data":"{\"addon\":\"a0d7b954_ssh\",\"input\":\"catt -d '***Cast Device Name goes here***' cast_site ***URL goes here***\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":950,"y":1520,"wires":[["8b27fbf6.d69108"]]},{"id":"a96cddc6.22d48","type":"api-call-service","z":"681cd879.82d618","name":"Mute Hub","server":"","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_mute","entityId":"","data":"{\"entity_id\":\"media_player.living_room_hub\",\"is_volume_muted\":true}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":780,"y":1520,"wires":[["1b642a0c.4160e6"]]},{"id":"493fe0b0.c7f5","type":"api-call-service","z":"681cd879.82d618","name":"Mute Hub","server":"","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_mute","entityId":"","data":"{\"entity_id\":\"media_player.living_room_hub\",\"is_volume_muted\":true}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":780,"y":1600,"wires":[["1664ef82.559f3"]]},{"id":"e9499812.4c6118","type":"api-call-service","z":"681cd879.82d618","name":"Un-mute Hub","server":"","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_mute","entityId":"","data":"{\"entity_id\":\"media_player.living_room_hub\",\"is_volume_muted\":false}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1310,"y":1520,"wires":[["8a123c55.3e17a"]]},{"id":"8a123c55.3e17a","type":"change","z":"681cd879.82d618","name":"Temporary Cast","rules":[{"t":"set","p":"status","pt":"msg","to":"Temporary Cast","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1220,"y":1560,"wires":[["a1666184.da823"]]},{"id":"a1666184.da823","type":"link out","z":"681cd879.82d618","name":"Set Hub Status","links":["d9b1da16.daf308"],"x":1380,"y":1560,"wires":[],"l":true},{"id":"16aab47c.a74dbc","type":"link in","z":"681cd879.82d618","name":"","links":["8aea863.708c578"],"x":595,"y":1140,"wires":[["414917ed.c9eac8"]]},{"id":"414917ed.c9eac8","type":"change","z":"681cd879.82d618","name":"TV Info (Override)","rules":[{"t":"set","p":"hub_content","pt":"msg","to":"TV Info","tot":"str"},{"t":"set","p":"override","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":1120,"wires":[["bfb9ce69.6b244"]]},{"id":"129c528b.ed199d","type":"switch","z":"681cd879.82d618","name":"Override?","property":"override","propertyType":"msg","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":340,"y":900,"wires":[["e09261aa.91ef"],["3ed057e4.fe4de8"]]},{"id":"854d47ad.ab08f8","type":"change","z":"681cd879.82d618","name":"Next","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":775,"y":880,"wires":[["b0e67c4e.bd5ec"]],"icon":"font-awesome/fa-long-arrow-right","l":false},{"id":"b0e67c4e.bd5ec","type":"change","z":"681cd879.82d618","name":"Next","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":835,"y":900,"wires":[["9ceec2e3.84e06"]],"icon":"font-awesome/fa-long-arrow-right","l":false},{"id":"e09261aa.91ef","type":"change","z":"681cd879.82d618","name":"Next","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":435,"y":880,"wires":[["854d47ad.ab08f8"]],"icon":"font-awesome/fa-long-arrow-right","l":false},{"id":"75fba24b.a933ac","type":"change","z":"681cd879.82d618","name":"Sabine Info (Override)","rules":[{"t":"set","p":"hub_content","pt":"msg","to":"Sabine Info","tot":"str"},{"t":"set","p":"override","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":1260,"wires":[["15fe5ea5.8f3da1"]]},{"id":"8193f82a.734ec8","type":"link in","z":"681cd879.82d618","name":"","links":["8aea863.708c578"],"x":595,"y":1280,"wires":[["75fba24b.a933ac"]]},{"id":"4d809439.fd9b1c","type":"comment","z":"681cd879.82d618","name":"Extra note","info":"https://community.home-assistant.io/t/using-catt/130332/351?\n\nHad this same issue. \nKeeping it on ver 0.11.3 instead of 0.12 fixed things","x":100,"y":80,"wires":[]},{"id":"8b27fbf6.d69108","type":"trigger","z":"681cd879.82d618","name":"10s","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"10","extend":true,"overrideDelay":false,"units":"s","reset":"","bytopic":"topic","topic":"hub_content","outputs":1,"x":1190,"y":1520,"wires":[["e9499812.4c6118"]]},{"id":"46bcf0e.63bef1","type":"switch","z":"681cd879.82d618","name":"Force Cast by Press?","property":"payload.event.service","propertyType":"msg","rules":[{"t":"cont","v":"cast_hub_stop_all","vt":"str"},{"t":"cont","v":"cast_hub_dashboard","vt":"str"},{"t":"cont","v":"cast_hub_morning_info","vt":"str"},{"t":"cont","v":"cast_hub_sabine_info","vt":"str"},{"t":"cont","v":"cast_hub_map_info","vt":"str"},{"t":"cont","v":"cast_hub_tv_info","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":380,"y":1560,"wires":[["e7ee0786.94af68"],[],[],["9a2acba7.ae4678"],[],["6b8ab386.4ac49c"]]},{"id":"c89945f3.976968","type":"server-state-changed","z":"681cd879.82d618","name":"Stop All LR Hub ON?","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.automations_stop_all_living_room_hub","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":260,"y":300,"wires":[["4bdbf0dd.ac17a","c9b3ba68.a85908"],[]]},{"id":"ed395e0d.9bf31","type":"api-call-service","z":"681cd879.82d618","name":"OFF","server":"","version":3,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"{{payload.entity_id}}","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":280,"wires":[[]]},{"id":"4bdbf0dd.ac17a","type":"ha-get-entities","z":"681cd879.82d618","name":"All Hub Cast Booleans","server":"","version":0,"rules":[{"property":"entity_id","logic":"is","value":"^input_boolean\\.living_room_hub_.*_info$","valueType":"re"}],"output_type":"split","output_empty_results":true,"output_location_type":"msg","output_location":"number_home","output_results_count":1,"x":480,"y":280,"wires":[["ed395e0d.9bf31"]]},{"id":"8bb11af9.00e4b8","type":"link in","z":"681cd879.82d618","name":"Boolean","links":["c9b3ba68.a85908"],"x":300,"y":600,"wires":[["8aea863.708c578"]],"l":true},{"id":"c9b3ba68.a85908","type":"link out","z":"681cd879.82d618","name":"Boolean","links":["8bb11af9.00e4b8"],"x":440,"y":320,"wires":[],"l":true},{"id":"8715295.df350d8","type":"change","z":"681cd879.82d618","name":"Set msg.status","rules":[{"t":"set","p":"status","pt":"msg","to":"hub_content","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1600,"y":820,"wires":[["729955ca.1c89ec"]]},{"id":"b447f0eb.56a9f","type":"change","z":"681cd879.82d618","name":"Off","rules":[{"t":"set","p":"status","pt":"msg","to":"Off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":1400,"wires":[["771a4ecb.9aaaa"]]},{"id":"aa5804b4.3694c8","type":"api-current-state","z":"681cd879.82d618","name":"Home is !Empty/EA?","server":"","version":2,"outputs":2,"halt_if":"Empty, Extended Away","halt_if_type":"str","halt_if_compare":"includes","entity_id":"input_select.house_presence","state_type":"str","blockInputOverrides":false,"outputProperties":[],"x":400,"y":1160,"wires":[["42d5891f.91f808"],[]]},{"id":"365b95b8.a1dc6a","type":"api-current-state","z":"681cd879.82d618","name":"Sabine Cleaning?","server":"","version":2,"outputs":2,"halt_if":"cleaning","halt_if_type":"str","halt_if_compare":"includes","entity_id":"vacuum.sabine","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"hub_status_current","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":470,"y":1200,"wires":[["42d5891f.91f808"],[]]},{"id":"7f4945c7.15ec4c","type":"trigger-state","z":"681cd879.82d618","name":"House no longer Empty/EA?","server":"","version":0,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"input_select.house_presence","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"current_state","comparatorType":"does_not_include","comparatorValueDatatype":"list","comparatorValue":"Empty, Extended Away","propertyValue":"new_state.state"},{"targetType":"this_entity","targetValue":"","propertyType":"previous_state","comparatorType":"includes","comparatorValueDatatype":"list","comparatorValue":"Empty, Extended Away","propertyValue":"old_state.state"}],"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":240,"y":1200,"wires":[["365b95b8.a1dc6a"],[]]},{"id":"cfb0c26c.8d815","type":"server-state-changed","z":"681cd879.82d618","name":"LR Hub","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"media_player.living_room_hub","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":210,"y":480,"wires":[["8ff7842f.88ae58"]]},{"id":"2b804c8d.306824","type":"switch","z":"681cd879.82d618","name":"Running?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"running","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":390,"y":40,"wires":[["9321a1c8.1cfb2","a224616a.c8166"]]},{"id":"bf23487c.6b7c38","type":"server-events","z":"681cd879.82d618","name":"Startup","server":"","version":1,"event_type":"home_assistant_client","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":280,"y":40,"wires":[["2b804c8d.306824"]]},{"id":"235301db.1e590e","type":"server-events","z":"681cd879.82d618","name":"Script","server":"","version":1,"event_type":"call_service","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":170,"y":1500,"wires":[["6708b3c2.cf0ddc","46bcf0e.63bef1"]]},{"id":"df2e5820.d4beb8","type":"comment","z":"681cd879.82d618","name":"General Notes","info":"I use several input booleans and selects to control automations.","x":130,"y":160,"wires":[]},{"id":"4d41eea8.2a5ca","type":"comment","z":"681cd879.82d618","name":"Stop Hub Automations","info":"This part stops all hub casting automations","x":200,"y":260,"wires":[]},{"id":"81853d21.48c88","type":"comment","z":"681cd879.82d618","name":"Start/Stop Hub Casting","info":"This part has inputs that start and stop specific things being casted to the hub. \n\nThere's also a loop to keep the current thing being displayed on the screen despite the possible timeouts after 10mins.\n(This is done by just recasting just before the time elapses)","x":220,"y":680,"wires":[]},{"id":"1a0e1254.3bd4ce","type":"comment","z":"681cd879.82d618","name":"Automatically Start Casting","info":"This part shows how to automate starting and stopping casting various things based on certain scenarios","x":170,"y":980,"wires":[]},{"id":"6c99cf4f.661a7","type":"comment","z":"681cd879.82d618","name":"Casting via voice/frontend button","info":"Starting scripts via voice or pressing a button that triggers the script from the frontend will go here.\n\nThese can be used to start casting temporarily (allowing the cast to elapse after 10mins) but you could rewire like the automated examples to keep the info on the screen","x":210,"y":1360,"wires":[]},{"id":"ffce6bac.9eda88","type":"SSH_Credentials","host":"192.168.1.11","port":"23","userlabel":"[email protected]"}]
Advertisement
Add Comment
Please, Sign In to add comment