How to properly read power consumption?

I’m attempting to modify the source code of a smart app that I found on GitHub. I would like this app to monitor the power consumption of a fridge, but having trouble finding exactly which data point to read.

Looking at the device itself on the SmartThings Groovy IDE, the fridge has a data structure called powerConsumption, with some sub-properties called deltaEnergy, power and energy. However the deltaEnergy and power properties are always zero, while the energy property has a fixed number that has not changed at all in the past 48 hours (since I started looking at it).

Note: I am reading the powerConsumption property by looking at any devices which have the powerConsumptionReport capability.

Does anybody know what is the right way to look at power consumption?

Welcome @badnetmask! Can you share the link to the SmartApp’s repo, please? I will take a look.

The status of the powerConsumption capability is “proposed” so it would be better to use powerMeter instead.

Doesn’t look like my device exposes powerMeter. Is there some flag I should enable for it to be exposed?

To expand on what I said before: the app can read powerMeter just fine, and I know that because I can see power from some smart plugs, but that’s all. The fridge is not exposed when listing for powerMeter.

Ok, as I understand, you already have the fridge installed in the SmartThings app but the values shown in IDE don’t make sense.
Have you checked the device status using the API?

I’m not checking the API, I am developing a Groovy app on the SmartThings hub.

I checked your fridge status, I see that the power attribute is not being read. So, I need to open an investigation to find out why. Please, send an email to build@smartthings.com with this information:

  • Device model
  • How did you install the device? (through the app, or another method)