-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflow2.txt
1 lines (1 loc) · 1.57 KB
/
flow2.txt
1
[{"id":"a19b9b2c.cda2c8","type":"inject","z":"f6c9238b.c151b","name":"tick 15","topic":"tempC","payload":"","payloadType":"str","repeat":"15","crontab":"","once":false,"onceDelay":"","x":100,"y":120,"wires":[["68b8cf53.c8239"]]},{"id":"68b8cf53.c8239","type":"exec","z":"f6c9238b.c151b","command":"vcgencmd measure_temp","addpay":false,"append":"","useSpawn":"","timer":"","name":"read cpu temperature","x":200,"y":200,"wires":[["e3c82e29.6e49a"],[],[]]},{"id":"e3c82e29.6e49a","type":"function","z":"f6c9238b.c151b","name":"format temperature","func":"//msg.payload = Number(msg.payload.slice(5,-3));\nmsg.payload = {cpuTempC:msg.payload};\nreturn msg;","outputs":"1","noerr":0,"x":350,"y":120,"wires":[["ff09c451.7fc9f8","4f087308.a090bc"]]},{"id":"bf71a3ff.0c43b","type":"comment","z":"f6c9238b.c151b","name":"Read Raspberry Pi cpu temperature","info":"Reads the Raspberry Pi cpu temperature every 15 seconds, \nformats the data to tidy up the string and \nthen sends the data to the IBM Watson IOT platform\n\nAfter deploying the example, open the Watson IoT\nnode and click the link button to take you to the \nQuickstartdashboard for your flow.\n","x":180,"y":60,"wires":[]},{"id":"ff09c451.7fc9f8","type":"debug","z":"f6c9238b.c151b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":570,"y":80,"wires":[]},{"id":"4f087308.a090bc","type":"wiotp out","z":"f6c9238b.c151b","authType":"d","qs":"true","qsDeviceId":"4f087308.a090bc","deviceKey":"","deviceType":"","deviceId":"","event":"event","format":"json","qos":"","name":"","x":550,"y":160,"wires":[]}]