MQTT 基礎實習 (Node-Red + MQTT Box)
MQTT Box
MyMQTT Android App
[{"id":"676dee5a541d2c6a","type":"ui_button","z":"9febb32c6c5543b0","name":"","group":"75ebc44c62276bfe","order":9,"width":3,"height":1,"passthru":false,"label":"ON","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"on","payloadType":"str","topic":"topic","topicType":"msg","x":230,"y":160,"wires":[["ba9dfc51c58a437c","c9a85f57c49cf856"]]},{"id":"a8f4413b32230f05","type":"ui_button","z":"9febb32c6c5543b0","name":"","group":"75ebc44c62276bfe","order":10,"width":3,"height":1,"passthru":false,"label":"OFF","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"off","payloadType":"str","topic":"topic","topicType":"msg","x":230,"y":220,"wires":[["ba9dfc51c58a437c","c9a85f57c49cf856"]]},{"id":"441c871dacc833a4","type":"ui_text_input","z":"9febb32c6c5543b0","name":"","label":"溫度","tooltip":"請輸入溫度","group":"75ebc44c62276bfe","order":11,"width":3,"height":1,"passthru":true,"mode":"number","delay":300,"topic":"topic","sendOnBlur":true,"className":"","topicType":"msg","x":230,"y":280,"wires":[["af2b617f0f818c67"]]},{"id":"ba9dfc51c58a437c","type":"mqtt out","z":"9febb32c6c5543b0","name":"ESP32 LED","topic":"alex9ufo/esp32/led","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"841df58d.ee5e98","x":450,"y":180,"wires":[]},{"id":"af2b617f0f818c67","type":"mqtt out","z":"9febb32c6c5543b0","name":"ESP32 Temperature","topic":"alex9ufo/esp32/temp","qos":"2","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"841df58d.ee5e98","x":480,"y":280,"wires":[]},{"id":"7f44805cc86fcf5b","type":"mqtt in","z":"9febb32c6c5543b0","name":"","topic":"alex9ufo/esp32/led","qos":"1","datatype":"auto-detect","broker":"841df58d.ee5e98","nl":false,"rap":true,"rh":0,"inputs":0,"x":270,"y":380,"wires":[["148e347b8294a3a1"]]},{"id":"d8a4773e94b15f3d","type":"ui_led","z":"9febb32c6c5543b0","order":2,"group":"75ebc44c62276bfe","width":5,"height":2,"label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":590,"y":380,"wires":[]},{"id":"148e347b8294a3a1","type":"function","z":"9febb32c6c5543b0","name":"function ","func":"var a=msg.payload;\nmsg.payload='';\n\nif (a=='on')\n msg.payload=true\nif (a=='off')\n msg.payload=false\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":440,"y":380,"wires":[["d8a4773e94b15f3d","15e8adafd3f54b93"]]},{"id":"b3958b5fed7b60d1","type":"mqtt in","z":"9febb32c6c5543b0","name":"","topic":"alex9ufo/esp32/temp","qos":"2","datatype":"auto-detect","broker":"841df58d.ee5e98","nl":false,"rap":true,"rh":0,"inputs":0,"x":270,"y":460,"wires":[["0038c9c971028389","15e8adafd3f54b93"]]},{"id":"0038c9c971028389","type":"ui_text","z":"9febb32c6c5543b0","group":"75ebc44c62276bfe","order":6,"width":0,"height":0,"name":"","label":"溫度","format":"{{msg.payload}}","layout":"row-left","className":"","x":590,"y":460,"wires":[]},{"id":"c9a85f57c49cf856","type":"ui_audio","z":"9febb32c6c5543b0","name":"","group":"75ebc44c62276bfe","voice":"Google US English","always":"","x":400,"y":140,"wires":[]},{"id":"15e8adafd3f54b93","type":"ui_audio","z":"9febb32c6c5543b0","name":"","group":"75ebc44c62276bfe","voice":"Google US English","always":"","x":600,"y":420,"wires":[]},{"id":"75ebc44c62276bfe","type":"ui_group","name":"Default","tab":"f62d63d55905ecd0","order":1,"disp":true,"width":9,"collapse":false,"className":""},{"id":"841df58d.ee5e98","type":"mqtt-broker","name":"","broker":"broker.mqtt-dashboard.com","port":"1883","clientid":"","autoConnect":true,"usetls":false,"compatmode":false,"protocolVersion":4,"keepalive":"15","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"f62d63d55905ecd0","type":"ui_tab","name":"Home_MQTT","icon":"dashboard","disabled":false,"hidden":false}]
沒有留言:
張貼留言