-
Notifications
You must be signed in to change notification settings - Fork 0
/
flow4.txt
1 lines (1 loc) · 2.19 KB
/
flow4.txt
1
[{"id":"c27722c7.a1097","type":"inject","z":"85fb6879.faf398","name":"","topic":"","payload":"","payloadType":"str","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":80,"wires":[["5b55078c.9052a8"]]},{"id":"1b65f6d.6c03009","type":"inject","z":"85fb6879.faf398","name":"","topic":"","payload":"#000000","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":520,"y":260,"wires":[["a912552c.e98db8"]]},{"id":"a912552c.e98db8","type":"rpi-neopixels","z":"85fb6879.faf398","name":"","pixels":"1","bgnd":"","fgnd":"","wipe":"10","mode":"pixels","rgb":"rgb","brightness":"50","gamma":false,"x":750,"y":200,"wires":[]},{"id":"1f2c94ee.14c3ab","type":"function","z":"85fb6879.faf398","name":"Temp","func":"msg.payload = Number(msg.payload.slice(5,-3));\nmsg.payload = {cpuTempC:msg.payload};\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":80,"wires":[["e649c355.1f987","c3d8ee38.97fa6"]]},{"id":"c3d8ee38.97fa6","type":"debug","z":"85fb6879.faf398","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":750,"y":140,"wires":[]},{"id":"28b06f05.743cb","type":"debug","z":"85fb6879.faf398","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":510,"y":180,"wires":[]},{"id":"5b55078c.9052a8","type":"exec","z":"85fb6879.faf398","command":"vcgencmd measure_temp","addpay":false,"append":"","useSpawn":"","timer":"","name":"read cpu temperature","x":300,"y":80,"wires":[["28b06f05.743cb","1f2c94ee.14c3ab","f26a1d59.4430d"],[],[]]},{"id":"e649c355.1f987","type":"wiotp out","z":"85fb6879.faf398","authType":"d","qs":"true","qsDeviceId":"e649c355.1f987","deviceKey":"","deviceType":"","deviceId":"","event":"event","format":"json","qos":"","name":"","x":730,"y":80,"wires":[]},{"id":"f26a1d59.4430d","type":"function","z":"85fb6879.faf398","name":"Color","func":"msg.payload = Number(msg.payload.slice(5,-3));\n\nif (msg.payload <= 52){\n msg.payload = '#00FF00' //verde\n}\nif (msg.payload >= 53 && msg.payload <= 55){\n msg.payload = '#FFFF00' //amarillo\n}\nif (msg.payload >= 56){\n msg.payload = '#FF0000' //rojo\n}\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":120,"wires":[["a912552c.e98db8","c3d8ee38.97fa6"]]}]