@petro All sorted. Cool! Many thanks. !!!
Almost worked. However, what happens is that the thermostats continue to function irrespective of their state (idle, heating, off).
Issue
-
If lounge temp is set to 20c and the ambient is 18c then the heating comes on - correct. But if the thermostat is turned off by touching the power icon on the thermostat card, the heating continues fire. This behavious is further compounded by the fact there is only one âdummyâ heater entity for all three thermostats thus the heating is moded on the single thermostat that was the most recent to send its state.
-
The generic_thermostat entity state attribute is always one of :-
-
heating =user wants heating system to mode on the thermostat values, and the thermostat is demanding heat,
-
idle =user wants heating system to mode on the thermostat values, but thermostat is reporting ambient temp >= target temp,
-
off = user does not want heating system to mode on the thermostat values
Thus the user has a way to disabe part or all of the heating system in a multi zoned thermostat controlled building - just what is needed. However, the automation modes on the âat_targetâ temp. It needs to mode on the thermostatâs heater state which - according to the docs - has to be a binary entity (switch, input_boolean, etc).
Fix
-
Each thermostat requires its own âdummyâ heater entity to resolve the âon/heating/idleâ and âoffâ states.
-
The automation needs to mode on each of the âdummyâ heater entities to check if all 3 are âoffâ
So the following is appropriate:
# These need to be used as the entity_id for the **heater** attribute in each **generic_thermostat**
input_boolean:
thermostat_dummy_heater_room1:
input_boolean:
thermostat_dummy_heater_room2:
input_boolean:
thermostat_dummy_heater_room3:
- alias: Turn OFF heater
trigger:
platform: template
value_template: >
{% set therms = [
states.input_boolean.thermostat_dummy_heater_room1
states.input_boolean.thermostat_dummy_heater_room2
states.input_boolean.thermostat_dummy_heater_room3
] %}
{% set climates = namespace(heat_demand=[]) %}
{% for therm in therms %}
{% if therm.state != "heating" %} #-- Test if a thermostat state is NOT heating ( IDLE or OFF )
{% set climates.heat_demand = climates.heat_demand + [ therm.entity_id ] %} #-- Add thermostat to list of thermostats NOT demanding heat
{% endif %}
{% endfor %}
{{ climates.heat_demand | length == therms | length }} #-- Return TRUE if list contains all thermostats (all thermostats are NOT demanding heat
condition:
condition: state
entity_id: switch.danfoss_rxz3_rf_relay_switch_2
state: 'on'
action:
service: switch.turn_off
entity_id: switch.danfoss_rxz3_rf_relay_switch_2
- alias: Turn ON heater
trigger:
platform: template
value_template: >
{% set therms = [
states.input_boolean.thermostat_dummy_heater_room1
states.input_boolean.thermostat_dummy_heater_room2
states.input_boolean.thermostat_dummy_heater_room3
] %}
{% set climates = namespace(heat_demand=[]) %}
{% for therm in therms %}
{% if therm.state == "heating" %} #-- Test if heating demand from thermostat
{% set climates.heat_demand = climates.heat_demand + [ therm.entity_id ] %} #-- Add thermostat to list of thermostats demanding heat
{% endif %}
{% endfor %}
{{ climates.heat_demand | length > 0 }} #-- Return TRUE if list is not empty (at least one thermostat is demanding heat)
condition:
condition: state
entity_id: switch.danfoss_rxz3_rf_relay_switch_2
state: 'off'
action:
service: switch.turn_on
entity_id: switch.danfoss_rxz3_rf_relay_switch_2
Now it works perfectly, in that any number of thermostats can control the overall heating:-
a) Turn heating ON if ANY thermostat IS demanding heat (target temp > ambient temp)
b) Turn heating OFF when ALL thermostats are NOT demanding heat.
I havent tested the code as I am not at home, but it looks reasonable.
Hello ninjadog,
Sorry for interjecting. Iâve just picked up a couple of RXZ-2C dual channel Danfoss receivers, but am failing at the first hurdle of inclusionâŚThe manufacturer âmanualâ that came with each of them is a 12 page A7 booklet with not a great deal of info.
Can you shed any light on how you included your RXZ-2C into your Z-Wave network? (what buttons did you press? What make/model of Z-Wave controller you have? do you have any Danfoss wall thermostats paired with wither of the two channels on the RXZ-2C?)
Any help you could give me would be much appreciated
ATB,
bikefright.
thereâs so many variables at play
have you debugged using log file entries?
If you donât understand, then you need to read up on z-wave, home assistant, devices, logging, and etc
the topic is to lengthy , albeit not complex , to spoon food you
Thanks ninjadog - I donât consider myself a n00b when it comes to HA, Z-Wave, ZHA etc. (others may disagree). I should have been more specific in my request I donât need spoon feeding Just been scratching round in the dirt for info on how to actually get the things into inclusion mode in the first place.
This is all part of the planned removal of my Hive receivers (see here:my long winded thread)
In the meantime Iâve figured out how to factory reset the bloody things.
This at least gets me to a point where I can attempt an inclusion. However, it fails the node add. Iâll start looking at logs now.
I pulled open-zwave 1.6 into /config some time ago to take advantage of the manufacturer specific multi-level sensor support for my Eurotronic spirit Z-waves (of which I have 16 working perfectly for over a year now) which may be a difference between your setup and mine perhaps?
Iâve tried them both on a separate SystronicsRF RPi based system Iâm beta testing at the moment (https://www.systronicsrf.com/) with the same model Everspring SA413 USB stick (Iâve got three of theses USB sticks, so one spare for testing), but that platform is âhands-offâ log wise, so Iâm none the wiser other than it didnât work there either. Pretty sure therefore that I donât have two broken receivers.
Iâm running HA in Docker under ubuntu - which again could be a difference.
There must be something fundamental Iâm missing - If I get nowhere tomorrow, Iâll make a fresh post for help and provide a bunch of logs.
Obvious question: is your Z-Wave network exclusively secure, exclusively insecure or a combination?
I ask because on the face of it, these RXZ-2C receivers are Z-Wave 4.28, so are not Z-Wave Plus. All my other devices are both Z-Wave Plus and secure.
Cheers,
bikefright.
I have no idea what your problem is. State it , clearly.
Neither am I going to read all those links.
And you still have not provided any logs.
And donât confude openhab with HA. Two completely different architectures and models.
Youâre not helping yourself - so why should I ?
My Danfoss RX2 works perfectly.
I hijacked your thread. For that I Apologise (again). Not to worry. I am figuring things out for myself.
Read them, dontâ read them. Either way, the measure of the man is not down to two posts on a single thread (yours) on one forum - specific to one home automation platform. If I ask what seems a simple question you assume I need to be spoon fed.
Pointelss providing logs in my first post that show nothing but me clicking and the z-wave controller timing out/not finding anything to add. 'cos the RXZ-2C is not in inclusion mode. No nodes to find/addâŚ
I am well aware of the differences between automation platforms. z-wave is z-wave regardless of platform.
When hunting for things like supported command classes, feature set and inclusion mode (secure/insecure) for a new device I check all home automation forums - home-assistant, openHAB, smarththings etc. The same device is likely to present similar issues on other automation platforms. This was the case here.
My aim is always to help myself and to try and help others if I can. I reach out if I hit a problem I canât resolve myself - as I did here.
In my first post for help, I specifically asked what buttons you pressed for inclusion. Perhaps I though it was obvious that I was:
- talking about the RXZ-2C.
- asking which specific button sequence you used to get the RXZ-2C into inclusion mode.
Iâve re-read my first post and you could be forgiven for thinking I was also asking which in HA you pressed to include a node. That was not the case.
I worked out for myself (actually by reading an openHAB thread!) what the button sequence was to factory reset the RXZ-2C which is a pre-cursor to inculsion mode - which I then documented here on your post to help others who might have the same problem with lack of useful instructions like me. The links out are therefore also for others who may read this forum who have the same problem.
To be specific, the âinstructionsâ that came with my units state:
- If the RXZ is to be installed into a pre-existing network, the user should carry out the following steps:
- Ensure the RXZ is in its factory reset state (programme LED flashing green).
- if the RXZ is not factory reset, the user should follow the method given in the factory reset procedure in this leaflet.
There are no instructions in the two leaflets I received on how to factory reset the RXZ-2C (so it is not a misprint or page missing in one of them).
My problem has moved on now as I stated in my second post. I also stated I was going to look at logs and make a fresh post (rather than continue here). Feel free to chime in and help out there too.
Glad yours works perfectly.
donât like your attitude at second to last para. You were doing ok upto then.
BYE!
FYI, all 3 use different protocols. You absolutely cannot compare functionality between the 3 and expect the same results. SmartThings has their own proprietary protocol. OpenHab uses something odd, canât find the name for it. And HomeAssistant uses OpenZWave. Also, HomeAssistants ZWave platform is 3 years old and hasnât been updated. SO Command classes and other features are not available without heavy configuration editing (this is changing in the next 3 months).
Donât forget you can also search the issues both open and closed at the openhab GitHub Zwave at link below. Openhabs Zwave works very well and is very actively updated so if there is an issue there is probably some info on what the solution is there.
For any HA members finding this from a search, here is my [again] recoded functionality based on @petro contribution above.
Notes
-
Subtle changes to the therms list and use of is_state_attr , the post/suffix notation a.b.c is not recommended according to the docs - and so I brought the function is_state_attr into play. This could be improved further by checking state values but I thought that was an overkilll.
-
Generic Thermostats have three hvac modes of operation: heating , idle and off. These are moded internally by HA so need to check temps, but rather use the hvac modes - stored in the hvac_action attribute.
-
This is a package file under packages in the config directory - so note the filepath/name. If you dont use packages [which I do and are really useful] then remove the hvac_controller: line, the automation: lines, and place the rest into your automations.yaml file .
CREDIT to @petro
# filepath: ~/.homeassistant/packages/hvac/controller.yaml
# This is a 3 zone config - replace zone1, zone2 etc with your entity_IDs
#
hvac_controller:
# Thermostat UI will be one of:
# - heating (demand heat)
# - idle (at temp)
# - off (selected off by user)
automation:
- alias: Turn off zones that are NOT 'heating'
trigger:
platform: template
value_template: >
{% set therms = [
'climate.zone1',
'climate.zone2',
'climate.zone3',
] %}
{% set climates = namespace(no_demand=[]) %}
{% for therm in therms %}
{% if not is_state_attr(therm, 'hvac_action', 'heating') %}
{% set climates.no_demand = climates.no_demand + [ therm.entity_id ] %}
{% endif %}
{% endfor %}
{{ climates.no_demand | length == therms | length }}
condition:
condition: state
entity_id: switch.danfoss_rxz3_rf_relay_switching_unit_switch_2
state: 'on'
action:
service: switch.turn_off
entity_id: switch.danfoss_rxz3_rf_relay_switching_unit_switch_2
- alias: Turn on zones that are demanding 'heating'
trigger:
platform: template
value_template: >
{% set therms = [
'climate.zone1',
'climate.zone2',
'climate.zone3',
] %}
{% set climates = namespace(demand=[]) %}
{% for therm in therms %}
{% if is_state_attr(therm, 'hvac_action', 'heating') %}
{% set climates.demand = climates.demand + [ therm.entity_id ] %}
{% endif %}
{% endfor %}
{{ climates.demand | length > 0 }}
condition:
condition: state
entity_id: switch.danfoss_rxz3_rf_relay_switching_unit_switch_2
state: 'off'
action:
service: switch.turn_on
entity_id: switch.danfoss_rxz3_rf_relay_switching_unit_switch_2
Jumping in late.
You can simplify and extend this a bit.
The objective is to support multiple zones with multiple sensors and thermostats in each zone.
- Put all the multi-zone demand inputs in to a group.
Homogeneous groups are OR-groups by default - so iff if any one demand input is ON
the group is ON
. Trigger the boiler off the group status.
- Replace all uses of
input_boolean
with mqtt switches. These are easier to debug and have manual control of the demand if you need it.
- Group all temperature sensors in a room in a min_max sensor (which also supports âlastâ, âmeanâ and âmedianâ modes).
- Group all thermostats in a room and synchronize set-points and modes with an automation
Service calls on homogeneous groups are sent to all members of the group.
In the example above I happen to use a single automation with a mapping (by name) of the room generic (virtual) thermostat to the (real) thermostat group (climate.x_temperature
-> group.g_x_thermostat
) but a per-room automation may be more flexible:
I needed something similar and i created this component
My trvs donât have an target set point. They are showing up as an climate. How can I use your component ? To have multi zone heating.
Iâm about to set up my heating automation. Any particular smart TRV that you could suggest? (Preferably wifi or zigbee) Or any that you would advise against?