SmartThingsEdgeDrivers icon indicating copy to clipboard operation
SmartThingsEdgeDrivers copied to clipboard

Feature/wemo power energy

Open cjswedes opened this issue 2 years ago • 7 comments

Im not convinced in the energy meter reporting of this device at all, in fact it may be worthwhile to only report powerMeter capabilities for the device since it is very inconsistent in its values for energy reports (total energy fluctuates a lot including negative values, and it seems very high)

This implementation is based off the way device report payloads are interpreted here and here

cjswedes avatar Jul 26 '23 22:07 cjswedes

Invitation URL: https://bestow-regional.api.smartthings.com/invite/Q1jP5gB9ZMLd

github-actions[bot] avatar Jul 26 '23 22:07 github-actions[bot]

Test Results

     52 files     333 suites   0s :stopwatch: 1 576 tests 1 576 :heavy_check_mark: 0 :zzz: 0 :x: 2 699 runs  2 699 :heavy_check_mark: 0 :zzz: 0 :x:

Results for commit eb038888.

github-actions[bot] avatar Jul 26 '23 22:07 github-actions[bot]

Minimum allowed coverage is 90%

Generated by :monkey: cobertura-action against eb038888bdee2a306aee0dbcdc203037bb913a30

github-actions[bot] avatar Jul 26 '23 22:07 github-actions[bot]

Due to the weird energy reports I have gotten from the device I see a few options to move this PR forward:

  1. Remove energyMeter cap from the insight devices
  2. Leave it in there as it is now, but implement a profile switch based on a preference value, so that users can opt into the energy reporting, which is somewhat suspect
  3. Implement energy reporting in software. The energy_today_Wh field that is reported seems to be accurate and could be used to keep a running total for the device and periodically emit that total. This would also allow for resetting of the energyMeter since we control the total rather than the device
  4. Implement the powerConsumptionReport capability instead. This sort of seems like option 3 but the capability is setup for it. Although, I am not sure how accurate all the fields are that would be needed from the device, and if the device is actually resetting the energy totals daily.

cjswedes avatar Jul 27 '23 21:07 cjswedes

Since I suggested it, I'm most partial to option 2.

greens avatar Jul 27 '23 22:07 greens