Aqara TRV external temp via zigbee

Hey folks,

based on your comments, i looked at “Better Thermostat” again and tried it out.
It actually seems to work really well! I tested it with 2 Aqara TRVs now, was able to add window and external temperature sensors to each and the target temperature is being set correctly. For instance, when i open a window, the valve is closed immediately and opened again when the window is closed.

I can also recommend the Better Thermostat UI Card linked in the video above, it shows all information at a glance.

If anyone else is using Aqara TRVs with Better Thermostat, what has been your experience with optimal settings?
Do you leave the original TRV settings untouched, including leaving the sensor field at “internal” and let Better Thermostat handle everything?
Did you benefit from enabling any of the Better Thermostat configuration options like “ignore any input on device including child lock” or the new algorithm with beta 43/44, “If your TRV has trouble with not recheating the target temperature or overheating, this option can help”?

Hey thanks for sharing this. Im unable to find my device id, could you tell me where i can find it ?. Also does the window detection work for you ? When i connected my trv and placed it outside for some minutes it dropped in temperature but never detected the window open, i thought the window open state would be triggered by a sudden drop in temperature.

I missed the valve position as well, but seems i don’t need it anymore as the Aqara TRV is working flawless compared with MOES.

Yes, I’m also not sure every time if it’s closed or not…
Is there a solution to turn it off completely?

Hey!

I`m using the “Better Thermostat” and on my side it has problems with turning the Aqara TRV back to hvac_mode “heat” when it was in “off”…

What settings are you using? I have it connected over Zigbee2MQTT. I can set everything over the HA UI, but using “Better Thermostat” does not work for me…

Could you provide your setup/config?

Greetings

I am using Better Thermostat as well and i can say that when the TRV is “Off” it still keeps the Target-Temperature… really strange. I think it isn’t a problem with Better Thermostat, it’s a Problem of the TRV itself. But i am not 100% shure…

Yes, compared with Moes, Aqara TRV is good and works as expected.

Hi, thanks for sharing, now my TVR read right temperature.
I’m a beginner in HA (supervised) and i have a question
i use 5 aqara TVR with z2m and i pilot gas heater by a sonoff mini zb
several automation for TVR,shedulating time, temperature etc… but only time schedule for sonoff switch
the sistem is quit inaccurate
i used auto discovery and i don’t know the way to change the configuration to add heater likely in generic thermostat

  • what is the best way to switch the heater with TVR? -
    thank You very much

Everything is working well compared to Moes TRVs. :slight_smile:

I’m trying to set this up, and I can easily publish the sensor data to the right topic (well, I can now once I learnt some more about MQTT). But how do I decide when to publish? I basically want the TRV to always use this sensor when it’s “looking” at the temperature. Will it automatically look at the last figure in that topic, and the temperature sensor will automatically make sure the topic always has an answer in there?

Thanks for the assist!

TRV should be set to use the external sensor and you should publish the room temperature every time it changes. The rest is done by the TRV. I have a node-red automation that publishes the room temperature as soon as it changes. You can also implement this via the native HA automations.

Ok that makes sense, I’ll look into that.

But one thing I’m wondering is that the room temperature changes the whole time no? I mean it’s got 2 decimals, so that changes every few minutes. But I guess that’s normal behaviour then?

From my own experience it doesn’t change that often. I have also limited my sensors to a single decimal from z2m, but I guess you can apply some other sort of filtering as well. Also, I don’t think that the TRV will react to minor temperature changes.

Turns out I’m not yet there with publishing my data to the TRV…

I can get the temperature showing in debug in Node Red, but seems I’m having trouble publishing it to the right topic. I can do it manually by typing in the topic and using the mqtt.publish node in Node Red, but there should be a way to do this with the Home Assistant entities too right? What node do you suggest?

If I use the automation above shared by GBCRAS, or even node red will it automatically “show” the sensor temperature in my Thermostat card, or will that still automatically show the internal Sensor?

Maybe I should just use the Better Thermostat add-in, but that almost seems like overkill.

In my experimenting I also tried this, but for some reason my template keeps changing. When I save the automation, it changes to:

payload_template:
        "[object Object]": null

Any ideas?

Poti incerca sa te inspiri de aici:

[{"id":"414488452c308dca","type":"mqtt out","z":"1c1326d7c92f983e","name":"Transmite temperatura","topic":"zigbee2mqtt/TRV dormitor 2/set/sensor_temp","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"25ddce78fef71de1","x":440,"y":1280,"wires":[]},{"id":"51f13c6a7a796a4b","type":"server-state-changed","z":"1c1326d7c92f983e","name":"Temperatura","server":"dfb48f26.5c654","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":["sensor.th_dormitor_2"],"entityidfiltertype":"list","outputinitially":false,"state_type":"str","haltifstate":"1000","halt_if_type":"num","halt_if_compare":"is_not","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"x":130,"y":1280,"wires":[["414488452c308dca"],[]]},{"id":"51fcd521c8dc6f13","type":"inject","z":"1c1326d7c92f983e","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"18.6","payloadType":"num","x":270,"y":1220,"wires":[["414488452c308dca"]]},{"id":"25ddce78fef71de1","type":"mqtt-broker","name":"hassio","broker":"192.168.143.60","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"dfb48f26.5c654","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]

If anyone is interested, I created a Blueprint based on @GBCRAS answer.

6 Likes

I admit I sped read the thread, but why isnt anyone just using the built in Generic_thermostat integration ?

I personally prefer it over the better thermostat, as (at time of writing) its missing the hot and cold tolerance feature which is useful to minimise the number of writes sent to the TRV’s flash memory.

Can you share your thermostat settings?

This is one of mine, I have this in a separate climate.yaml include file:

- platform: generic_thermostat
  name: "Main Bathroom Thermostat"
  unique_id: main_bathroom_thermostat
  heater: input_boolean.main_bathroom_trv_switch
  target_sensor: entity_id_of_external_temp_sensor_here
  min_temp: 5
  max_temp: 25
  away_temp: 5
  initial_hvac_mode: "heat"
  hot_tolerance: 0.5
  cold_tolerance: 0.5

You’ll notice that the heater ‘switch’ used is actually an input boolean. Thats because the TRV I’m using doesn’t have a switch entity that the generic thermostat can toggle.

Instead, I have an automation thats listening for the input boolean to change state, and then either turn the heating low (5c) if I want ‘off’ or high (30c) if I want ‘on’.

If your TRV has a switch entity then you can put that in the heater section instead and it will work without the need for a separate automation.

1 Like