1

I got a power consumption sensor (kWh) sending data to my TSI Gen2 environment, and it is malfunctioning in a way that it is losing its accumulated measuremente value when it is shut down. I need to create a new aggregate/variable that would "stack" the measurements , never letting it drop to zero, but always adding to the last greatest value.

I thought about creating a dataset with values from differences from right to left over a fixed timespan, if positive, and then I could create a SUM aggregation over the bucket period on top of it. I am clueless on how to do such thing based on the poor official documentation provided by Microsoft. Any Ideas?

Here are a couple of pictures illustrating my problem and What I am trying to accomplish: sensor loses the cumulative measurement

desired calculation

Mudo
  • 207
  • 3
  • 8

1 Answers1

1

You probably need to add something in the middle (before the IoT Hub/Event Hub) to save the last state of the sensor, and do the appropriate sum if if detects the device was rebooted.

Felipe Pessoto
  • 6,855
  • 10
  • 42
  • 73
  • Yeah, I ended up registering the accumulated value on an Azure Table, and adding it up with an Azure function at every telemetry message recieved... – Mudo Aug 13 '21 at 02:44