z-wave <-> mqtt bridge and examples of usage

Simple z-wave to/from mqtt broker bridge.

[{"id":"d9df72fd.26209","type":"zwave-controller","port":"/dev/ttyS2","driverattempts":"3","pollinterval":"500"},{"id":"48fb8db.fb70474","type":"mqtt-broker","broker":"192.168.11.2","port":"1883","clientid":""},{"id":"e63c7508.19c388","type":"mqtt out","name":"zwave/actions","topic":"","qos":"","retain":"","broker":"48fb8db.fb70474","x":691.4999389648438,"y":148.33334350585938,"z":"6de5ee.ff921a1","wires":[]},{"id":"a9d359ab.562ca8","type":"comment","name":"z-wave <-> mqtt","info":"Z-Wave to mqtt bridge example.\nTo control z-wave device just send an message to\nzwave/actions/(switchOn,switchOff,setLevel,setValue)\nwith {nodeid:\"number of device\"\n[, level: \"Level on dimmer\"] |\n[, value: \"Value to set\"]}\n\nThe events topic is:\nzwave/events/nodeid/instance, so you can subscribe to each","x":533,"y":73,"z":"6de5ee.ff921a1","wires":[]},{"id":"c35f7050.fa7c1","type":"mqtt in","name":"","topic":"zwave/actions/#","broker":"48fb8db.fb70474","x":306.5,"y":294,"z":"6de5ee.ff921a1","wires":[["89f9986.396dc68"]]},{"id":"89f9986.396dc68","type":"zwave-out","name":"z-wave sender","controller":"d9df72fd.26209","x":549,"y":295,"z":"6de5ee.ff921a1","wires":[]},{"id":"ec438927.9e371","type":"inject","name":"Включить свет в аквариуме","topic":"zwave/actions/switchOn","payload":"2","payloadType":"string","repeat":"","crontab":"","once":false,"x":189.33334350585938,"y":138.33334350585938,"z":"6de5ee.ff921a1","wires":[["10496d.27e95694"]]},{"id":"10496d.27e95694","type":"function","name":"node number  -> nodeid","func":"var nodeid = msg.payload;\nmsg.payload={};\nmsg.payload.nodeid = nodeid;\nreturn msg;","outputs":1,"x":483.33343505859375,"y":154.16666412353516,"z":"6de5ee.ff921a1","wires":[["e63c7508.19c388"]]},{"id":"f2b6883b.16d278","type":"inject","name":"Выключить свет в аквариуме","topic":"zwave/actions/switchOff","payload":"2","payloadType":"string","repeat":"","crontab":"","once":false,"x":194,"y":190,"z":"6de5ee.ff921a1","wires":[["10496d.27e95694"]]},{"id":"b73240a4.48cdc","type":"inject","name":"Выключить 13","topic":"zwave/actions/switchOff","payload":"13","payloadType":"string","repeat":"","crontab":"","once":false,"x":206,"y":85,"z":"6de5ee.ff921a1","wires":[["10496d.27e95694"]]},{"id":"35b588b6.ca4a78","type":"zwave-in","name":"z-wave listener","controller":"d9df72fd.26209","x":155,"y":424,"z":"6de5ee.ff921a1","wires":[["a2befe7f.5d41"]]},{"id":"a2befe7f.5d41","type":"function","name":"z-wave->mqtt","func":"msg.topic=[\"zwave/events\",msg.topic.replace(\"zwave: \",\"\"),msg.payload.nodeid,msg.payload.cmdclass,msg.payload.instance].join(\"/\");\nreturn msg;","outputs":1,"x":375.5,"y":423.55555725097656,"z":"6de5ee.ff921a1","wires":[["6af71f35.9508e"]]},{"id":"6af71f35.9508e","type":"mqtt out","name":"zwave/events","topic":"","qos":"","retain":"","broker":"48fb8db.fb70474","x":582.5,"y":424.5555419921875,"z":"6de5ee.ff921a1","wires":[]}]

Flow Info

Created 10 years, 4 months ago
Updated 9 years, 4 months ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • comment (x1)
  • function (x2)
  • inject (x3)
  • mqtt in (x1)
  • mqtt out (x2)
  • mqtt-broker (x1)
Other
  • zwave-controller (x1)
  • zwave-in (x1)
  • zwave-out (x1)

Tags

  • mqtt
  • z-wave
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option