HTTP JSON Sensor Data

Aus Gude Systems GmbH
Version vom 1. April 2021, 13:38 Uhr von Mb (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „*all Sensor data is available in a generic JSON Object presentet by status.json *there are two relevant sub-objects: sensor_values and sensor_descr *sensor_des…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen
  • all Sensor data is available in a generic JSON Object presentet by status.json
  • there are two relevant sub-objects: sensor_values and sensor_descr
  • sensor_descr can tell:
    • what sensor types are actually relevent
    • what is type-specifiv sensor-field descripton
    • how many sensors of each type are actually present
    • what are the names of each of such sensors
  • sensor_values tells you about the sensor values, matching the description explained above
  • it's common practice to get sensor_descr+sensor_values once, and poll sensor_values only subsequently
  • HTTP-Get status.json?components=8470528
    • here, 8470528 sums up sensor_values (16384 aka 0x10000) plus sensor_descr (65536 aka 0x4000), plus the ‘extended’ marker (0x800000) to get both simple sensors and complex sensor groups
    • 0x4000 + 0x10000 + 0x800000 = 8470528

A sensor description might look like this:

[

{ "num": 2, "type": 9 "fields": [{ "decPrecision": 3, "name": "Voltage", "unit": "V" }, { "decPrecision": 3, "defaultDisplay": 1, "msgCfgType": 1, "name": "Current", "unit": "A" }], "properties": [{ "id": "L1", "name": "Meter1", "state": 1, "statistics": [] }] }],