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

Question: Which powerplugs supported for Deconz and REST-api (for Home assistant) #432

Closed
geelenbert opened this issue Feb 23, 2018 · 189 comments

Comments

@geelenbert
Copy link

I'm ditching all my Zwave gear and switching to deCONZ.

For some equipment i want to do some power metering (heating, freezer, Server etc..).
But before buying 5 of these plugs....
Which EU powerplugs work with deCONZ and the REST-api ?

Can't really find any good example of one that works.... Please help

@ebaauw
Copy link
Collaborator

ebaauw commented Feb 23, 2018

I have smart plugs from Heiman and from OSRAM. I’m quite impressed by the Heiman smart plug. It even provides ZigBee attribute reporting on the power consumption. The OSRAM plugs work with deCONZ, but don’t report the actual power consumption, even though they support the corresponding ZigBee cluster.

I read that the Xiaomi smart plug als works, but you need an adapter as they have Australian pens. It reports power (in a typical Xiaomi way), but that isn’t yet exposed by deCONZ.

Note that we’re still figuring out the best way to expose power metering in deCONZ.

@geelenbert
Copy link
Author

geelenbert commented Feb 23, 2018

I read that the Xiaomi smart plug als works, but you need an adapter as they have Australian pens. It reports power (in a typical Xiaomi way), but that isn’t yet exposed by deCONZ.

Not looking for adapters in my sockets ;)

The OSRAM plugs work with deCONZ, but don’t report the actual power consumption, even though they support the corresponding ZigBee cluster.

This means they only report the energy consumption (kWh), not the actual used power (W)?

’m quite impressed by the Heiman smart plug. It even provides ZigBee attribute reporting on the power consumption.

So these plugs are the most "Plug and play" sensors you know of ?

Note that we’re still figuring out the best way to expose power metering in deCONZ.

There is currently no power consumption reported by the REST-api ?

@Kane610
Copy link

Kane610 commented Feb 23, 2018

I have yet to implement support for power metering in the hass component. @ebaauw is the details in #423 complete?

@manup
Copy link
Member

manup commented Feb 23, 2018

@geelenbert
Copy link
Author

So the summary is:

  • At this point the REST-api / HASS component but is Work in progress ?
  • Looks like the Heiman plug is the most plug and play compatible, and most price efficient one

@Kane610
Copy link

Kane610 commented Feb 23, 2018

@geelenbert there is always new things to support :)

@geelenbert
Copy link
Author

@Kane610 well i just would like to know if this is on the road map or not. If this is very far out, i might need to look at other options for power-metering of specific devices.

I would love to help in any way possible, but i'm just a simple python script hacker, not really a programmer ....

@Kane610
Copy link

Kane610 commented Feb 23, 2018

@geelenbert it is probably max an hour with testing to get this done. But I just need to know that all information is there. Would be nice to have a full json blob of a device with a reported power attribute.

I'm just a simple python hacker as well, I'm not a developer by profession. It is not hard at all adding support for new functionality from deconz to the hass component. Maybe you should try it out? ;)

@geelenbert
Copy link
Author

@Kane610 Ok i'll order some of these plugs (the Heiman ones) and start messing around with it.
When the time is right, i'll open an issue on your project (https://github.com/Kane610/deconz) and well get it going.

@ebaauw
Copy link
Collaborator

ebaauw commented Feb 23, 2018

I have yet to implement support for power metering in the hass component. @ebaauw is the details in #423 complete?

@Kane610, the details are complete, but not stable. Both the Heiman and the OSRAM serve the Electrical Measurement cluster on the same endpoint as the OnOff cluster, so it was easy to create state.power in the /lights resource. I’m afraid this approach might not work for devices that use a different endpoint, like the Xiaomi plug or the ubisys dimmer. Maybe I’ll need to create a ZHAPower sensor resource instead.

Here's the json of the Heiman plug:

{
  "etag": "97cbc3f6d2f0787875f12e6310477571",
  "hascolor": false,
  "manufacturername": "Heiman",
  "modelid": "SmartPlug",
  "name": "Plug",
  "state": {
    "alert": "none",
    "on": false,
    "power": 0,
    "reachable": true
  },
  "swversion": "",
  "type": "Smart plug",
  "uniqueid": "00:0d:6f:00:0b:xx:xx:xx-01"
}

And here of the OSRAM:

