I’d like to create a plugin that polls a URL, uses the data to display itself and 1 to N sub devices. I’d like it to allow scenes to be triggered based on the values (=, <, >).
Here’s an example JSON output:
$ curl http://10.13.54.87/RAWSTATUS | jq .
{
"system": {
"nickname": "Herpstat",
"firmware": 3.2,
"numberofoutputs": 1,
"powerresets": 6,
"internaltemp": 92,
"internaltempmax": 93,
"safetyrelay": "OFF (Normal Operation)"
},
"output1": {
"outputnickname": "Lamp",
"outputmode": "Heat(Dimming)",
"probereadingTEMP": 94.8,
"currentsetting": 95,
"ramping": "Not In Session",
"endoframpsetting": 95,
"probereadingTEMPMAX": 95.6,
"probereadingTEMPMIN": 72.3,
"probereadingRH": 0,
"probereadingRHMAX": 0,
"probereadingRHMIN": 0,
"poweroutput": 46,
"poweroutputLIMIT": 100,
"enablehighlowalarm": 0,
"highalarm": 90,
"lowalarm": 60,
"errorcode": 0,
"errorcodedescription": "No Errors"
}
}
This is a thermostat that has 1 to N probes/outputs.
I’ve having a really hard time figuring out where to get started… maybe some sample weather plugin code that polls for weather?