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 • 6.89 kB
JSON
[{"id":"2f2f5384cf841491","type":"tab","label":"Full Example","disabled":false,"info":"","env":[]},{"id":"159049e0f35da22b","type":"zwave-js","z":"2f2f5384cf841491","d":true,"serialPort":"Select Port","name":"Z-Wave JS Controller","encryptionKey":"","encryptionKeyS2U":"","encryptionKeyS2A":"","encryptionKeyS2AC":"","ackTimeout":"","controllerTimeout":"","sendResponseTimeout":"","sendDataCallback":"","serialAPIStarted":"","logLevelPin":"none","logLevel":"none","logFile":"","logNodeFilter":"","sendUsageStatistics":true,"valueCacheDiskThrottle":"normal","customConfigPath":"","intvwUserCodes":false,"softResetUSB":false,"outputs":1,"disableOptimisticValueUpdate":false,"x":700,"y":160,"wires":[["21a01062cb3b9839"]]},{"id":"68dc316395696ed4","type":"comment","z":"2f2f5384cf841491","name":"Controller Node (Read Me)","info":"The controller node : **zwave-js** \nis the main node. It is the node that all communication is passed.\n\nThis node supports all commands. \n\nTo set it up, double click and select your serial port, \nand if using security, provide your encryption keys (or generate new ones)\n\n**NOTE:** Only 1 copy of this node can be deployed. \nThis node has been disabled, as to not affect any setup you may have already achieved.","x":710,"y":120,"wires":[]},{"id":"6dcd0dc03e0c3559","type":"zwave-device","z":"2f2f5384cf841491","name":"Some Z-Wave Device","filteredNodeId":"All","multicast":false,"datamode":"Send/Receive","messagesPerMS":1,"messageInterval":250,"isolated":false,"outputs":1,"inputs":1,"showStatus":true,"x":860,"y":380,"wires":[["dbb0e87b15b2fd3c"]]},{"id":"dcd9a6bacdcab86b","type":"comment","z":"2f2f5384cf841491","name":"Zwave Device (Read Me)","info":"A single, or mulitple zwave device : **zwave-device**. \nThis node can represent one or multiple zwave devices. \n\nIt communicates with the main **zwave-js** node.\n\nMany copies of this node can be deployed.","x":870,"y":340,"wires":[]},{"id":"42b77dc6dca017d8","type":"function","z":"2f2f5384cf841491","name":"Command","func":"// Changing a Binary Switch State (to true) on node 5\n// You can obtain a ValueID - by double clicking a value title in the UI\n\nlet ValueID = {\n \"commandClassName\": \"Binary Switch\",\n \"commandClass\": 37,\n \"endpoint\": 0,\n \"property\": \"targetValue\",\n \"propertyName\": \"targetValue\"\n}\nlet Message = {\n \"payload\": {\n \"mode\": \"ValueAPI\",\n \"node\": 5,/* This can be omitted, if your device node is set to Specific Node */\n \"method\": \"setValue\",\n \"params\": [ValueID,true]\n }\n}\nreturn Message","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":430,"y":380,"wires":[["6dcd0dc03e0c3559","59b4cf7d6f673102"]]},{"id":"80583e90febe9a15","type":"inject","z":"2f2f5384cf841491","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":240,"y":380,"wires":[["42b77dc6dca017d8"]]},{"id":"c09caf2bfa47f0f4","type":"comment","z":"2f2f5384cf841491","name":"Manually constructing commands","info":"","x":320,"y":340,"wires":[]},{"id":"a34dcb38a73f4bc4","type":"comment","z":"2f2f5384cf841491","name":"Commands can be sent directly to the controler","info":"","x":460,"y":240,"wires":[]},{"id":"31396cd9b583e1d7","type":"cmd-factory","z":"2f2f5384cf841491","name":"ZWave CMD Factory","node":"Node","endpoint":"","cc":"Select Command Class","method":"Select Method","params":"payload","noEvent":false,"forceUpdate":"forceUpdate","api":"ValueAPI","vapiMode":"setValue","vapiValue":"Value","vapiValueId":"ValueID","vapiOptions":"","x":660,"y":540,"wires":[["6dcd0dc03e0c3559"]]},{"id":"d4cc366646c4013d","type":"comment","z":"2f2f5384cf841491","name":"Constructing commands with CMD-Factory","info":"","x":350,"y":500,"wires":[]},{"id":"8fb56f9d226bef12","type":"function","z":"2f2f5384cf841491","name":"Command Values","func":"// Node, ValueID and Value are referenced in the CMD Factory.\n// It uses JSONata so can be highly configurable.\n\n\nmsg.Node = 5;\nmsg.ValueID = {\n \"commandClassName\": \"Binary Switch\",\n \"commandClass\": 37,\n \"endpoint\": 0,\n \"property\": \"targetValue\",\n \"propertyName\": \"targetValue\"\n};\nmsg.Value = false;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":430,"y":540,"wires":[["31396cd9b583e1d7"]]},{"id":"83159be8b5438fc4","type":"inject","z":"2f2f5384cf841491","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":240,"y":540,"wires":[["8fb56f9d226bef12"]]},{"id":"dbb0e87b15b2fd3c","type":"event-filter","z":"2f2f5384cf841491","name":"ZWave Event Filter","filters":[{"index":0,"name":"Temp Changes","valueIds":[{"commandClassName":"Multilevel Sensor","commandClass":49,"endpoint":0,"property":"Air temperature","propertyName":"Air temperature"}],"events":["VALUE_UPDATED"],"strict":false,"id":"210290","_id":0},{"index":1,"name":"Light Level Changes","valueIds":[{"commandClassName":"Multilevel Sensor","commandClass":49,"endpoint":0,"property":"Illuminance","propertyName":"Illuminance"}],"events":["VALUE_UPDATED"],"strict":false,"id":"293826","_id":1}],"outputs":2,"changeDate":"2022-02-01T16:55:32.003Z","showStatus":true,"x":1210,"y":380,"wires":[["899af27929142c45"],["f7d66b6a07aa4868"]]},{"id":"f662f69f25a23e83","type":"comment","z":"2f2f5384cf841491","name":"Event Filter (Read Me)","info":"A node to split/ route events : **event-filter**. \nThis node can direct various events and ValueIDs out to different paths. \n\nEach filter can group 1 or more ValueIDs - you can add them from the UI. \ndouble click a value title and choose 'Add To Filter Set' whilst a filter set is expaned","x":1220,"y":340,"wires":[]},{"id":"59b4cf7d6f673102","type":"change","z":"2f2f5384cf841491","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":555,"y":160,"wires":[[]],"l":false},{"id":"899af27929142c45","type":"function","z":"2f2f5384cf841491","name":"Do something with temp change value","func":"const Temp = msg.payload.object.newValue","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1530,"y":340,"wires":[[]]},{"id":"f7d66b6a07aa4868","type":"function","z":"2f2f5384cf841491","name":"Do something with light level change value","func":"const Lux = msg.payload.object.newValue","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1550,"y":400,"wires":[[]]},{"id":"21a01062cb3b9839","type":"change","z":"2f2f5384cf841491","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":1075,"y":360,"wires":[[]],"l":false},{"id":"a13f0bc39b98b13e","type":"comment","z":"2f2f5384cf841491","name":"The controller also emits all events","info":"","x":960,"y":240,"wires":[]}]