node-red-contrib-zwave-js
Version:
The most powerful, high performing and highly polished Z-Wave node for Node-RED based on Z-Wave JS. If you want a fully featured Z-Wave framework in your Node-RED instance, you have found it.
1 lines • 12.3 kB
JSON
[{"id":"47318f808efa28c9","type":"tab","label":"ZWsve JS Demo Flow","disabled":false,"info":"","env":[]},{"id":"ef63efafbf4966a1","type":"group","z":"47318f808efa28c9","name":"Controller & Driver","style":{"label":true},"nodes":["eb235929029454d3","03dbad03fb2c3b96","bd97f4e403525bff","fdc514dbe919d27c","261ea0862fbfc209","da59cb0f7c5bc711","12e5567cec900d99"],"x":34,"y":139,"w":892,"h":122},{"id":"44b2f96eeccf3d9f","type":"group","z":"47318f808efa28c9","name":"Devices","style":{"label":true},"nodes":["030481de926e70e0","44e0028fd34e413b","d6c235d581d9bcb8","12e4304e8704b49e","6799a115984888d6","3155d15c77cdac69","41b2e9639fd72611","4582275061124c2f","4476377f5b20a008","5d2efcdefe27ff86","545f0e39de4a1da6","bb777b407bf8e814","ab52501e137667d0","f2cde908633f0153","556e085e42851a58","d3dd251e85564178","232cfd2948ad2796","ecbe92bc1671a9cb","8dfbc1dcbb5de80b","7de786059927ca9f","699f2c8b27f74edb"],"x":34,"y":299,"w":892,"h":567},{"id":"da59cb0f7c5bc711","type":"junction","z":"47318f808efa28c9","g":"ef63efafbf4966a1","x":580,"y":220,"wires":[["eb235929029454d3"]]},{"id":"12e5567cec900d99","type":"junction","z":"47318f808efa28c9","g":"ef63efafbf4966a1","x":900,"y":180,"wires":[["673f55bbb5c8698e"]]},{"id":"bb777b407bf8e814","type":"junction","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","x":540,"y":480,"wires":[["030481de926e70e0"]]},{"id":"d3dd251e85564178","type":"junction","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","x":260,"y":760,"wires":[["8d76e327d74874db"]]},{"id":"ecbe92bc1671a9cb","type":"junction","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","x":560,"y":800,"wires":[["51060bcc74602e03"]]},{"id":"8dfbc1dcbb5de80b","type":"junction","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","x":560,"y":840,"wires":[["e5329995df1467b1"]]},{"id":"eb235929029454d3","type":"zwavejs-controller","z":"47318f808efa28c9","g":"ef63efafbf4966a1","name":"ZWave Controller","runtimeId":"de3db5742f340ac0","x":790,"y":180,"wires":[["12e5567cec900d99"]]},{"id":"03dbad03fb2c3b96","type":"inject","z":"47318f808efa28c9","g":"ef63efafbf4966a1","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":180,"wires":[["bd97f4e403525bff"]]},{"id":"bd97f4e403525bff","type":"function","z":"47318f808efa28c9","g":"ef63efafbf4966a1","name":"CONTROLLER.getNodes","func":"/* Get the list of Nodes in the network */\n\nmsg.payload = {\n cmd:{\n api: 'CONTROLLER',\n method: 'getNodes'\n }\n}\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":180,"wires":[["eb235929029454d3"]]},{"id":"673f55bbb5c8698e","type":"debug","z":"47318f808efa28c9","name":"Result","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1030,"y":380,"wires":[]},{"id":"fdc514dbe919d27c","type":"function","z":"47318f808efa28c9","g":"ef63efafbf4966a1","name":"DRIVER.getValueDB","func":"/* Get the entire Value Database */\n/* Optionally, for a specific set of Nodes */\n\nmsg.payload = {\n cmd:{\n api: 'DRIVER',\n method: 'getValueDB'\n },\n cmdProperties:{\n /* args: [2,4,6] */\n }\n}\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":360,"y":220,"wires":[["da59cb0f7c5bc711"]]},{"id":"261ea0862fbfc209","type":"inject","z":"47318f808efa28c9","g":"ef63efafbf4966a1","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":220,"wires":[["fdc514dbe919d27c"]]},{"id":"030481de926e70e0","type":"zwavejs-device","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","name":"ZWave Device","runtimeId":"de3db5742f340ac0","nodeMode":"All","multiMode":"Multicast","fanRate":250,"filteredNodeId":"","dataMode":"SR","outputs":1,"inputs":1,"x":660,"y":380,"wires":[["699f2c8b27f74edb"]]},{"id":"44e0028fd34e413b","type":"function","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","name":"VALUE.getValue","func":"/* Get the Battery Level of a battery operated device */\n\nconst ValueID = {\n commandClass: 0x80, /* 0x80 - The Battery CC */\n endpoint: 0, /* Not used here, but represnets an endpoint on the node, example: A 2 gang socket */\n property: \"level\" /* The peoperty of interest */\n}\n\nmsg.payload = {\n cmd: {\n api: 'VALUE',\n method: 'getValue' /* We are getting the value (not setting it - setValue) */\n },\n cmdProperties: {\n nodeId: 2,\n valueId: ValueID\n }\n}\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":380,"wires":[["030481de926e70e0"]]},{"id":"d6c235d581d9bcb8","type":"inject","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":380,"wires":[["44e0028fd34e413b"]]},{"id":"12e4304e8704b49e","type":"function","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","name":"VALUE.setValue","func":"/* Set value of the binary Switch class */\n\nconst ValueID = {\n commandClass: 0x25, /* 0x25 - The Binary Switch CC */\n endpoint: 0, /* This could be a 2 gang socket */\n property: \"targetValue\" /* The property of interest */\n}\n\nmsg.payload = {\n cmd: {\n api: 'VALUE',\n method: 'setValue' /* We are setting the value (not getting it - getValue) */\n },\n cmdProperties: {\n nodeId: 2,\n valueId: ValueID,\n value: msg.payload\n }\n}\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":480,"wires":[["bb777b407bf8e814"]]},{"id":"6799a115984888d6","type":"inject","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":130,"y":460,"wires":[["12e4304e8704b49e"]]},{"id":"3155d15c77cdac69","type":"inject","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":130,"y":500,"wires":[["12e4304e8704b49e"]]},{"id":"41b2e9639fd72611","type":"comment","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","name":"Manually creating commands","info":"","x":180,"y":340,"wires":[]},{"id":"4582275061124c2f","type":"comment","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","name":"Creating commands with the CMD Factory","info":"","x":220,"y":580,"wires":[]},{"id":"4476377f5b20a008","type":"zwavejs-factory","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","name":"ZWave Command Factory","api":"VALUE","method":"setValue","commandClass":"","valueId":"valueId","nodeId":"topic","endpoint":"endpoint","value":"payload","valueSetOptions":"","args":"payload","trackingId":"id","x":400,"y":620,"wires":[["2d9dda579a09058b","bb777b407bf8e814"]]},{"id":"5d2efcdefe27ff86","type":"inject","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","name":"","props":[{"p":"payload"},{"p":"topic","v":"2","vt":"num"},{"p":"valueId","v":"{\"commandClass\":37,\"endpoint\":0,\"property\":\"targetValue\"}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":130,"y":620,"wires":[["4476377f5b20a008"]]},{"id":"2d9dda579a09058b","type":"debug","z":"47318f808efa28c9","name":"CMD Factory Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1080,"y":620,"wires":[]},{"id":"545f0e39de4a1da6","type":"inject","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","name":"","props":[{"p":"payload"},{"p":"topic","v":"2","vt":"num"},{"p":"valueId","v":"{\"commandClass\":37,\"endpoint\":0,\"property\":\"targetValue\"}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":130,"y":660,"wires":[["4476377f5b20a008"]]},{"id":"ab52501e137667d0","type":"zwavejs-splitter","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","name":"ZWave Event Splitter","splits":[{"valueId":{"commandClassName":"Notification","commandClass":113,"endpoint":0,"property":"Access Control","propertyKey":"Door state (simple)","propertyName":"Access Control","propertyKeyName":"Door state (simple)"},"index":0,"name":"NOTIFICATION.ACCESS_CONTROL.DOOR_STATE_(SIMPLE)","originalIndex":0},{"valueId":{"commandClassName":"Battery","commandClass":128,"endpoint":0,"property":"level","propertyName":"level"},"index":1,"name":"BATTERY.LEVEL","originalIndex":1}],"outputs":2,"x":380,"y":820,"wires":[["ecbe92bc1671a9cb"],["8dfbc1dcbb5de80b"]]},{"id":"f2cde908633f0153","type":"zwavejs-device","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","name":"ZWave Device","runtimeId":"de3db5742f340ac0","nodeMode":"All","multiMode":"Multicast","fanRate":250,"filteredNodeId":"","dataMode":"R","outputs":1,"inputs":0,"x":140,"y":820,"wires":[["ab52501e137667d0","d3dd251e85564178"]]},{"id":"556e085e42851a58","type":"comment","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","name":"Real Time Events","info":"","x":140,"y":760,"wires":[]},{"id":"8d76e327d74874db","type":"debug","z":"47318f808efa28c9","name":"Event","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1030,"y":760,"wires":[]},{"id":"232cfd2948ad2796","type":"comment","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","name":"Filter using your own mechanism","info":"","x":710,"y":740,"wires":[]},{"id":"51060bcc74602e03","type":"debug","z":"47318f808efa28c9","name":"Door Status","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1050,"y":800,"wires":[]},{"id":"e5329995df1467b1","type":"debug","z":"47318f808efa28c9","name":"Battery Update","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1060,"y":840,"wires":[]},{"id":"7de786059927ca9f","type":"comment","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","name":"Or use the event splitter (Read Me)","info":"Using the side panel, click any class property to add it to\nany Zwave Event Spltter Node that may be deployed in your flow","x":740,"y":820,"wires":[]},{"id":"699f2c8b27f74edb","type":"switch","z":"47318f808efa28c9","g":"44b2f96eeccf3d9f","name":"","property":"payload.event","propertyType":"msg","rules":[{"t":"eq","v":"API_RESPONSE","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":850,"y":380,"wires":[["673f55bbb5c8698e"]]},{"id":"74f25151c42c9ddf","type":"comment","z":"47318f808efa28c9","name":"READ ME","info":"Before using this demo flow:\nEdit the configiuration Node: ZWave JS Runtime\n\n - To make sure its your Stick\n - Use your own S2 keys (if you want S2)\n - Make any changes you need\n\n The demo flows assume classes that are supported on your devices, but one should adjust accordignly ","x":100,"y":80,"wires":[]},{"id":"de3db5742f340ac0","type":"zwavejs-runtime","name":"ZWave JS Runtime","serialPort":"/dev/tty.usbmodem11101","timeouts_ack":"","timeouts_response":"","timeouts_sendDataCallback":"","timeouts_report":"","timeouts_serialAPIStarted":"","preferences_scales_temperature":"0","preferences_scales_humidity":"0","logConfig_level":"off","LogConfig_nodeFilter":"","storage_deviceConfigPriorityDir":"","storage_deviceConfigExternalDir":"","storage_throttle":"normal","disableOptimisticValueUpdate":true,"enableSoftReset":false,"interview_queryAllUserCodes":false,"apiKeys_firmwareUpdateService":"","enableStatistics":false,"enableGlobalAPI":false,"globalAPIName":"","securityKeys_S0_Legacy":"","securityKeys_S2_Unauthenticated":"","securityKeys_S2_Authenticated":"","securityKeys_S2_AccessControl":"","securityKeys_S2LR_Authenticated":"","securityKeys_S2LR_AccessControl":""},{"id":"addd0ceb35df1953","type":"global-config","env":[],"modules":{"node-red-contrib-zwave-js":"11.0.19"}}]