Yoda-x / ha-zha-new

update of the zha component
56 stars 10 forks source link

Power measurement for Iris Plug / Centralite 3210-L #55

Closed aletus closed 5 years ago

aletus commented 5 years ago

Hi,

Just switched from zha to zha_new on HA 0.80. Everything seems okay at least from the log and start up stand point.

However all the entities got recreated and needed to be rename again. This seems to be cause by zha_new using slightly different unique id, ie. xx:xx:xx_1 instead of xx:xx:xx-1 for example. Not sure why we need a slightly different name, otherwise I could have search and replace the platform "zha" to "zha_new" in the entity registry.

However in the process of renaming things, I realized some existing sensor were missing, specifically the power measurement for the Iris plug, 3210-L. The switch still shows up on zha_new, just the associated power sensor measurement sensor went missing.

This works in zha so maybe a missing merge?

Here was the original entities from the registry:

        {
            "config_entry_id": null,
            "device_id": null,
            "disabled_by": null,
            "entity_id": "switch.living",
            "name": "living",
            "platform": "zha",
            "unique_id": "xx:xx:xx:xx:xx:xx:xx:xx-1"
        },
        {
            "config_entry_id": null,
            "device_id": null,
            "disabled_by": null,
            "entity_id": "sensor.power_living",
            "name": "power_living",
            "platform": "zha",
            "unique_id": "xx:xx:xx:xx:xx:xx:xx:xx-1-2820"
        },
        {
            "config_entry_id": null,
            "device_id": null,
            "disabled_by": null,
            "entity_id": "sensor.power_living_2",
            "name": "power_living_2",
            "platform": "zha",
            "unique_id": "xx:xx:xx:xx:xx:xx:xx:xx-1-1794"
        },

So only the -1 switch shows up on zha_new, the -1-2820 sensor and -1-1794 sensors does not show up.

Would you be able take a look? I specifically purchased these plugs for the power measurement aspect.

Thanks,

Yoda-x commented 5 years ago

Hi, answer to both questions is that zha_new drifted away from zha some month ago, before both features were implemented. Why you want to use zha_new if you see your devices on zha? I assume device support is better on zha I will add the electrical measurement cluster for the master release

aletus commented 5 years ago

Thanks. I didn't realized the two projects diverged. Just assumed you are still tracking and merging zha changes and since development zha slowed down and you are the new zha (hence the new zha_new) with some new features.

What's the current status of zha_new then?

Main reason I switched at this point even because recently after HA upgrade, zha stopped working after a few hours for me with messages like "HA status update from zha takes longer than 30 seconds". Strange because HA 0.80 didn't have any zha update but it stopped working.

After searching the forum it appeared zha_new worked around this by staggering the init call per device.

So far after 12 hours I haven't seen the same message on zha_new so seems to resolve that issue.

Yoda-x commented 5 years ago

I stopped providing updates to zha when they added the quirks patch. This broke my versions.

You may try my bellows with Zigpy and zha from mainstream. All the changes for the timeout issue are in there. It may work or not. Not sure if rcloran made any significant changes to it in the last months.

Nevertheless I will add the support for this cluster. But longtime the device support is better for zha.

Yoda-x commented 5 years ago

A new master version is out, please try and let me know if it works for you. I can't test it really, so please be patient:wink:

Yoda-x commented 5 years ago

no feedback, seems ok