zha-device-handlers icon indicating copy to clipboard operation
zha-device-handlers copied to clipboard

[Device Support Request] aqara Smart Radiator Thermostat E1

Open garv3 opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. The device offers some functionality that is not supported. climate.turn_off does not switch the device into the off state which closes the valve (aka summer mode). The device probably does not support most havac modes since it's just a radiator valve but these modes are displayed. Linking the device to another thermometer is possible but not supported by zha. Battery state is unknown. Most important: The device supports an "OFF" state which closes the valve permanently and an "ON" state which completely opens it ignoring any temperature measured by the device. This should be controllable by Home Assistant. and many more

Describe the solution you'd like All features should be supported.

Device signature
{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4447, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=11264, maximum_outgoing_transfer_size=100, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0301",
      "in_clusters": [
        "0x0000",
        "0x0001",
        "0x0003",
        "0x000a",
        "0x0201",
        "0xfcc0"
      ],
      "out_clusters": [
        "0x0003",
        "0x0201",
        "0xfcc0"
      ]
    }
  },
  "manufacturer": "LUMI",
  "model": "lumi.airrtc.agl001",
  "class": "zigpy.device.Device"
}
Diagnostic information
Cannot be downloaded (works for other devices). See logs!
Additional logs
Logger: aiohttp.server
Source: components/zha/diagnostics.py:153
First occurred: 18:20:42 (14 occurrences)
Last logged: 18:25:01

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 82, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/diagnostics/__init__.py", line 234, in get
    data = await info[sub_type.value](hass, config_entry, device)
  File "/usr/src/homeassistant/homeassistant/components/zha/diagnostics.py", line 101, in async_get_device_diagnostics
    device_info[CLUSTER_DETAILS] = get_endpoint_cluster_attr_data(zha_device)
  File "/usr/src/homeassistant/homeassistant/components/zha/diagnostics.py", line 123, in get_endpoint_cluster_attr_data
    ATTR_IN_CLUSTERS: {
  File "/usr/src/homeassistant/homeassistant/components/zha/diagnostics.py", line 126, in <dictcomp>
    **get_cluster_attr_data(cluster),
  File "/usr/src/homeassistant/homeassistant/components/zha/diagnostics.py", line 152, in get_cluster_attr_data
    UNSUPPORTED_ATTRIBUTES: {
  File "/usr/src/homeassistant/homeassistant/components/zha/diagnostics.py", line 153, in <dictcomp>
    f"0x{cluster.find_attribute(u_attr).id:04x}": {
  File "/usr/local/lib/python3.10/site-packages/zigpy/zcl/__init__.py", line 188, in find_attribute
    return self.attributes[name_or_id]
KeyError: 900

Additional context Nothing to add. Thanks in advance!

garv3 avatar Sep 15 '22 16:09 garv3

No news on this? Has been implemented for zigbee2mqtt ages ago...

garv3 avatar Oct 14 '22 20:10 garv3

The device also automatically detects open windows in the room. Maybe this could also be added?

sroettering avatar Oct 27 '22 08:10 sroettering

Afaik Zigbee2MQTT has better support (but I still have not really understood zigbee 😓) so it might be able to port some of the config? I am willing to help/debug/provide whatever is needed but I have no idea where to get started really :/

TobiasBales avatar Nov 01 '22 20:11 TobiasBales

FYI, I bought this device because Home assistant explicitly recommends this specific device: This TRV can be controlled directly from Home Assistant using Zigbee or via the Aqara hub.

Not that its any of your business what Paulus writes in his blogs, but I'm expecting more people with this issue...

xatr0z avatar Nov 17 '22 20:11 xatr0z

Is there a documentation on how to implement this stuff or a new device support? I would like to help and write the implementation.

hraschan avatar Nov 27 '22 10:11 hraschan

The readme in this repo

dmulcahey avatar Nov 27 '22 11:11 dmulcahey

Still nothing. What a shame. I think, I will switch to zigbee2mqtt as soon as the stick for matter arrives...

garv3 avatar Dec 08 '22 00:12 garv3

I'd really appreciate this, since I have multiple thermostats - all without battery status.

jzielke84 avatar Dec 30 '22 16:12 jzielke84

I do have to say i wanted to use zha since it seems to be the newer go to thing and also looked more refined gui wise, but I switched to zigbee2mqtt like many others did and the range and stability as well as the device support is just way better as of now. I doubt this will change that soon.

xF4m3 avatar Jan 01 '23 20:01 xF4m3

I have created a quirk that is working fine for me. I have uploaded a gist so more people can try it out and if its stable maybe this can be included in offical build.

https://gist.github.com/jymdman/3761b343fe15deb222c430b93e44b08a

No settings is showing up in Home Assistant, but you can control it with cluster commands. I also have created a blueprint for using external sensor temperature with the thermostat.

https://gist.github.com/jymdman/2ff42543ae4b10fae3217259ad97ad6b

jymdman avatar Jan 11 '23 17:01 jymdman

I have created a quirk that is working fine for me. I have uploaded a gist so more people can try it out and if its stable maybe this can be included in offical build.

https://gist.github.com/jymdman/3761b343fe15deb222c430b93e44b08a

@jymdman What exactly is working for you? I have added the quirk, restarted HA and reconfigured the device but nothing changed - still no battery percentage etc. Is it necessarry to relink the device?

garv3 avatar Jan 13 '23 19:01 garv3

@garv3 Yes, you have to remove and add the device for the quirk to work.

jymdman avatar Jan 13 '23 23:01 jymdman

@jymdman Does turning trv off work for you? I tried your quirk but turning thermostat off doesn't work. Status in HA is set to off, but device doesn't turn off.

ostojan avatar Jan 17 '23 18:01 ostojan

@jymdman Does turning trv off work for you? I tried your quirk but turning thermostat off doesn't work. Status in HA is set to off, but device doesn't turn off.

At least for me this does not work using the TRV option. You could change the TRV mode using the OppleCluster (in). You will have to set the system_mode attribute to 0 to turn the valve off (summer mode) or 1 to turn it on again (normal operation). This cannot be done from the UI. You will have to use an automation, node-red or a script.

garv3 avatar Jan 18 '23 09:01 garv3

Just have a question. Is it possible to set the target temperature for this device based on the time trigger? I don't get any options to do this with automation (from the HA UI).

I get mode options in the UI and I don't think these modes even work. And battery is still unknown for me even after using the quirk mentioned above.

image

@jymdman Does turning trv off work for you? I tried your quirk but turning thermostat off doesn't work. Status in HA is set to off, but device doesn't turn off.

At least for me this does not work using the TRV option. You could change the TRV mode using the OppleCluster (in). You will have to set the system_mode attribute to 0 to turn the valve off (summer mode) or 1 to turn it on again (normal operation). This cannot be done from the UI. You will have to use an automation, node-red or a script.

crypticviper avatar Jan 25 '23 19:01 crypticviper

Then doing the automation you must selecting service and Climate: Set temperature as action. With device you dont have the climate functions only normal switching functions.

MattWestb avatar Jan 25 '23 21:01 MattWestb

It's a shame such a kind of product don't have a full support from ZHA. I don't really mind for the rest of the modes that are showing...as I just don't use them, but the battery state is a problem. Thumbs Up for battery level!

msolomos avatar Jan 29 '23 12:01 msolomos

@msolomos Did you check with Home Assistant 2023.2.0 betas?

TheJulianJES avatar Jan 29 '23 12:01 TheJulianJES

@msolomos Did you check with Home Assistant 2023.2.0 betas?

I haven't no. I don't really try beta versions to be honest as I had a bad experience at the past. But does it worth?
Has it got a fix ?? Does this applies also to Aqara E1 curtain driver?

msolomos avatar Jan 29 '23 13:01 msolomos

@msolomos Did you check with Home Assistant 2023.2.0 betas?

I haven't no. I don't really try beta versions to be honest as I had a bad experience at the past. But does it worth?
Has it got a fix ?? Does this applies also to Aqara E1 curtain driver?

In this thread, the merged https://github.com/zigpy/zha-device-handlers/pull/2068 is mentioned, adding Support for battery but only the thermostat.

margau avatar Jan 29 '23 13:01 margau

In this thread, the merged #2068 is mentioned, adding Support for battery but only the thermostat.

I have seen this threat but I think I will wait for the official realize.

msolomos avatar Jan 29 '23 14:01 msolomos

@msolomos Did you check with Home Assistant 2023.2.0 betas?

I tried the 2023.2.0 last night. It didn't make any difference. As another bug came up with my tablet's webview I had to revert to previous version.

I will keep looking into this, but until now for me it doesn't work.

msolomos avatar Feb 02 '23 07:02 msolomos

@msolomos Did you check with Home Assistant 2023.2.0 betas?

I tried the 2023.2.0 last night. It didn't make any difference. As another bug came up with my tablet's webview I had to revert to previous version.

I will keep looking into this, but until now for me it doesn't work.

I haven’t had time yet to test new version and I’ll be testing it maybe this evening, but have you removed device from ZHA and added it back again?

ostojan avatar Feb 02 '23 08:02 ostojan

I have created a quirk that is working fine for me. I have uploaded a gist so more people can try it out and if its stable maybe this can be included in offical build.

https://gist.github.com/jymdman/3761b343fe15deb222c430b93e44b08a

No settings is showing up in Home Assistant, but you can control it with cluster commands. I also have created a blueprint for using external sensor temperature with the thermostat.

https://gist.github.com/jymdman/2ff42543ae4b10fae3217259ad97ad6b

Could this blueprint be tweaked to work with https://zigbee.blakadder.com/houseiq_GTZ02.html that is essentially the same hardware as the Aqara TRV? I have one of each device and they're identical!

rahulpdev avatar Feb 08 '23 15:02 rahulpdev

it is such a shame that OFF state is still not supported. I never thought to switch to Zigbee2Mqtt and to be honest I know that nobody cares if I do :-)

But living on a big house with 12 aqara radiators leaving me with no many options.

And even though battery was fixed, which gave us something to wait for, the most important is still not fixed.

So please, once more, we need the OFF state... Because, at the end of the day, if you can't turn them off, what is the meaning of multi zone heating??

msolomos avatar Feb 13 '23 19:02 msolomos

it is such a shame that OFF state is still not supported. I never thought to switch to Zigbee2Mqtt and to be honest I know that nobody cares if I do :-)

But living on a big house with 12 aqara radiators leaving me with no many options.

And even though battery was fixed, which gave us something to wait for, the most important is still not fixed.

So please, once more, we need the OFF state... Because, at the end of the day, if you can't turn them off, what is the meaning of multi zone heating??

if you check #2109 looks like the off function is being implemented. in the meantime if you wanna turn off a zone you can just use the cluster comand or, as i do, just set a very low temperature even if i'm not shure is a good thing to do

anyrandomguy92 avatar Feb 13 '23 21:02 anyrandomguy92

if you check #2109 looks like the off function is being implemented. in the meantime if you wanna turn off a zone you can just use the cluster comand or, as i do, just set a very low temperature even if i'm not shure is a good thing to do

@anyrandomguy92 thank you for your prompt reply. I noticed #2109 and I am very excited. Do we know when it will be available ??

msolomos avatar Feb 14 '23 08:02 msolomos

I’ll also switch to MQTT anyway since the battery status is properly exposed there. I’m tired of all this quirk stuff which sometimes relies on just one person.

jzielke84 avatar Feb 14 '23 09:02 jzielke84

I’ll also switch to MQTT anyway since the battery status is properly exposed there. I’m tired of all this quirk stuff which sometimes relies on just one person.

if you are going to switch to MQTT just for the battery state I would say not, because it is already supported. If you want to switch for the rest features I would say just wait for the #2109 ..

msolomos avatar Feb 14 '23 09:02 msolomos

Bought a thermostat and will try to work on this soon:

  • https://github.com/zigpy/zha-device-handlers/pull/2238

You can probably already test the mode stuff when using it as a custom quirk. Please report back if it works or if you find any issues.

TheJulianJES avatar Feb 28 '23 20:02 TheJulianJES