{
  "etag": "e188ff1ce6bee3935b31f43e7da3214e",
  "hascolor": false,
  "manufacturername": "OSRAM",
  "modelid": "Plug 01",
  "name": "Living Room Desk",
  "state": {
    "alert": "none",
    "on": false,
    "power": 0,
    "reachable": true
  },
  "swversion": "V1.05.09",
  "type": "On/Off plug-in unit",
  "uniqueid": "84:18:26:00:00:xx:xx:xx-03"
}

@Kane610
Copy link

Kane610 commented Feb 23, 2018

@geelenbert with the information from @ebaauw I will add the power state in good time for hass' 0.65 release. Then you can verify functionality when you get your plugs.

@Martin-Gardner
Copy link

can anyone recommend some UK supported plugs?

@geelenbert
Copy link
Author

@Kane610 Awsome! But i think that @ebaauw has a point for adding a different resource. I don't know wich one is more future proof?

@Martin-Gardner the Heiman plugs are also available in a UK version

@Martin-Gardner
Copy link

Martin-Gardner commented Feb 23, 2018

@geelenbert - Thanks - Although buying them is going to be hard

@Martin-Gardner
Copy link

Martin-Gardner commented Feb 23, 2018

Where do you guys buy your ZigBee stuff? - It seems there is not much ZigBee related products available in the UK except Philips and Ikea. There is the Samsung stuff but its very expensive - 50 euros for a smart plug.

@ebaauw
Copy link
Collaborator

ebaauw commented Feb 23, 2018

The Xiaomi stuff at the Chinese webshops, gearbest.com or aliexpress.com, most of the EU stuff at amazon or my local webshops.

@tleegaard
Copy link

I haven't had luck finding the Heiman Plug (HS2SK-E-EU) at any of those places. Do you know where they can be bought? :-)

@geelenbert
Copy link
Author

Well i also looking hard for some of the Heiman plugs, if i find anything i will let you know.

@ebaauw what is the difference between the Osram and the Heiman plug ? Does the Osram plug not report the current power (W), only the used energy (kWh)?

@ebaauw
Copy link
Collaborator

ebaauw commented Feb 23, 2018

The OSRAM reports 28000 (deciWatt, I guess) when off and 400 when on. Regardless whether anything is drawing power or even connected. The Heiman reports the actual power drawn (so 0 when the plug is on, but the connected device is off). Also, the Heiman supports attribute reporting on Active Power, which means deCONZ is updated quickly when the power consumption changes. Otherwise the change won’t be visible until the next time the plug is polled.

@ebaauw
Copy link
Collaborator

ebaauw commented Feb 23, 2018

Here's some screenshots of the Heiman. Note that is does not support groups (deCONZ lets you add it to a group, but it won't respond to group commands). Also, it supports reporting Voltage and Current (Ampere) in the Electrical Measurement cluster. So much to do...
I have no clue what, if anything, the Simple Metering cluster does.
untitled
untitled 2
untitled 3
untitled 4

Here's the attribute reporting, also works for Voltage and Current:
untitled 6

And here when the connected fan is on:
untitled 5

@ebaauw
Copy link
Collaborator

ebaauw commented Feb 23, 2018

Here's some screenshots from the OSRAM. Up to 8 groups, but no useful power measurement. I have no clue what the 0xFC0F cluster does. OSRAM lights enable setting the power-on defaults through a custom cluster, but I haven't found anything similar in the Lightify app for the plug.

untitled
untitled 2
untitled 3

This is when the plug is off:
untitled 4

And this when it's on, with nothing connected:
untitled 5

@geelenbert
Copy link
Author

@ebaauw the simple metering looks like it will give you the used energy in kWh.

