Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Power consumption reporting through state.power #423

Closed
ebaauw opened this issue Feb 18, 2018 · 4 comments
Closed

Power consumption reporting through state.power #423

ebaauw opened this issue Feb 18, 2018 · 4 comments

Comments

@ebaauw
Copy link
Collaborator

ebaauw commented Feb 18, 2018

v2.05.04 should support power consumption through the Electrical Measurement cluster. A new attribute, state.power should appear in the /lights resource for plugs (and lights, switches, dimmers, etc) that provide this cluster. It should report the current power consumption in Watt.

I've got this working for the Heiman smart plug and OSRAM Smart+ (new) and LIGHTIFY (old) plugs. The Heiman does support attribute reporting on Active Power, but the OSRAMs don't.

Some remarks:

  • It doesn't work for my ubisys dimmer, presumably because it exposes the Electrical Measurement cluster on a different endpoint with device type Metering Device, which is not whitelisted in addLightNode();
  • For plugs than don't support attribute reporting on Active Power, deCONZ needs to poll the device to update state.power. It does a forced poll, after you switch the plug on or off, but if you just change the consumption of the attached device, without changing state.on of the plug, it might take some time before state.power is updated;
  • No support yet for the Xiaomi plug, which reports power through an Analog Input cluster, see deCONZ enhancements for IAS devices #404 (comment). I suspect the Xiaomi in-wall switches also report power this way, see Add support for Xiaomi wall switch QBKG03LM #335 and Xiaomi Aqara Wall Switches #356.

@manup, I'm not sure if we can support the ubisys, Xiaomi, and others, which provide the Electrical Measurement (or Analog Input) cluster on a different endpoint than the OnOff cluster. Maybe we should expose power as a ZHAPower /sensors resource instead, leveraging the sensor whitelist and ignoring the device type. What are your thoughts on this?

@manup
Copy link
Member

manup commented Feb 18, 2018

2.05.04 is online now for all platforms.

@manup, I'm not sure if we can support the ubisys, Xiaomi, and others, which provide the Electrical Measurement (or Analog Input) cluster on a different endpoint than the OnOff cluster. Maybe we should expose power as a ZHAPower /sensors resource instead, leveraging the sensor whitelist and ignoring the device type. What are your thoughts on this?

Albeit I like the simplicity of state.power in /lights as a API user, a separate ZHAPower fits better in existing way of splitting up resources into various sensors.

@ebaauw
Copy link
Collaborator Author

ebaauw commented Feb 18, 2018

2.05.04 is online now for all platforms.

Thanks!

Albeit I like the simplicity of state.power in /lights as a API user, a separate ZHAPower fits better in existing way of splitting up resources into various sensors.

If the plug supports attribute reporting, this would probably be easier, but if it doesn't we'd need to poll the sensor. It's mains powered, so no big deal, but no easy poll manager.

Anyways, it seems kinda academic: the ubisys reports something, but definitely not the consumption of the attached lights. It varies from 12 (when the dimmer is off) to 5 (when the connected lights are at full birghtness). Maybe the power drawn by the dimmer itself? The OSRAM plugs seems to report 28000 when the power is off, and 400 when their power is on, irrespective what power the the connected device is drawing (or even if a device is connected). It works brilliantly for the Heiman, though.

@bdb12
Copy link

bdb12 commented Apr 25, 2019

Hi Guys

So from what I can read here and with the links the Xiaomi (Lumi.plug) is still not supported in terms of consumption? I am using HA and while I see a consumption entity I cannot see any data in HA. I

Thanks in advance guys :)

@bslefevre
Copy link

bslefevre commented Oct 22, 2019

Hi, I'm using the OSRAM Smart+plugs but Phoscon API is returning me this: (without state.power)
{ "etag": "randomletters", "hascolor": false, "manufacturername": "OSRAM", "modelid": "Plug 01", "name": "On/off - Zolder", "state": { "alert": "none", "on": true, "reachable": true }, "swversion": "V1.04.90", "type": "On/Off plug-in unit", "uniqueid": "xx:xx:xx:xx:xx:xx" }
Using ConBee II - 2.05.67 / 8/26/2019

Is there anything I can do to get state.power shown (and ultimately visible in HASS)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants