zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

[New device support]: Aqara Climate Sensor W100 X0028HPT89

Open on-off-on opened this issue 1 year ago • 171 comments

Link

https://www.aqara.com/eu/product/climate-sensor-w100/

Database entry

{"id":52,"type":"EndDevice","ieeeAddr":"0x54ef441001265aab","nwkAddr":14243,"manufId":4447,"manufName":"Aqara","powerSource":"Battery","modelId":"lumi.sensor_ht.agl001","epList":[1,2,3],"endpoints":{"1":{"profId":260,"epId":1,"devId":770,"inClusterList":[18,1029,1026,1,3,0,64704],"outClusterList":[25],"clusters":{"msRelativeHumidity":{"attributes":{"measuredValue":4000}},"genBasic":{"attributes":{"61441":2,"modelId":"lumi.sensor_ht.agl001"}},"manuSpecificLumi":{"attributes":{"22":"3DC59BEA8B24719A4E92164951599C245245A9A2E505C68A9417CA0BEB6E413F","32":4,"223":{"type":"Buffer","data":[40,35,64,0,0,0,3,35,90,0,0,0,4,33,2,0,5,33,0,0,41,35,0,0,0,0,42,35,0,0,0,0,43,33,126,52,44,41,163,255]},"238":3620,"247":{"type":"Buffer","data":[3,40,24,4,33,0,0,5,33,3,0,10,33,126,52,12,32,10,13,35,36,14,0,0,19,32,0,100,41,142,9,101,33,236,15,102,32,100,103,32,0]},"252":0,"354":1000,"355":30000,"356":50,"357":1,"358":-2000,"359":6000,"360":0,"362":30000,"363":300,"364":1,"365":0,"366":9999,"367":0,"368":2,"370":0,"371":0}},"msTemperatureMeasurement":{"attributes":{"measuredValue":2600}},"genPowerCfg":{"attributes":{"batteryPercentageRemaining":0}}},"binds":[{"cluster":1029,"type":"endpoint","deviceIeeeAddress":"0x00124b0026b82e49","endpointID":1},{"cluster":1026,"type":"endpoint","deviceIeeeAddress":"0x00124b0026b82e49","endpointID":1},{"cluster":1,"type":"endpoint","deviceIeeeAddress":"0x00124b0026b82e49","endpointID":1}],"configuredReportings":[{"cluster":1029,"attrId":0,"minRepIntval":10,"maxRepIntval":3600,"repChange":100},{"cluster":1026,"attrId":0,"minRepIntval":10,"maxRepIntval":3600,"repChange":100},{"cluster":1,"attrId":33,"minRepIntval":3600,"maxRepIntval":65000,"repChange":10}],"meta":{}},"2":{"profId":260,"epId":2,"devId":0,"inClusterList":[18],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"3":{"profId":260,"epId":3,"devId":0,"inClusterList":[18],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":36,"stackVersion":27,"hwVersion":12,"dateCode":"20250417","zclVersion":3,"interviewCompleted":true,"meta":{"configured":332242049},"lastSeen":1745962646753}

Zigbee2MQTT version

2.2.1

Comments

Checkes actual version of zigbee2mqtt, checked supported devices on website

External definition

import * as m from 'zigbee-herdsman-converters/lib/modernExtend';

export default {
    zigbeeModel: ['lumi.sensor_ht.agl001'],
    model: 'lumi.sensor_ht.agl001',
    vendor: 'Aqara',
    description: 'Automatically generated definition',
    extend: [m.deviceEndpoints({"endpoints":{"1":1,"2":2,"3":3}}), m.humidity(), m.temperature(), m.battery()],
    meta: {"multiEndpoint":true},
};

What does/doesn't work with the external definition?

3 switches with press, double, long are not supportet, external inputs not supported

on-off-on avatar Apr 29 '25 21:04 on-off-on

further details: https://csa-iot.org/csa_product/climate-sensor-w100/

on-off-on avatar Apr 29 '25 21:04 on-off-on

Support has been added in last release. Everything seems to be working on Z2m. However actions don't report on HA and I can't get the external sensor working from HA either.

sylvaindd avatar May 06 '25 20:05 sylvaindd

However actions don't report on HA and I can't get the external sensor working from HA either.

My switches work. I can switch things via automation (see example). But what doesn't work is that the display shows values from the outdoor sensor. This interface doesn't seem to have been implemented. But i'd rather have no display than have aqara on my home assistant. Still... I miss that feature too!

alias: Aqara W100 - Master Schalter Aktionen
description: ""
triggers:
  - entity_id: sensor.eg_master_schalter_action
    trigger: state
conditions: []
actions:
  - choose:
      - conditions:
          - condition: state
            entity_id: sensor.eg_master_schalter_action
            state: single_plus
        sequence:
          - target:
              area_id: wohnzimmer
            action: light.turn_on
            data: {}
      - conditions:
          - condition: state
            entity_id: sensor.eg_master_schalter_action
            state: double_plus
        sequence:
          - data:
              brightness_pct: 1
            target:
              area_id: wohnzimmer
            action: light.turn_on
      - conditions:
          - condition: state
            entity_id: sensor.eg_master_schalter_action
            state: hold_plus
        sequence:
          - data:
              brightness_pct: 100
            target:
              area_id: wohnzimmer
            action: light.turn_on
      - conditions:
          - condition: state
            entity_id: sensor.eg_master_schalter_action
            state: single_minus
        sequence:
          - target:
              area_id: wohnzimmer
            action: light.turn_off
            data: {}
      - conditions:
          - condition: state
            entity_id: sensor.eg_master_schalter_action
            state: double_minus
        sequence:
          - target:
              area_id: erdgeschoss
            action: light.turn_off
            data: {}
      - conditions:
          - condition: state
            entity_id: sensor.eg_master_schalter_action
            state: hold_minus
        sequence:
          - target:
              area_id: haus
            action: light.turn_off
            data: {}
      - conditions:
          - condition: state
            entity_id: sensor.eg_master_schalter_action
            state: single_center
        sequence:
          - data:
              brightness_pct: 100
            target:
              area_id:
                - vorgarten
                - eingang
            action: light.turn_on
      - conditions:
          - condition: state
            entity_id: sensor.eg_master_schalter_action
            state: double_center
        sequence:
          - target:
              area_id: wintergarten
            action: light.turn_on
            data: {}
      - conditions:
          - condition: state
            entity_id: sensor.eg_master_schalter_action
            state: hold_center
        sequence:
          - target:
              area_id:
                - vorgarten
                - eingang
                - wintergarten
            action: light.turn_off
            data: {}
    default: []
mode: single

TechArea avatar May 06 '25 21:05 TechArea

And here's a blueprint:

blueprint:
  name: Aqara W100 – 3 Tasten, 3 Funktionen
  description: Reagiere auf alle 9 möglichen Aktionen des Aqara W100 (TH-S04D)
  domain: automation
  input:
    schalter_sensor:
      name: Action-Sensor
      description: Sensor-Entität mit action-Attribut (z. B. sensor.eg_master_schalter_action)
      selector:
        entity:
          domain: sensor
    action_single_plus:
      name: + einfach
      default: []
      selector:
        action: {}
    action_double_plus:
      name: + doppelt
      default: []
      selector:
        action: {}
    action_hold_plus:
      name: + lang
      default: []
      selector:
        action: {}
    action_single_center:
      name: Mitte einfach
      default: []
      selector:
        action: {}
    action_double_center:
      name: Mitte doppelt
      default: []
      selector:
        action: {}
    action_hold_center:
      name: Mitte lang
      default: []
      selector:
        action: {}
    action_single_minus:
      name: – einfach
      default: []
      selector:
        action: {}
    action_double_minus:
      name: – doppelt
      default: []
      selector:
        action: {}
    action_hold_minus:
      name: – lang
      default: []
      selector:
        action: {}

trigger:
  - platform: state
    entity_id: !input schalter_sensor
    attribute: action

condition: []

action:
  - choose:
      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.attributes.action == 'single_plus' }}"
        sequence: !input action_single_plus

      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.attributes.action == 'double_plus' }}"
        sequence: !input action_double_plus

      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.attributes.action == 'hold_plus' }}"
        sequence: !input action_hold_plus

      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.attributes.action == 'single_center' }}"
        sequence: !input action_single_center

      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.attributes.action == 'double_center' }}"
        sequence: !input action_double_center

      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.attributes.action == 'hold_center' }}"
        sequence: !input action_hold_center

      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.attributes.action == 'single_minus' }}"
        sequence: !input action_single_minus

      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.attributes.action == 'double_minus' }}"
        sequence: !input action_double_minus

      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.attributes.action == 'hold_minus' }}"
        sequence: !input action_hold_minus

