Help get this topic noticed by sharing it on Twitter, Facebook, or email.
I’m sad

runtimeReport / sensorData feedback

I just wrote 60 lines of confusing code to translate the cryptic sensorData object in the runtimeReport API call into something easier to consume.

I get a separate array of sensors that aren't really sensors, but sensor metrics that I have to use string comparison to identify by stripping everything after the final colon. I get an array of columns that map the sensor metric objects to a comma-delimited array of rows. To actually store this data relationally I have to connect all these elements together.

Was it hard to do? Eh, not really. But it would be so much nicer to have a proper JSON object representing all this runtime data:

{
"thermostat_identifier": 123,
"sensor_identifier": 456,
"timestamp": 2017-12-09 01:50:00,
"temperature": 64.8,
"humidity": null,
"occupancy": null
}

If data transfer is an issue, use two arrays - one for column keys and one for data.

I love having the API, but sometimes I wonder about some of some of the decisions; it's as if someone just rushed to expose the data without really thinking about consuming it.
1 person likes
this idea
+1
Reply