See it like this:
The power (Watt) is the amount of energy that a devices uses at one point in time.
The Energy is the (kWh) is how much energy was used in an hour. (kilo Watt's per Hour)

if a device uses 1000 Watt and is constantly turned on, this will result un a use of 1kWh after one hour, 2kWh after 2 hours etc...

This is actualy the most interesting part of the plugs. It is nice to know how what the active power of a device is, but it is much more interesting how much engery it used over the last hour (calculate what the electricity costs for that device where)

@ebaauw
Copy link
Collaborator

ebaauw commented Feb 23, 2018

Here's some photos of the OSRAM, Heiman, and an Elgato Eve (from left to right). I might be challenging to place two Heimans above each other if you have multiple outlets stacked vertically.

img_8070
img_8567
img_9932

@ebaauw
Copy link
Collaborator

ebaauw commented Feb 23, 2018

I haven't had luck finding the Heiman Plug (HS2SK-E-EU) at any of those places. Do you know where they can be bought?

I got mine on loan from @Oggymator at led-trading.de. They don't yet sell them online, but they should become available in the next months.

@ebaauw
Copy link
Collaborator

ebaauw commented Feb 23, 2018

This means they only report the energy consumption (kWh), not the actual used power (W)?
@ebaauw the simple metering looks like it will give you the used energy in kWh.

As far as I can tell the Simple Metering cluster doesn't report anything. I might need to dive into the ZCL specs and add some attributes to general.xml. Also, I only added the attributes to the Electrical Measurement cluster that my ubisys dimmer supports. As I said: so much to do...

This is actualy the most interesting part of the plugs. It is nice to know how what the active power of a device is, but it is much more interesting how much engery it used over the last hour (calculate what the electricity costs for that device where)

You mean something like this:
img_0017

This is actually the homebridge-p1 plugin that I created today. It reads the smart electricity meter that the electricity network company installed in my home last week.

I'm doing the same for homebridge-hue, here's the Heiman, but still on my test network with plenty if restarts, so no data yet. Here I actually compute the consumption by multiplying the power by the duration.
img_0014
img_0015

@ebaauw
Copy link
Collaborator

ebaauw commented Feb 23, 2018

The Energy is the (kWh) is how much energy was used in an hour. (kilo Watt's per Hour)

Actually kiloWatt hour (kW times hour), not kiloWatt per hour.

@geelenbert
Copy link
Author

Here I actually compute the consumption by multiplying the power by the duration.

@ebaauw that is not the correct way to do that. As the power changes over time, the calculation will be incorrect. The only reliable way to do this is by getting the (total) energy consumption from a plug.
Such a calculation may give an indication, but will never be realy accurate.
An energy meter measures the used power at around 400 Hz, and then calculates the used energy for that small time.

@ebaauw
Copy link
Collaborator

ebaauw commented Feb 24, 2018

I do the calculation each time the power value changes, using the duration since the previous change. I’m pretty sure the plugs have a far lower update frequency than the electricity meter, though.

I’ll be more than happy to use the (total) consumption, as I do for the electricity meter, as soon as we’ve found if and how each plug reports this.

@ebaauw
Copy link
Collaborator

ebaauw commented Feb 24, 2018

OK, looks like we have a bug in the deCONZ GUI, causing it not to display the value of the Current Summation Delivered attribute (0x0000) of the Metering cluster (0x0702). Maybe uint48 is too much for the GUI? @manup?

I setup attribute reporting manually and deCONZ receives the reports allright:

Feb 24 11:18:50 pi deCONZ[13192]: 11:18:38:251 ZCL attribute report 0x000D6F000B7A7837 for cluster 0x0702, ep 0x01

Wireshark confirms that the data is there when I read the attributes from the GUI:

untitled

I wonder if there is a way to reset the total? That would be particularly cool for my electricity meter, but, unfortunately, the end-consumer interface is read-only ;-)

Next, we need to figure out where to place the decimal point...

@manup
Copy link
Member

manup commented Feb 24, 2018

OK, looks like we have a bug in the deCONZ GUI, causing it not to display the value of the Current Summation Delivered attribute (0x0000) of the Metering cluster (0x0702). Maybe uint48 is too much for the GUI? @manup?

Yes it's likely missing, I'll check and add it for the next version.

@bubffm
Copy link

bubffm commented May 26, 2019

Simple solution to a stupid omission. Thanks

@bubffm
Copy link

bubffm commented May 29, 2019

This may be the wrong threat, but one more question on the innr SP 120:

This plug has a status light (blue/red). Is there a possibility to have an option to switch this off? I have one plug near my bed and the light is a bit disturbing. Thanks

@kasteleman
Copy link

kasteleman commented May 29, 2019 via email

@bubffm
Copy link

bubffm commented May 29, 2019

Thanks for checking. I'll put some tape over it or find a better location. Maybe they can address this in a later firmware upgrade.

@kasteleman
Copy link

kasteleman commented May 29, 2019 via email

@jurriaan
Copy link
Contributor

Just bought a Bitron plug for power monitoring, but noticed that it only creates a ZHAConsumption sensor, not ZHAPower. Because of this it's not possible to monitor the power usage in Home Assistant, while it is available as an attribute on the ZHAConsumption state.

Do you know more about this @ebaauw? I saw your responses on an issue about this plug.

@ebaauw
Copy link
Collaborator

ebaauw commented Jul 21, 2019

Just bought a Bitron plug for power monitoring, but noticed that it only creates a ZHAConsumption sensor, not ZHAPower.

Yes, see the Wiki. The ZHAConsumption resource is linked to the Simple Metering cluster; the ZHAPower to Electrical Measurement.

@jurriaan
Copy link
Contributor

Yeah, I found that, so this is a problem in Home Assistant?

Should power metering via the ZHAConsumption resource be supported in home assistant @Kane610? I only see a consumption sensor in home assistant, the power sensor is missing.

@Uakkauakkafo
Copy link

Hello, I have an Osram plug, I connected that to deconz SW, infact I see that plug in that way:

image

after I search it in Postman (with this command: "DECONZ-IP:PORT/api/token/lights") and I see that:

image

Now the problem is in Home Assistant where I see this plug only as sensor:

image

In that Way I can only see if the plug is ON or OFF but I'm not able to change the state.

Any suggestion or Idea on how to integrate that plug in Home Assistant as Light or Switch?

thanks

@Smanar
Copy link
Collaborator

Smanar commented Aug 23, 2019

All seem normal on deconz, I think the problem is more from Home assistant.

@ebaauw
Copy link
Collaborator

ebaauw commented Aug 23, 2019

One aspect to double-check when evaluating smart plugs is the power rating. The innr plugs are rated for 10A (which should amount to ~2300W at 230V). My washing machine is rated 10A and 2200W, but the innr plug would turn off spontaneously. My dryer is rated 16A and 2350W, and actually broke a couple of innr plugs (before checking the rating...). The Heiman plug is rated 16A and 3000W and has been working flawlessly with my washing machine for well over a year.

I ordered a second Heiman plug for my dryer from AliExpress, which arrived yesterday. It has newer firmware than my old plug. It now exposes a Date Code ("2018.1.11") and Groups and OTAU clusters. Not sure were we would get the firmware updates from...

@pergolafabio
Copy link

Hi @ebaauw, can you share that AliExpress link?

@ebaauw
Copy link
Collaborator

ebaauw commented Sep 9, 2019

I'm not sure; they constantly change the site, but it looks like this one: https://nl.aliexpress.com/item/32839165490.html?spm=a2g1y.12024536.productList_11977830.pic_3

@pergolafabio
Copy link

Ok, thx in advance, gonna try these ones out, at the moment I have Osram, they work good, but not reliable for as router with my xiaomi pir sensors...
Do you have xiaomi pir sensors?

@ebaauw
Copy link
Collaborator

ebaauw commented Sep 9, 2019

No, I use Hue motion sensors. Had some issues in the past when deCONZ was losing the route to them, but they’ve been rock solid since v2.05.60 and 0x26320500. See #849.

@pergolafabio
Copy link

Ok, interesting, do the hue motion also provide lux?

@jurriaan
Copy link
Contributor

jurriaan commented Sep 9, 2019

I wouldn't use those Heiman plugs any more. You can find multiple instances of it catching fire if you Google for it. For example: https://community.smartthings.com/t/heiman-hs2sk-z-smart-plug-fire-hazard/118358

I actually purchased one of these plugs and found that something was loose inside the plug (you could hear something rattling around). So I opened it and found a loose screw. So no more heiman for me 😅

@pergolafabio
Copy link

So what do you use as router? Seems heiman was not suitable for me anyway, I need EU version, the one in above link was for Netherlands

@ebaauw
Copy link
Collaborator

ebaauw commented Sep 9, 2019

For example: https://community.smartthings.com/t/heiman-hs2sk-z-smart-plug-fire-hazard/118358

That's a Z-Wave plug, not ZigBee, and the thread suggests it's not an original Heiman.
I only have two Heiman ZigBee plugs (EU version), and (knock on wood) they're not causing any issues for me. There's not that many ZigBee plugs out there that can handle 3000W and report consumption.

Ok, interesting, do the hue motion also provide lux?

Yes, and temperature (although the temperature is not very accurate). It's one of the few motion sensors that actually report no motion, with a delay that's configurable on the sensor. No config.duration timer needed. The motion sensitivity can be configured at three levels. It runs on two AAA batteries that last well over a year. And they're firmware upgradable (but we haven't yet found a way to download the firmware for deCONZ, so you need the Hue bridge for this).

