2019年6月23日 星期日

Understanding The Node-Red Message Object (將mqtt節點 輸出到 msg)

A msg object that originates from an MQTT input node has the following properties:
  • payload
  • topic
  • qos
  • _msgid
  • retain









[{"id":"175e7d84.8bf972","type":"inject","z":"afe7af4b.c2261","name":"","topic":"","payload":"ON","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":1120,"wires":[["6c3ddc5e.369654"]]},{"id":"c5a83572.51d158","type":"inject","z":"afe7af4b.c2261","name":"","topic":"","payload":"OFF","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":1160,"wires":[["6c3ddc5e.369654"]]},{"id":"6c3ddc5e.369654","type":"mqtt out","z":"afe7af4b.c2261","name":"","topic":"alex9ufo/LED","qos":"0","retain":"true","broker":"b0f7c1ff.aede5","x":380,"y":1140,"wires":[]},{"id":"2360d725.8f5bb8","type":"debug","z":"afe7af4b.c2261","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":370,"y":1240,"wires":[]},{"id":"8813311a.4d943","type":"mqtt in","z":"afe7af4b.c2261","name":"","topic":"alex9ufo/LED","qos":"2","broker":"b0f7c1ff.aede5","x":130,"y":1240,"wires":[["2360d725.8f5bb8"]]},{"id":"b0f7c1ff.aede5","type":"mqtt-broker","z":"","name":"mqtt","broker":"broker.mqtt-dashboard.com","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthRetain":"true","birthPayload":""}]






[{"id":"175e7d84.8bf972","type":"inject","z":"afe7af4b.c2261","name":"","topic":"","payload":"ON","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":1120,"wires":[["6c3ddc5e.369654","2360d725.8f5bb8"]]},{"id":"c5a83572.51d158","type":"inject","z":"afe7af4b.c2261","name":"","topic":"","payload":"OFF","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":1160,"wires":[["6c3ddc5e.369654","2360d725.8f5bb8"]]},{"id":"6c3ddc5e.369654","type":"mqtt out","z":"afe7af4b.c2261","name":"","topic":"alex9ufo/LED","qos":"0","retain":"true","broker":"b0f7c1ff.aede5","x":380,"y":1140,"wires":[]},{"id":"2360d725.8f5bb8","type":"debug","z":"afe7af4b.c2261","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":370,"y":1240,"wires":[]},{"id":"8813311a.4d943","type":"mqtt in","z":"afe7af4b.c2261","name":"","topic":"alex9ufo/LED","qos":"2","broker":"b0f7c1ff.aede5","x":130,"y":1240,"wires":[["2360d725.8f5bb8"]]},{"id":"b0f7c1ff.aede5","type":"mqtt-broker","z":"","name":"mqtt","broker":"broker.mqtt-dashboard.com","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthRetain":"true","birthPayload":""}]

沒有留言:

張貼留言

2024_09 作業3 以Node-Red 為主

 2024_09 作業3  (以Node-Red 為主  Arduino 可能需要配合修改 ) Arduino 可能需要修改的部分 1)mqtt broker  2) 主題Topic (發行 接收) 3) WIFI ssid , password const char br...