Aqara TRV external temp via zigbee

I’m looking into smart radiator thermostats, and the Aqara thermostat E1 (zigbee) is on top of my list. I know that it’s possible to connect it to an external aqara temperature sensor via the Aqara Home app/hub. However, I don’t want to use the app, I would like to provide the external temperature via zigbee directly from HA (ZHA). Is this possible?

1 Like

Probably not, looking at this video the settings in ZHA is limited.
I doubt it will work.

You can use a generic thermostat in Home Assistant to give it an external sensor.

I know, but I’m hoping for “hidden” ways like this.

Yeah, we need the E1 TRV to be fully integrated into zha.
I would love to help with this task but am not experienced with this.
What’s the best aproach to do so? I suppose I will need an aqara bridge!?

Zigbee2MQTT has a beter integration so maybe you can check their implementation/used ZigBee clusters.

Yes, I know. It’s not really good but a bit better. And to be honest: I got no idea how to translate this to a zha quirk. I cannot even download the diagnostics info in HA. I have no idea why. The download simply doesn’t work.

I decided to buy Tuya based TRV’s, they are on their way. They probably also don’t support external temperature input, but then they are half the price of the Aqaras.

Did you figure something out? Did the Tuya ones work better?

Go for Aqara with Z2M. You can use an external sensor and publish the sensor value in the corresponding topic. It works like a charm. As a presonal remark, the Moes TRV was not able to fully close my valve, while Aqara has no problem in doing it.

Can you please share the steps to use an external sensor with AQARA TRV ? I am using Z2M integration

See the device page on Z2M: Xiaomi SRTS-A01 control via MQTT | Zigbee2MQTT, the “sensor” section. You can do it with the native HA automations, using the “mqtt.publish” service or via Node-Red. Make sure that you first set the sensor to “external”. This can be done manually in Z2M. I have noticed that sometimes it changes back to “internal” with no apparent reason, therefore I also have an automation that changes it back to “external” whenever this happens.

1 Like

Can you share a bit more about this?
I’m reading the page you linked but cannot find anything about how to actually link the external sensor once the “sensor” value is set to “external”. Which message to you publish where?

I recently bought the Aqara TRV and i also have Aqara window and temperature sensors. But everything is connected directly via Zigbee2Mqtt, no Aqara Hub.
I’d like to make use of the window sensor and external temperature sensor features but not finding clear information if and how this is possible without Aqara Hub and App?
For instance, i tried the generic_climate integration as well but the Aqara TRV doesn’t have a switch by which the valve can be toggled, does it? And even then, I’d have to augment the window sensor some other way because generic_climate only supports one external temperature sensor.

So it would really help if someone would elaborate with code examples of configuring the Aqara TRV to utilize external temperature and window sensors.

afaik you cannot use an external door/window sensor via z2m. it can only be done using the aqara gateway. as for the external temperature sensor, the z2m is pretty clear. use “mqtt.publish” with the topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"sensor": NEW_VALUE}. i use node-red, therefore cannot help you with a piece of code. there’s simply a “mqtt out” node. you can try it in developer tools/services as well.
you can turn the trv off, but you cannot control how much it is open. this is done by the internal algorithm as far as i can tell. when in heat mode, you only operate it by setting the target temperature. this means that you cannot implement your own control algorithm and have to rely on what the trv is doing by itself. for me this is working well enough.
the “better thermostat” integration is trying to somehow bypass this limitation by continuously altering the setpoint and (i presume) monitoring the result in order to fine tune the control algorithm. however, i don’t really like this method of tricking the device and i suppose it may somehow conflict with the internal algorithm. “better thermostat” also allows you to use an external open window sensor and turns off the trv when the window is open. you may want to try it, it may better suit your needs than mine. it is actively developed and updated almost daily (winter in the northern hemisphere, therefore a great need for using thermostats).

Thanks for the response!
I’ll take a look at “better thermostat” but at first glance it doesn’t seem to support the Aqara TRV.

For the sensor payload are we reading the same documentation?
The one i’m reading (Xiaomi SRTS-A01 control via MQTT | Zigbee2MQTT) says that “sensor” is an enum with two possible values: “external” or “internal”. So you set it to external and then how do you link the sensor? Looks to me like it might not be possible with Z2M?

z2m documentation may be a little confusing (and incomplete).


one attribute is “external”/“internal” and indicates what temperature sensor should be used. another attribute is the external temperature sensor value. the correct topic for publishing the external temperature value is actually: zigbee2mqtt/FRIENDLY_NAME/set/sensor_temp. if you use developer tools and read the state of the climate entity you get:

hvac_modes:
  - 'off'
  - heat
min_temp: 5
max_temp: 30
target_temp_step: 0.5
preset_modes:
  - none
  - manual
  - away
  - auto
current_temperature: 17.9
temperature: 18
preset_mode: manual
away_preset_temperature: '10.0'
battery: 100
calibrated: null
child_lock: LOCK
linkquality: 65
local_temperature: 17.9
occupied_heating_setpoint: 18
preset: manual
sensor: external
system_mode: heat
valve_alarm: false
valve_detection: 'ON'
voltage: null
window_detection: 'OFF'
window_open: null
friendly_name: TRV baie 2
supported_features: 17

as for “better thermostat”, sorry, it may be my mistake, as i may have tested it with a tuya based trv. i will check.

1 Like
alias: TRV-Birou-EXT-TEMP
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.senzor_birou_temperature
condition: []
action:
  - device_id: 5aaa671b66121939a0ba6687a8a76875
    domain: select
    entity_id: select.trv_birou_sensor
    type: select_option
    option: external
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - service: mqtt.publish
    data:
      topic: zigbee2mqtt/TRV_Birou/set/sensor_temp
      payload_template: >-
        {{ (states('sensor.senzor_birou_temperature')|float(0)|round(1))
        }}
mode: single
6 Likes

Fantastic, thanks GBCRAS!

Do you know if it’s possible to set the window contact value as well? Or is that not yet supported with Z2M?

I know that is not available in Z2MQTT. Is it in the Aqara app ?

it can be done with a simple automation. just turn off the trv when the window contact opens and switch it back to “heat” when the contact closes back. i suppose that’s what the internal software does, anyway.

1 Like

Those functionalities about which @serialoverflow saying is not implemented directly on TRV(device), that’s kind of hacks with full opening/closing TRV valve based on window’s sensor state, check this video https://www.youtube.com/watch?v=4Wm-LfuEYLU

Anyway thank you for showing parameter name for Aqara TRV. Looks that this TRV is really good but I miss valve status as I like to observe how open it is.