Node-Red MQTT 華氏攝氏(1)
[{"id":"d914ac8d.cd404","type":"debug","z":"74e0880a.c777f8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":630,"y":220,"wires":[]},{"id":"f35a3030.d7841","type":"debug","z":"74e0880a.c777f8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":582.6041069030762,"y":361.12417221069336,"wires":[]},{"id":"9f2a37c9.0d8f88","type":"ui_gauge","z":"74e0880a.c777f8","name":"Temp攝氏","group":"d5da3e9b.46abf","order":0,"width":0,"height":0,"gtype":"gage","title":"<font size=6>攝氏溫度","label":"units","format":"{{value}} °C","min":0,"max":"60","colors":["#00b500","#e6e600","#ca3838"],"seg1":"38","seg2":"39","x":440,"y":100,"wires":[]},{"id":"e432382a.09be58","type":"mqtt in","z":"74e0880a.c777f8","name":"","topic":"alex9ufo/inTopic/DS1820","qos":"2","datatype":"auto","broker":"e4d9b72d.d14398","x":190,"y":180,"wires":[["a9f94558.f62338","9b169625.36b148","9f2a37c9.0d8f88"]]},{"id":"a9f94558.f62338","type":"debug","z":"74e0880a.c777f8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":410,"y":300,"wires":[]},{"id":"16f82524.a04f0b","type":"mqtt out","z":"74e0880a.c777f8","name":"","topic":"alex9ufo/inTopic/DS1820","qos":"","retain":"","broker":"e4d9b72d.d14398","x":610,"y":440,"wires":[]},{"id":"58885ec1.fd46b","type":"function","z":"74e0880a.c777f8","name":"","func":"var max=60;\nvar min=10;\nmsg.payload= Math.floor(Math.random()*(max-min+1))+min;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":370,"y":440,"wires":[["16f82524.a04f0b"]]},{"id":"d829b66c.1de1c8","type":"ui_gauge","z":"74e0880a.c777f8","name":"Temp華氏","group":"d5da3e9b.46abf","order":0,"width":0,"height":0,"gtype":"gage","title":"<font size=6>華氏溫度","label":"units","format":" {{value}} °F","min":"32","max":"140","colors":["#00b500","#e6e600","#ca3838"],"seg1":"101","seg2":"102","x":640,"y":180,"wires":[]},{"id":"9b169625.36b148","type":"function","z":"74e0880a.c777f8","name":"攝氏和華氏轉換","func":"//華氏= (攝氏乘9/5) + 32 \nvar c1= Number(msg.payload);\nvar f1= Number((c1 * 9) / 5) +32 ;\nmsg.payload=f1;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":460,"y":180,"wires":[["d829b66c.1de1c8","d914ac8d.cd404"]]},{"id":"4d56a5a3.cf369c","type":"inject","z":"74e0880a.c777f8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"8","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":440,"wires":[["58885ec1.fd46b"]]},{"id":"c9be5739.f4ef48","type":"comment","z":"74e0880a.c777f8","name":"華氏度到攝氏度轉換器","info":"華氏= (攝氏乘9/5) + 32 ","x":480,"y":140,"wires":[]},{"id":"d5da3e9b.46abf","type":"ui_group","name":"DHT11","tab":"784aac14.5c2404","order":2,"disp":true,"width":"6","collapse":false},{"id":"e4d9b72d.d14398","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":"784aac14.5c2404","type":"ui_tab","name":"Station","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
沒有留言:
張貼留言