Light on/off from remote area

Light on/off from remote area

[{"id":"ecc2c730.133d38","type":"mqtt-broker","z":"3e647040.c19b9","broker":"test.mosquitto.org","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willRetain":null,"willPayload":"","birthTopic":"","birthQos":"0","birthRetain":null,"birthPayload":""},{"id":"7378674f.8c8798","type":"mqtt in","z":"3e647040.c19b9","name":"","topic":"Epsilon","broker":"ecc2c730.133d38","x":94,"y":656,"wires":[["6a05b8ba.95fa48"]]},{"id":"6a05b8ba.95fa48","type":"function","z":"3e647040.c19b9","name":"LED ON/OFF","func":"if(msg.payload == \"on\")\n{\n    msg.payload = 1;\n}\nelse if(msg.payload ==\"off\")\n{\n    msg.payload = 0;\n}\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":270,"y":798,"wires":[["dd860334.227a","7655d036.89aa3"]]},{"id":"dd860334.227a","type":"rpi-gpio out","z":"3e647040.c19b9","name":"","pin":"16","set":"","level":"0","out":"out","x":537,"y":747,"wires":[]},{"id":"7655d036.89aa3","type":"debug","z":"3e647040.c19b9","name":"","active":true,"console":"false","complete":"payload","x":527,"y":844,"wires":[]}]
121052-

Flow Info

created 1 year, 9 months ago

Node Types

Core
  • debug (x1)
  • function (x1)
  • mqtt in (x1)
  • mqtt-broker (x1)
  • rpi-gpio out (x1)

Tags

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