TechArea avatar May 06 '25 21:05 TechArea

Funny... I added a second device and got different results. Something isn't working properly. Maybe an Update caused the issue?

TechArea avatar May 07 '25 09:05 TechArea

Ok, I've found the difference. One Z2M config had some modifications. Now it works on both Home Assistant Services.

Z2M config YAML: experimental_event_entities: true legacy_action_sensor: true

TechArea avatar May 07 '25 10:05 TechArea

I just received one of these devices and after switching it to zigbee mode in the Aqara app it paired without a hitch.

Is it likely there'll be ability to be able to take advantage of the HVAC integration in future?

I thought I might be able to work around this by having the button actions control an "external" sensor via automation but publishing the values back to the device is far too slow to make it useful.

I found this post by Aqara's AI bot which isn't particularly helpful: https://forum.aqara.com/t/more-feature-for-w100-on-home-assistant/1051

toksvaeth avatar May 07 '25 12:05 toksvaeth

I made a blueprint for climate control (and customisable actions on double and long presses on buttons) and external sensor display from HA.

Miss the center display availability to have it full fonctionnal (target temperature and climate operation mode), but if it can help !

clementTal avatar May 15 '25 15:05 clementTal

Before I either pull what is left of my hair out or spend hours delving into this, how can you put this into Zigbee mode? From the above it almost sounds like you have to the Aqara hub so that you can pair it via Thread and then download a Zigbee firmware? What if you don't have an Aqara hub?