Here's the REST API resources:

{
  "config": {
    "alert": "select",
    "battery": 100,
    "delay": 0,
    "ledindication": false,
    "on": true,
    "pending": [],
    "reachable": true,
    "sensitivity": 2,
    "sensitivitymax": 2,
    "usertest": false
  },
  "ep": 2,
  "etag": "9714d2a3aaf6e01eeb341aaed12918d6",
  "manufacturername": "Philips",
  "modelid": "SML001",
  "name": "Hallway Motion",
  "state": {
    "lastupdated": "2019-09-09T17:26:59",
    "presence": false
  },
  "swversion": "6.1.0.18912",
  "type": "ZHAPresence",
  "uniqueid": "00:17:88:01:02:00:ac:85-02-0406"
}
{
  "config": {
    "alert": "none",
    "battery": 100,
    "ledindication": false,
    "on": true,
    "pending": [],
    "reachable": true,
    "tholddark": 12000,
    "tholdoffset": 4000,
    "usertest": false
  },
  "ep": 2,
  "etag": "9714d2a3aaf6e01eeb341aaed12918d6",
  "manufacturername": "Philips",
  "modelid": "SML001",
  "name": "Hallway Light Level",
  "state": {
    "dark": true,
    "daylight": false,
    "lastupdated": "2019-09-09T17:26:59",
    "lightlevel": 6444,
    "lux": 4
  },
  "swversion": "6.1.0.18912",
  "type": "ZHALightLevel",
  "uniqueid": "00:17:88:01:02:00:ac:85-02-0400"
}
{
  "config": {
    "alert": "select",
    "battery": 100,
    "ledindication": false,
    "offset": 0,
    "on": true,
    "pending": [],
    "reachable": true,
    "usertest": false
  },
  "ep": 2,
  "etag": "a5d387a97fda48c44d05763b3063dd8f",
  "manufacturername": "Philips",
  "modelid": "SML001",
  "name": "Hallway Temperature",
  "state": {
    "lastupdated": "2019-09-09T17:25:07",
    "temperature": 2073
  },
  "swversion": "6.1.0.18912",
  "type": "ZHATemperature",
  "uniqueid": "00:17:88:01:02:00:ac:85-02-0402"
}

