實驗 ESP32 MQTT – Publish and Subscribe Control Build LED
[{"id":"fb18ee16bd390f17","type":"ui_button","z":"292f11a42dcd8cc6","name":"","group":"85b1efd8d6d7c0dd","order":0,"width":"2","height":"1","passthru":false,"label":"LED 開","tooltip":"","color":"white","bgcolor":"","className":"","icon":"fa-circle","payload":"on","payloadType":"str","topic":"","topicType":"str","x":220,"y":120,"wires":[["1215bf485e4e05ac","99f45318686f3b50","ece516667caf5287"]]},{"id":"d3c9013c82e7208d","type":"ui_button","z":"292f11a42dcd8cc6","name":"","group":"85b1efd8d6d7c0dd","order":0,"width":"2","height":"1","passthru":false,"label":"LED 關","tooltip":"","color":"black","bgcolor":"","className":"","icon":"fa-circle-o","payload":"off","payloadType":"str","topic":"","topicType":"str","x":220,"y":160,"wires":[["1215bf485e4e05ac","99f45318686f3b50","ece516667caf5287"]]},{"id":"1215bf485e4e05ac","type":"mqtt out","z":"292f11a42dcd8cc6","name":"Control LED","topic":"alex9ufo/ESP32/LEDOUTPUT","qos":"1","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"70940176.2b2d3","x":470,"y":120,"wires":[]},{"id":"afdfd6c80c401e46","type":"comment","z":"292f11a42dcd8cc6","name":"Node-Red publish 到 HiveMQ Broker , ESP32訂閱","info":"將 alex9ufo/inTopic 到(publish)HiveMQ Broker \n給 Arduino 訂閱(Subscribe)","x":350,"y":60,"wires":[]},{"id":"99f45318686f3b50","type":"ui_audio","z":"292f11a42dcd8cc6","name":"","group":"85b1efd8d6d7c0dd","voice":"zh-TW","always":true,"x":460,"y":260,"wires":[]},{"id":"ece516667caf5287","type":"ui_text","z":"292f11a42dcd8cc6","group":"85b1efd8d6d7c0dd","order":0,"width":0,"height":0,"name":"","label":"Node-RED發行到MQTT的資料","format":"{{msg.payload}}","layout":"row-left","className":"","x":530,"y":200,"wires":[]},{"id":"f36454366bb73576","type":"ui_audio","z":"292f11a42dcd8cc6","name":"","group":"85b1efd8d6d7c0dd","voice":"en-US","always":"","x":760,"y":360,"wires":[]},{"id":"ee071aaa4be34a08","type":"mqtt in","z":"292f11a42dcd8cc6","name":"LED status ","topic":"alex9ufo/ESP32/LED_status","qos":"2","datatype":"utf8","broker":"841df58d.ee5e98","nl":false,"rap":true,"rh":0,"inputs":0,"x":240,"y":420,"wires":[["06db1cd963fdc4c0","525b36ad0d551f68"]]},{"id":"06db1cd963fdc4c0","type":"debug","z":"292f11a42dcd8cc6","name":"debug 95","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":460,"y":440,"wires":[]},{"id":"0cc50378a4f78cf1","type":"comment","z":"292f11a42dcd8cc6","name":"Node-Red subscribe HiveMQ Broker , ESP32發行","info":"將 alex9ufo/inTopic 到(publish)HiveMQ Broker \n給 Arduino 訂閱(Subscribe)","x":340,"y":320,"wires":[]},{"id":"2c68e0bd754ec016","type":"ui_text","z":"292f11a42dcd8cc6","group":"85b1efd8d6d7c0dd","order":0,"width":0,"height":0,"name":"","label":"Node-RED 訂閱MQTT的資料","format":"{{msg.payload}}","layout":"row-left","className":"","x":660,"y":400,"wires":[]},{"id":"35f02379c87a6a78","type":"ui_button","z":"292f11a42dcd8cc6","name":"","group":"85b1efd8d6d7c0dd","order":0,"width":"2","height":"1","passthru":false,"label":"LED 閃爍","tooltip":"","color":"black","bgcolor":"","className":"","icon":"fa-circle-o","payload":"flash","payloadType":"str","topic":"","topicType":"str","x":220,"y":200,"wires":[["1215bf485e4e05ac","ece516667caf5287","99f45318686f3b50"]]},{"id":"420821c68c32a9f5","type":"ui_button","z":"292f11a42dcd8cc6","name":"","group":"85b1efd8d6d7c0dd","order":0,"width":"2","height":"1","passthru":false,"label":"LED反向","tooltip":"","color":"black","bgcolor":"","className":"","icon":"fa-circle-o","payload":"toggle","payloadType":"str","topic":"","topicType":"str","x":220,"y":240,"wires":[["1215bf485e4e05ac","ece516667caf5287","99f45318686f3b50"]]},{"id":"222e01e31287760a","type":"ui_button","z":"292f11a42dcd8cc6","name":"","group":"85b1efd8d6d7c0dd","order":0,"width":"2","height":"1","passthru":false,"label":"LED 定時5秒","tooltip":"","color":"black","bgcolor":"","className":"","icon":"fa-circle-o","payload":"timer","payloadType":"str","topic":"","topicType":"str","x":230,"y":280,"wires":[["1215bf485e4e05ac","ece516667caf5287","99f45318686f3b50"]]},{"id":"525b36ad0d551f68","type":"function","z":"292f11a42dcd8cc6","name":"function 26","func":"msg.payload=\" ---ESP32回來資料---\" +msg.payload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":450,"y":400,"wires":[["2c68e0bd754ec016","739d35b9914f0a4c"]]},{"id":"739d35b9914f0a4c","type":"delay","z":"292f11a42dcd8cc6","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":620,"y":360,"wires":[["f36454366bb73576"]]},{"id":"85b1efd8d6d7c0dd","type":"ui_group","name":"ESP32","tab":"eeb8e179.a47a4","order":2,"disp":true,"width":"10","collapse":false,"className":""},{"id":"70940176.2b2d3","type":"mqtt-broker","name":"","broker":"broker.mqtt-dashboard.com","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"15","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"841df58d.ee5e98","type":"mqtt-broker","name":"","broker":"broker.mqtt-dashboard.com","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"15","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"eeb8e179.a47a4","type":"ui_tab","name":"LED Control","icon":"dashboard","disabled":false,"hidden":false}]
沒有留言:
張貼留言