2019年12月2日 星期一

Node-RED 控制Dashboard UI 介面 驅動MQTT Server 與 Line Notify


Node-RED 控制Dashboard UI 介面 驅動MQTT Server Line Notify  





[{"id":"9a9808d2.b904e8","type":"mqtt in","z":"7377d363.84128c","name":"","topic":"alex9ufo/led/led_event","qos":"1","datatype":"auto","broker":"841df58d.ee5e98","x":140,"y":100,"wires":[["ff64ce35.d54d6","cc43c13c.49236","bd66ced7.e745b"]]},{"id":"ff64ce35.d54d6","type":"ui_text","z":"7377d363.84128c","group":"6c9116b.b62d4e8","order":0,"width":0,"height":0,"name":"","label":"MQTT Suscribe Data","format":"{{msg.payload}}","layout":"col-center","x":400,"y":100,"wires":[]},{"id":"e10b330a.0e832","type":"ui_button","z":"7377d363.84128c","name":"","group":"6c9116b.b62d4e8","order":0,"width":0,"height":0,"passthru":false,"label":"On led","tooltip":"","color":"white","bgcolor":"","icon":"fa-circle","payload":"Light-emitting diode on","payloadType":"str","topic":"","x":110,"y":300,"wires":[["a4db0e32.936f8","6d69def.f1acb2"]]},{"id":"5ccc4685.ea9d18","type":"ui_button","z":"7377d363.84128c","name":"","group":"6c9116b.b62d4e8","order":0,"width":0,"height":0,"passthru":false,"label":"Off led","tooltip":"","color":"black","bgcolor":"","icon":"fa-circle-o","payload":"Light-emitting diode off","payloadType":"str","topic":"","x":110,"y":360,"wires":[["a4db0e32.936f8","6d69def.f1acb2"]]},{"id":"a4db0e32.936f8","type":"mqtt out","z":"7377d363.84128c","name":"","topic":"alex9ufo/led/led_event","qos":"1","retain":"false","broker":"841df58d.ee5e98","x":360,"y":300,"wires":[]},{"id":"6d69def.f1acb2","type":"ui_audio","z":"7377d363.84128c","name":"","group":"6c9116b.b62d4e8","voice":"en-US","always":"","x":320,"y":360,"wires":[]},{"id":"cc43c13c.49236","type":"function","z":"7377d363.84128c","name":"Format timestamp","func":"var date = new Date();\nvar h = date.getHours();\nvar m = date.getMinutes();\nvar s = date.getSeconds();\nif(h<10){\n    h = '0'+h;\n}\nif(m<10){\n    m = '0' + m;\n}\nif(s<10){\n    s = '0' + s;\n}\nmsg.payload = msg.payload + ' --> Time:(' + h + ':' + m + ':' + s + ')' ;\n\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":160,"wires":[["d3901e4c.e507d"]]},{"id":"d3901e4c.e507d","type":"function","z":"7377d363.84128c","name":"Set Line API ","func":"msg.headers = {'content-type':'application/x-www-form-urlencoded','Authorization':'Bearer oR7KdXvK1eobRr2sRRgsl4PMq23DjDlhfUs96SyUBZu'};\nmsg.payload = {\"message\":msg.payload};\nreturn msg;\n\n//oR7KdXvK1eobRr2sRRgsl4PMq23DjDlhfUs96SyUBZu","outputs":1,"noerr":0,"x":370,"y":240,"wires":[["2d2f8066.cb721"]]},{"id":"2d2f8066.cb721","type":"http request","z":"7377d363.84128c","name":"","method":"POST","ret":"txt","url":"https://notify-api.line.me/api/notify","tls":"","x":490,"y":160,"wires":[["6085953d.1462ec"]]},{"id":"6085953d.1462ec","type":"debug","z":"7377d363.84128c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":590,"y":240,"wires":[]},{"id":"bd66ced7.e745b","type":"debug","z":"7377d363.84128c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":370,"y":60,"wires":[]},{"id":"841df58d.ee5e98","type":"mqtt-broker","z":"","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":"6c9116b.b62d4e8","type":"ui_group","z":"","name":"LED","tab":"28920cc.c23e2f4","order":1,"disp":true,"width":"6","collapse":false},{"id":"28920cc.c23e2f4","type":"ui_tab","z":"","name":"MQTT_LED","icon":"dashboard","order":1,"disabled":false,"hidden":false}]


沒有留言:

張貼留言

113 學年度第 1 學期 RFID應用課程 Arduino程式

113 學年度第 1 學期 RFID應用課程 Arduino程式 https://www.mediafire.com/file/zr0h0p3iosq12jw/MFRC522+(2).7z/file 內含修改過後的 MFRC522 程式庫 (原程式有錯誤) //定義MFRC522...