flowermqtt

flowermqtt

[{"id":"86f0c28c.790f4","type":"mqtt-broker","broker":"localhost","port":"1883","clientid":""},{"id":"768d02a5.8972fc","type":"comment","name":"Instructions","info":"In domoticz go to Hardware/create virtual device\nlookup the IDX in the devices tab\nIn this example a text device has been created with IDX 211.\nThe example show how to send a message to Domoticz","x":117,"y":64,"z":"b7c7a593.483858","wires":[]},{"id":"b1254314.4edac","type":"mqtt out","name":"","topic":"domoticz/in","qos":"","retain":"","broker":"86f0c28c.790f4","x":502,"y":89,"z":"b7c7a593.483858","wires":[]},{"id":"5c83c4b2.a37c3c","type":"inject","name":"","topic":"","payload":"This text will be displayed in Domoticz","payloadType":"date","repeat":"","crontab":"","once":false,"x":140,"y":110,"z":"b7c7a593.483858","wires":[["8a07898c.75f878"]]},{"id":"8a07898c.75f878","type":"function","name":"Fill Message","func":"var dt = new Date();\n\nvar now = {\n\t'month':\tdt.getMonth() + 1,\n\t'day':\t\tdt.getDate(),\n\t'year':\t\tdt.getFullYear(),\n\t'hours':\tdt.getHours(),\n\t'mins':\t\tdt.getMinutes(),\n\t'msecs':\tdt.getMilliseconds()\n};\n\nmsg.payload = {};\nmsg.payload.idx = 211;\nmsg.payload.svalue = \"The time is now \" + now.hours + \":\" + now.mins;\nreturn msg;","outputs":1,"x":317,"y":105,"z":"b7c7a593.483858","wires":[["b1254314.4edac","6ea9b369.91564c"]]},{"id":"6ea9b369.91564c","type":"debug","name":"","active":true,"console":"false","complete":"payload","x":488,"y":152,"z":"b7c7a593.483858","wires":[]}]
Justinb81

Flow Info

created 2 months ago

Node Types

Core
  • comment (x1)
  • debug (x1)
  • function (x1)
  • inject (x1)
  • mqtt out (x1)
  • mqtt-broker (x1)

Tags

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