@pergolafabio
Copy link

Thnx for the detailed info... Gonna use the Philips sensor as a backup...
I am also quite happy withy xiaomi sensors, they work verry good and instant, long battery, and verry small and cheap...
The only issue I have is that they sometimes just don't react, and 5 minutes later , they are working again... I thibk it's because of the routing with my osrams... Heiman is not possible for me, I need BE plugs, heiman are NL ... So gonna try first Ikea smart plugs, then as a last resort the Philips motion

@ebaauw
Copy link
Collaborator

ebaauw commented Sep 9, 2019

Be advised that IKEA plugs don't do power measurement.

@pergolafabio
Copy link

yes i know, but actually i just need routers
my conbee is on second floor, on first floor i have a osram router, and 3 xiaomi, all xiaomi are verry good
on ground floor another osram, and 1 xiaomi, that one is giving me headaches, probably because its using 2 osrams to reach the conbee
20% of the time its not reliable

i dont have bulbs , dont need them, so i am left with smart plug :)

@ebaauw
Copy link
Collaborator

ebaauw commented Sep 9, 2019

Or the Trådfri repeater?

@pergolafabio
Copy link

yes, but then i need to give up the switch in my wall, still want to use it
and i dont need usb chargers anyway :)

@donchrizz
Copy link

Quick Summary from my side:
Osram Smart+ Pro: Works well, cheap / Cons: No consumption monitoring, big design
innr sp120: works well, power consumption monitoring / Cons: only 2300W, overload switch-off, when dish washer turns ons
heimann: not bought yet, seems to be a chinese xiaomi style product from shenzhen with doubtful reliabilty?

anyone has any suggestions for a reliable, cheap plug with consumption monitoring to min. 2600W ?

@BeamMeUpTo
Copy link

Does anybody know, how to reset the consumption counter of the "innr SP120" - did not find a writeable register in deconz to clear?

Any hints?

@ebaauw
Copy link
Collaborator

ebaauw commented Nov 26, 2019

Factory reset the plug (and re-pair afterwards).

@stale
Copy link

stale bot commented Mar 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@Mimiix
Copy link
Collaborator

Mimiix commented Jun 6, 2020

It seems this issue is resolved or otherwise inactive. If it is not, please re-open!

@Mimiix Mimiix closed this as completed Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests