Created
August 13, 2022 07:59
-
-
Save prombouts/98233a00106730bcd53b134c4f49cb87 to your computer and use it in GitHub Desktop.
Get Raspberry PI temperature and call LogicApp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "cdd3427b60e26088", | |
"type": "tab", | |
"label": "Temp to LogicApp", | |
"disabled": false, | |
"info": "", | |
"env": [] | |
}, | |
{ | |
"id": "f9c23d23.c8c24", | |
"type": "exec", | |
"z": "cdd3427b60e26088", | |
"command": "vcgencmd measure_temp", | |
"addpay": false, | |
"append": "", | |
"useSpawn": "false", | |
"timer": "", | |
"winHide": false, | |
"oldrc": false, | |
"name": "Get Raspberry CPU Temperature", | |
"x": 380, | |
"y": 260, | |
"wires": [ | |
[ | |
"a0ad4644.0efbf8" | |
], | |
[], | |
[] | |
] | |
}, | |
{ | |
"id": "a0ad4644.0efbf8", | |
"type": "function", | |
"z": "cdd3427b60e26088", | |
"name": "Extract CPU Temp", | |
"func": "const re = /^temp=(.*)'C$/gm;\nmsg.payload = Number(msg.payload.replace(re, '$1'));\nreturn msg;", | |
"outputs": 1, | |
"noerr": 0, | |
"initialize": "", | |
"finalize": "", | |
"libs": [], | |
"x": 550, | |
"y": 380, | |
"wires": [ | |
[ | |
"a780cf0d7090480b" | |
] | |
] | |
}, | |
{ | |
"id": "a97d78fc.40c268", | |
"type": "inject", | |
"z": "cdd3427b60e26088", | |
"name": "Run every 15 minutes", | |
"props": [ | |
{ | |
"p": "payload" | |
}, | |
{ | |
"p": "topic", | |
"vt": "str" | |
} | |
], | |
"repeat": "900", | |
"crontab": "", | |
"once": true, | |
"onceDelay": 0.1, | |
"topic": "", | |
"payload": "", | |
"payloadType": "date", | |
"x": 150, | |
"y": 140, | |
"wires": [ | |
[ | |
"f9c23d23.c8c24" | |
] | |
] | |
}, | |
{ | |
"id": "a780cf0d7090480b", | |
"type": "http request", | |
"z": "cdd3427b60e26088", | |
"name": "Call LogicApp", | |
"method": "POST", | |
"ret": "txt", | |
"paytoqs": "ignore", | |
"url": "https://someazurelogicappurl.com", | |
"tls": "", | |
"persist": false, | |
"proxy": "", | |
"authType": "", | |
"senderr": false, | |
"credentials": { | |
"user": "", | |
"password": "" | |
}, | |
"x": 820, | |
"y": 460, | |
"wires": [ | |
[] | |
] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment