-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathZigbeeFlow.json
1 lines (1 loc) · 13 KB
/
ZigbeeFlow.json
1
[{"id":"5dd282cb2d8f9a98","type":"tab","label":"Zigbee","disabled":false,"info":"","env":[]},{"id":"e335763ef3fa9642","type":"mqtt in","z":"5dd282cb2d8f9a98","name":"","topic":"zigbee2mqtt/#","qos":"0","datatype":"auto-detect","broker":"47ca2af7.382984","nl":false,"rap":false,"inputs":0,"x":110,"y":180,"wires":[["bd21274024494477"]]},{"id":"57a23db34399ec0a","type":"debug","z":"5dd282cb2d8f9a98","name":"Manually_Z2M_USB","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":610,"y":360,"wires":[]},{"id":"caca91df93ca7695","type":"inject","z":"5dd282cb2d8f9a98","name":"enable","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"control","payload":"enable","payloadType":"str","x":110,"y":240,"wires":[["bd21274024494477"]]},{"id":"64edcbfc71b1fb71","type":"inject","z":"5dd282cb2d8f9a98","name":"disable","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"control","payload":"disable","payloadType":"str","x":110,"y":280,"wires":[["bd21274024494477"]]},{"id":"515fea2bcf575dd8","type":"sshexec","z":"5dd282cb2d8f9a98","name":"Virtual_Machines","sshccfg":"","command":"/QVS/usr/bin/virsh list","addpay":"","append":"","useSpawn":"false","timer":"30","sigint":false,"x":330,"y":360,"wires":[["57a23db34399ec0a"],["57a23db34399ec0a"],["57a23db34399ec0a"]]},{"id":"f7170220aed269de","type":"inject","z":"5dd282cb2d8f9a98","name":"Cmd","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":360,"wires":[["515fea2bcf575dd8"]]},{"id":"d7a12306c9dfd365","type":"sshexec","z":"5dd282cb2d8f9a98","name":"Detach_USB","sshccfg":"","command":"/QVS/usr/bin/virsh detach-device bfe040e9-170d-4ee6-9651-123238730406 --file '/share/CACHEDEV1_DATA/VM/Home Assistant/config/z2m_usb_device.xml'","addpay":"","append":"","useSpawn":"false","timer":"60","sigint":false,"x":310,"y":420,"wires":[["57a23db34399ec0a"],["57a23db34399ec0a"],["57a23db34399ec0a"]]},{"id":"c7441648697819e6","type":"sshexec","z":"5dd282cb2d8f9a98","name":"Attach_USB","sshccfg":"","command":"/QVS/usr/bin/virsh attach-device bfe040e9-170d-4ee6-9651-123238730406 --file '/share/CACHEDEV1_DATA/VM/Home Assistant/config/z2m_usb_device.xml'","addpay":"","append":"","useSpawn":"false","timer":"60","sigint":false,"x":310,"y":480,"wires":[["57a23db34399ec0a"],["57a23db34399ec0a"],["57a23db34399ec0a"]]},{"id":"872ca8d43b6469df","type":"inject","z":"5dd282cb2d8f9a98","name":"Cmd","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":420,"wires":[["d7a12306c9dfd365"]]},{"id":"6aee5b5e5238688d","type":"inject","z":"5dd282cb2d8f9a98","name":"Cmd","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":480,"wires":[["c7441648697819e6"]]},{"id":"9203996434998217","type":"debug","z":"5dd282cb2d8f9a98","name":"Messages_Z2M","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":490,"y":180,"wires":[]},{"id":"bd21274024494477","type":"gate","z":"5dd282cb2d8f9a98","name":"","controlTopic":"control","defaultState":"closed","openCmd":"enable","closeCmd":"disable","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":true,"x":310,"y":180,"wires":[["9203996434998217"]]},{"id":"61ac00e964a1e582","type":"poll-state","z":"5dd282cb2d8f9a98","name":"Poll Z2M Down","server":"a2003b12.8d4648","version":3,"exposeAsEntityConfig":"","updateInterval":"30","updateIntervalType":"num","updateIntervalUnits":"seconds","outputInitially":false,"outputOnChanged":false,"entityId":"binary_sensor.zigbee2mqtt_bridge_connection_state","stateType":"str","ifState":"on","ifStateType":"str","ifStateOperator":"is_not","outputs":2,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":600,"wires":[["c0709bd1789fa1e3"],["a7329d5c600e0477"]]},{"id":"0b56f341bcec3fc6","type":"function","z":"5dd282cb2d8f9a98","name":"Z2M_Down","func":"msg.payload = \"State_Z2M_Down\";\nreturn msg;\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":830,"y":740,"wires":[["7b83d88151ff21cc","2033fc9715f97bc1","195bc6081ec74fc5"]]},{"id":"a7329d5c600e0477","type":"function","z":"5dd282cb2d8f9a98","name":"Z2M_Up","func":"msg.payload = \"State_Z2M_Up\";\nmsg.reset = true;\nreturn msg;\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":600,"wires":[["6928c47ad211ebb6","3cc33b447361288b","6150dd35a5d2fe99"]]},{"id":"c0709bd1789fa1e3","type":"gate","z":"5dd282cb2d8f9a98","name":"","controlTopic":"control","defaultState":"open","openCmd":"enable","closeCmd":"disable","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":true,"x":290,"y":700,"wires":[["72049c437b3f9eaf"]]},{"id":"b498a571083e2ad1","type":"inject","z":"5dd282cb2d8f9a98","name":"enable","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"control","payload":"enable","payloadType":"str","x":110,"y":680,"wires":[["c0709bd1789fa1e3"]]},{"id":"5b8e90a21d27087c","type":"inject","z":"5dd282cb2d8f9a98","name":"disable","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"control","payload":"disable","payloadType":"str","x":110,"y":720,"wires":[["c0709bd1789fa1e3"]]},{"id":"195bc6081ec74fc5","type":"ui_led","z":"5dd282cb2d8f9a98","order":5,"group":"e984c0a6.577b38","width":1,"height":1,"label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#008000","value":"State_Z2M_Up","valueType":"str"},{"color":"#ff8000","value":"State_Z2M_Down","valueType":"str"},{"color":"#ff0000","value":"State_USB_Down","valueType":"str"}],"allowColorForValueInMessage":false,"shape":"square","showGlow":true,"name":"Zigbee_Status","x":1300,"y":640,"wires":[]},{"id":"ec47fe193372f984","type":"debug","z":"5dd282cb2d8f9a98","name":"Z2M_FileSystem","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":820,"wires":[]},{"id":"72049c437b3f9eaf","type":"file in","z":"5dd282cb2d8f9a98","name":"Z2M_Config","filename":"/homeassistant/zigbee2mqtt/configuration.yaml","filenameType":"str","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":450,"y":700,"wires":[["0c46b87c0d62e5ec"]]},{"id":"0c46b87c0d62e5ec","type":"yaml","z":"5dd282cb2d8f9a98","property":"payload","name":"","x":590,"y":700,"wires":[["75d811c82feec7c7"]]},{"id":"75d811c82feec7c7","type":"function","z":"5dd282cb2d8f9a98","name":"SerialInfo","func":"msg.payload = msg.payload.serial.port;\nmsg.SerialPath = \"/dev/serial/by-id/\";\nmsg.SerialFile2 = msg.payload.substring(18, msg.payload.length);\nmsg.SerialFile = msg.payload.substring(msg.SerialPath.length, msg.payload.length);\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":440,"y":760,"wires":[["b775763513119371","ec47fe193372f984"]]},{"id":"b775763513119371","type":"fs-access","z":"5dd282cb2d8f9a98","name":"","path":"SerialPath","pathType":"msg","filename":"SerialFile","filenameType":"msg","accessRead":false,"accessWrite":false,"x":610,"y":760,"wires":[["0b56f341bcec3fc6","6928c47ad211ebb6"],["a107cab4aa4e0724"]]},{"id":"a107cab4aa4e0724","type":"function","z":"5dd282cb2d8f9a98","name":"USB_Down","func":"msg.payload = \"State_USB_Down\";\nreturn msg;\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1090,"y":780,"wires":[["e5256e00cf1960ff","3f6f5167a993f9f0","195bc6081ec74fc5"]]},{"id":"7b83d88151ff21cc","type":"api-call-service","z":"5dd282cb2d8f9a98","name":"Start Z2M","server":"a2003b12.8d4648","version":7,"debugenabled":true,"action":"hassio.addon_start","floorId":[],"areaId":[],"deviceId":[],"entityId":[],"labelId":[],"data":"{ \"addon\":\"45df7312_zigbee2mqtt\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"hassio","service":"addon_start","x":1080,"y":720,"wires":[[]]},{"id":"e8580a0117f953a9","type":"debug","z":"5dd282cb2d8f9a98","name":"Z2M_DBG","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1330,"y":520,"wires":[]},{"id":"e5256e00cf1960ff","type":"sshexec","z":"5dd282cb2d8f9a98","name":"USB_Detach","sshccfg":"","command":"/QVS/usr/bin/virsh detach-device bfe040e9-170d-4ee6-9651-123238730406 --file '/share/CACHEDEV1_DATA/VM/Home Assistant/config/z2m_usb_device.xml'","addpay":"","append":"","useSpawn":"false","timer":"60","sigint":false,"x":1330,"y":780,"wires":[["f32ae8f0ca0c23d4","3a9bfa62fa067431"],["3a9bfa62fa067431"],["3a9bfa62fa067431"]]},{"id":"f32ae8f0ca0c23d4","type":"sshexec","z":"5dd282cb2d8f9a98","name":"USB_Attach","sshccfg":"","command":"/QVS/usr/bin/virsh attach-device bfe040e9-170d-4ee6-9651-123238730406 --file '/share/CACHEDEV1_DATA/VM/Home Assistant/config/z2m_usb_device.xml'","addpay":"","append":"","useSpawn":"false","timer":"60","sigint":false,"x":1550,"y":780,"wires":[["45eb11d3cb4758fc"],["45eb11d3cb4758fc"],["45eb11d3cb4758fc"]]},{"id":"70655ca0ace4697d","type":"debug","z":"5dd282cb2d8f9a98","name":"FSM_Z2M_USB","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1350,"y":460,"wires":[]},{"id":"6928c47ad211ebb6","type":"counter","z":"5dd282cb2d8f9a98","name":"Z2M_DownCount","init":"0","step":"1","lower":"","upper":"10","mode":"increment","outputs":"1","x":830,"y":600,"wires":[["39684dd72947d391","5bee2227c5ab053c"]]},{"id":"39684dd72947d391","type":"function","z":"5dd282cb2d8f9a98","name":"CheckUpperLimit","func":"if (msg.countUpperLimitReached) {\n return msg;\n}\nreturn null;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":660,"wires":[["a107cab4aa4e0724"]]},{"id":"45eb11d3cb4758fc","type":"link out","z":"5dd282cb2d8f9a98","name":"FSM_Z2M_USB_out","mode":"link","links":["b5086075143a805a"],"x":1675,"y":780,"wires":[]},{"id":"b5086075143a805a","type":"link in","z":"5dd282cb2d8f9a98","name":"FSM_Z2M_USB_in","links":["45eb11d3cb4758fc","3a9bfa62fa067431"],"x":1225,"y":460,"wires":[["70655ca0ace4697d"]]},{"id":"3a9bfa62fa067431","type":"link out","z":"5dd282cb2d8f9a98","name":"FSM_Z2M_USB_out","mode":"link","links":["b5086075143a805a"],"x":1495,"y":840,"wires":[]},{"id":"7a15d7b7526a99c0","type":"link in","z":"5dd282cb2d8f9a98","name":"Z2M_DBG_in","links":["3cc33b447361288b","2033fc9715f97bc1","3f6f5167a993f9f0"],"x":1225,"y":520,"wires":[["e8580a0117f953a9"]]},{"id":"3f6f5167a993f9f0","type":"link out","z":"5dd282cb2d8f9a98","name":"Z2M_DBG_out","mode":"link","links":["7a15d7b7526a99c0"],"x":1215,"y":820,"wires":[]},{"id":"2033fc9715f97bc1","type":"link out","z":"5dd282cb2d8f9a98","name":"Z2M_DBG_out","mode":"link","links":["7a15d7b7526a99c0"],"x":945,"y":700,"wires":[]},{"id":"5bee2227c5ab053c","type":"link out","z":"5dd282cb2d8f9a98","name":"Z2M_DBG_out","mode":"link","links":[],"x":975,"y":600,"wires":[]},{"id":"3cc33b447361288b","type":"link out","z":"5dd282cb2d8f9a98","name":"Z2M_DBG_out","mode":"link","links":["7a15d7b7526a99c0"],"x":535,"y":500,"wires":[]},{"id":"6150dd35a5d2fe99","type":"change","z":"5dd282cb2d8f9a98","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":875,"y":540,"wires":[["195bc6081ec74fc5"]],"icon":"node-red/arrow-in.svg","l":false},{"id":"47ca2af7.382984","type":"mqtt-broker","name":"MQTT","broker":"192.168.0.52","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"a2003b12.8d4648","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"e984c0a6.577b38","type":"ui_group","name":"Home","tab":"65a91986.4fbe1","order":1,"disp":true,"width":5,"collapse":false},{"id":"65a91986.4fbe1","type":"ui_tab","name":"Molenstraat_23","icon":"dashboard","order":1,"disabled":false,"hidden":false}]