jamesonuk avatar May 21 '25 17:05 jamesonuk

Before I either pull what is left of my hair out or spend hours delving into this, how can you put this into Zigbee mode? From the above it almost sounds like you have to the Aqara hub so that you can pair it via Thread and then download a Zigbee firmware? What if you don't have an Aqara hub?

You need to download Aqara Home, the device will appear and you'll have to click on switch to Zigbee mode. It will flash the firmware and once it's done it will be able to join Z2M.

No need for any Aqara hardware

sylvaindd avatar May 21 '25 18:05 sylvaindd

Beat me to it! yeah, it worked surprisingly well to switch it over using their app. Biggest issue with aqara stuff is the lack of knowing when new firmware gets released. I haven't see a way to check, short of pairing it back to their app/hub.

Pel1can111 avatar May 21 '25 18:05 Pel1can111

Before I either pull what is left of my hair out or spend hours delving into this, how can you put this into Zigbee mode? From the above it almost sounds like you have to the Aqara hub so that you can pair it via Thread and then download a Zigbee firmware? What if you don't have an Aqara hub?

You need to download Aqara Home, the device will appear and you'll have to click on switch to Zigbee mode. It will flash the firmware and once it's done it will be able to join Z2M.

No need for any Aqara hardware

I installed the Aqara Home app (on Pixel 9)( but no device appears. (how can it communicate with the device? I know the Pixel 9 has a Thread radio but does that allow it to communicate without a TBR?)

jamesonuk avatar May 21 '25 18:05 jamesonuk

pretty sure this one has Bluetooth

Pel1can111 avatar May 21 '25 18:05 Pel1can111

Ummm have tried everything I can think of but I can't get the device to appear in Aqara Home only for the Matter Add Device popup to appear but if I do this via Google Home or Aqara Home it just goes though the Thread radio and asks which TBR I want to use....

jamesonuk avatar May 21 '25 18:05 jamesonuk

It's Bluetooth, you have to allow the app to access the location (exact) and proximity devices or something

sylvaindd avatar May 21 '25 18:05 sylvaindd

It is amazing what happens when you read it properly... Also had to bypass Google trying to add the device as Matter. The Zigbee bit didn't stand out to me. I will update the docs (https://github.com/Koenkk/zigbee2mqtt.io/pull/3804)

Image

jamesonuk avatar May 21 '25 20:05 jamesonuk

OK docs updated but wow this is chatty.....

Image that is an update every six seconds which seems a tad excessive for a temp sensor...

Anyway I can look at that but after pairing I was getting lots of errors because values were out of range. (despite me never setting them) and these two just wont seem to stick. I think some of the settings in the converter aren't right.

Period for example has min 0.5 and max 600 seconds but a scale of 1,000 which seems wrong. If you attempt to set this to anything above 32.5 is fails because it is int16 so only allowable values are >= -32,768 and <= 32,767 and with scale 1000, 33 is 33,000.

What is more weird is that changing the period is also changing the low humidity threshold (ah no, that is a typo by the looks of it

https://github.com/Koenkk/zigbee-herdsman-converters/blob/d1e2d75a042b9ed7f6e6d516292686f54e569a69/src/devices/lumi.ts#L4658

https://github.com/Koenkk/zigbee-herdsman-converters/blob/d1e2d75a042b9ed7f6e6d516292686f54e569a69/src/devices/lumi.ts#L4638

both have been set to the same attribute

But not sure why the humidity threshold isn't working, you get no error but it just won't stick and is stuck at 30 which is out of range

jamesonuk avatar May 23 '25 09:05 jamesonuk

OK seems like the duplicate attribute has been solved by one of the PRs above and sampling period corrected from '16d' to '162'.

I have managed to change the thresholds to 0.5 and 3 (I hacked the converter to change the scale from 10 to 100) but it is really inconsistent as to when it will change. The set thresholds say 0.2 to 3.0 however now I have managed to set it to 0.5 I cannot change it from that value. There is no error about anything being of range or timeouts or the like. I will try and sniff the messages at some point when time allows

jamesonuk avatar Jun 02 '25 16:06 jamesonuk

@jamesonuk Have you managed to display external sensors, for example? E.g. the temperature of a sensor in the garden?

TechArea avatar Jun 02 '25 17:06 TechArea

@jamesonuk Have you managed to display external sensors, for example? E.g. the temperature of a sensor in the garden?

Yes but I think the name is misleading. AIUI the external temperature / humidity values are ones you have to set manually. So if you have a sensor you want to show on this you need to create an automation to send an MQTT message to set these values when they change on your sensor. I had to change the sensor to external I think for this to work.

This then just appears on the device as "secondary"

jamesonuk avatar Jun 03 '25 07:06 jamesonuk