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產專班 作業2 (純模擬)

2024產專班 作業2  (純模擬) 1) LED ON,OFF,TIMER,FLASH 模擬 (switch 控制) 2)RFID卡號模擬 (buttom  模擬RFID UID(不從ESP32) Node-Red 程式 [{"id":"d8886...