Reporting consumption to SmartThings Energy and possible issues

I’ve seen two strategies in stock drivers to report to ST Energy, which apparently mandates the reports must be spaced at least 15 minutes.

First strategy (no polling, no start-end info): assume you’re subscribed to the energy reports of the device so no need for polling, keep the time of the last time you reported to ST Energy and if it’s been more than 15 minutes, calculate the delta and emit the event.

Second strategy (polling, start-end): use polling every 15 minutes, keep the time of the last time you reported to ST Energy, calculate the delta and emit the event including a start and end time.

I find the first approach better since there’s no polling involved and no need to manage timers.

Also, the start and end attributes in the powerConsumptionReport events are prone to errors, especially if you have a custom driver and switch back to stock driver. In that case, the deltaEnergy will be correct since it’s calculated from the most recent value cached, but the start will be incorrect since it will be the last time the stock driver sent the report, not the last time a report was sent (by the custom driver).

The questions:

  • Are those two approaches equally good?
  • Are the start and end attributes actually needed?

Hi, @mocelet

Are you looking to certify a device and to be supported in SmartThings energy? Getting a device to appear there requires it to go through a special process during WWST certification.

Hi @nayelyz , it’s to create a custom driver for a device that is already supported in SmartThings Energy.

Hi, @mocelet

I checked with the engineering team, and both approaches currently work in ST Energy.
However, we encourage Partners to send a value in “end” and “start” for future reference and troubleshooting purposes.
Also, implementing the capability does not ensure the device will function with ST Energy. Only certified devices that have gone through the special process I mentioned earlier will work for certain.

4 Likes

Perfect, thanks as always @nayelyz

1 Like