Skip to content

Instantly share code, notes, and snippets.

@leedrch
Created January 5, 2019 17:15
Show Gist options
  • Save leedrch/78da656401627795fede183d0578a5dc to your computer and use it in GitHub Desktop.
Save leedrch/78da656401627795fede183d0578a5dc to your computer and use it in GitHub Desktop.
Node-Red Flow example : Using MQTT Node
[{"id":"a30d6dce.7c04","type":"comment","z":"f2d39e90.e7ae2","name":"MQTT Broker","info":"","x":150,"y":100,"wires":[]},{"id":"3ed43ced.64e834","type":"comment","z":"f2d39e90.e7ae2","name":"MQTT IN","info":"","x":140,"y":160,"wires":[]},{"id":"c2b53ebf.158db","type":"comment","z":"f2d39e90.e7ae2","name":"MQTT OUT","info":"","x":150,"y":280,"wires":[]},{"id":"d25bf05c.a2bc2","type":"mosca in","z":"f2d39e90.e7ae2","mqtt_port":1883,"mqtt_ws_port":8080,"name":"","username":"","password":"","dburl":"","x":370,"y":100,"wires":[["d63afd8d.d23b5"]]},{"id":"d63afd8d.d23b5","type":"debug","z":"f2d39e90.e7ae2","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":630,"y":100,"wires":[]},{"id":"3d205273.459aee","type":"mqtt in","z":"f2d39e90.e7ae2","name":"","topic":"sensor/sensor1","qos":"0","broker":"eb88ab74.4495c8","x":360,"y":160,"wires":[["161ae9fa.ea4c16"]]},{"id":"161ae9fa.ea4c16","type":"debug","z":"f2d39e90.e7ae2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":630,"y":160,"wires":[]},{"id":"a672591a.eb7bb8","type":"inject","z":"f2d39e90.e7ae2","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":350,"y":280,"wires":[["b6b7d80e.07aa08"]]},{"id":"b6b7d80e.07aa08","type":"mqtt out","z":"f2d39e90.e7ae2","name":"","topic":"sensor/sensor1","qos":"0","retain":"","broker":"eb88ab74.4495c8","x":640,"y":280,"wires":[]},{"id":"c9e563b2.77f07","type":"inject","z":"f2d39e90.e7ae2","name":"","topic":"","payload":"2","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":350,"y":340,"wires":[["c3eb3b79.af9378"]]},{"id":"c3eb3b79.af9378","type":"mqtt out","z":"f2d39e90.e7ae2","name":"","topic":"sensor/sensor2","qos":"0","retain":"","broker":"eb88ab74.4495c8","x":640,"y":340,"wires":[]},{"id":"4e1101e.d9bab","type":"mqtt in","z":"f2d39e90.e7ae2","name":"","topic":"sensor/#","qos":"0","broker":"eb88ab74.4495c8","x":340,"y":220,"wires":[["fef2a073.f2de8"]]},{"id":"fef2a073.f2de8","type":"debug","z":"f2d39e90.e7ae2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":630,"y":220,"wires":[]},{"id":"eb88ab74.4495c8","type":"mqtt-broker","z":"","name":"","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment