Telemetry

Smart Device Telemetry

Telemetry is also collected directly from the smart devices using a Telegraf client running in a separate container. This is configured to ingest and process data from the MQTT bus (you can find the configuration in services/telegraf/conf). The data collected includes:

  • Device status updates (e.g. relay on/off).

  • Device system monitoring (cpu usage, memory usage, disk usage).

  • Configuration changes.

  • Monitoring data (e.g. inst. power, energy registers, voltage, current).

Telegraf then sends a subset of this data to InfluxDB Cloud .

Telemetry data can be accessed via an account linked to our organisation on Influx Cloud.

Both Telegraf and InfluxDB/Influx Cloud are very well documented and have a large community of users so make sure to check documentation first and reference that here.

Building/running queries

Influx Cloud provides an interactive query editor which uses their Flux query language.

Calculating Telemetry

dsr_reporting.telemetry.py contains the functions that fetch telemetry data and perform calculations based on what it receives.

For Shellies attached to immersion heaters, _shelly_kWh_during_timeperiod() fetches instantaneous active power then performs an integration over time to get the total energy used during the time period.

For EV chargers, _evse_kWh_during_timeperiod() deals with two situations:

  • Some chargers report only instantaneous power. In this instance, the calculation similar to that of the Shellies: we fetch the power and integrate to find energy.

  • Some chargers report don’t report power, but instantaneous current and voltage. For these, we must fetch that data and do and elementwise multiplication of these data sources to get power over time, which we can then integrate.