Hey everyone,
I’m working on a basic CSV writer python script that will periodically query the API and write values to a CSV I can then use with Grafana to make graphs.
I’m planning on writing this up and sharing a bit more once I’m ready, but I wanted to ask a question before I get too deeply invested.
My question is,
As API versioning planned? As new fields are added for new sensor or new information is exposed, will the URL for the local API server change? I would really like to see new functions show up in /http://10.69.10.92/measures/v2/current/
or something, which is pretty typical in the industry.
Current API docs are here:
Properties | Type | Explanation |
---|---|---|
serialno |
String | Serial Number of the monitor |
wifi |
Number | WiFi signal strength |
pm01 |
Number | PM1.0 in ug/m3 (atmospheric environment) |
pm02 |
Number | PM2.5 in ug/m3 (atmospheric environment) |
pm10 |
Number | PM10 in ug/m3 (atmospheric environment) |
pm02Compensated |
Number | PM2.5 in ug/m3 with correction applied (from fw version 3.1.4 onwards) |
pm01Standard |
Number | PM1.0 in ug/m3 (standard particle) |
pm02Standard |
Number | PM2.5 in ug/m3 (standard particle) |
pm10Standard |
Number | PM10 in ug/m3 (standard particle) |
rco2 |
Number | CO2 in ppm |
pm003Count |
Number | Particle count 0.3um per dL |
pm005Count |
Number | Particle count 0.5um per dL |
pm01Count |
Number | Particle count 1.0um per dL |
pm02Count |
Number | Particle count 2.5um per dL |
pm50Count |
Number | Particle count 5.0um per dL (only for indoor monitor) |
pm10Count |
Number | Particle count 10um per dL (only for indoor monitor) |
atmp |
Number | Temperature in Degrees Celsius |
atmpCompensated |
Number | Temperature in Degrees Celsius with correction applied |
rhum |
Number | Relative Humidity |
rhumCompensated |
Number | Relative Humidity with correction applied |
tvocIndex |
Number | Senisiron VOC Index |
tvocRaw |
Number | VOC raw value |
noxIndex |
Number | Senisirion NOx Index |
noxRaw |
Number | NOx raw value |
boot |
Number | Counts every measurement cycle. Low boot counts indicate restarts. |
bootCount |
Number | Same as boot property. Required for Home Assistant compatability. (deprecated soon!) |
ledMode |
String | Current configuration of the LED mode |
firmware |
String | Current firmware version |
model |
String | Current model name |
I’m just trying to plan around potential breaking changes that get pulled down in OTA updates. Given the amount of rapid change here, particularly in compensation algorithms, I worry about the the fields changing.
If pm02Compensated
has a differant meaning in 3.1.21
version now than it will in a future version 3.2.xx
, the graph will no longer represent the same data, as an example.
Or maybe pm02Compensated
will become pm02CompensatedEPA
and my script will break entirely. I’ve also asked here for a new field maybe someday: Feature Request: API IP Address Information/Static IPs - #5 by nickf1227
Results so far: