I just moved in my new apartment, equipped with connectable radiators.
These radiators have the following thermostat module:
Their wifi integration on a mobile app works pretty well, but it’s far from ideal in terms of privacy, and it’s obviously not integrated with my HA system. (the app depends on the brand of the radiator, but in practice they are all forks of the one from the thermostat vendor)
Fortunately, the thermostat is indicated as Zigbee compatible.
I realized then that:
it is not supported in the Zigbee2MQTT devices list
I tried a ZHA device, but I only have access to the room temperature value. No control of the thermostat, which is possible via their app and Wifi connection.
So I try to follow the tutorial of integration of unsupported devices:
_zigbee2mqtt.io
But, I’m struggling a bit!
My configuration .js file is currently the following (I used the default thermostat converter) :
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['PH25'], // The model ID from: Device with modelID 'lumi.sens' is not supported.
model: 'PH25', // Vendor model number, look on the device for a model number
vendor: 'Imhotep creation', // Vendor of the device (only used for documentation and startup logging)
description: 'Heater thermostat', // Description of the device, copy from vendor site. (only used for documentation and startup logging)
fromZigbee: [fz.thermostat], // added from log and following converter https://github.com/Koenkk/zigbee-herdsman-converters/blob/82acbbae0dff40269c935921f50bd03fc303b3ea/converters/fromZigbee.js
toZigbee: [tz.thermostat_local_temperature, tz.thermostat_occupancy, tz.thermostat_occupied_heating_setpoint], // Should be empty, unless device can be controlled (e.g. lights, switches).
exposes: [exposes.climate().withSetpoint('occupied_heating_setpoint', 7, 30, 1).withLocalTemperature()], // Defines what this device exposes, used for e.g. Home Assistant discovery and in the frontend
};
module.exports = definition;
Now I can get the local temperature and the temperature set point via the dev console
I also can set the occupied_heating_setpoint value throught the dev console. The thermostat is indeed updated, with new temperature set point (for a brief time however, because the thermostat goes back to a “Setting” after some time. Settings are “auto” (i.e. scheduled), “comfort”, “eco” or “Frost protection”.
First problem, I can’t get the data I see in the dev console to expose.
I tried things form the web, without knowing what i am doing (see my current .js converter file), but exposes are still mising.
Second problem : I have no clue where to find the temperature settings (auto, comfort, eco, etc) that I actually need to efficiently build a clever heating program though HA). As I said previously, changing the temperature set point is considered as a temporary override of the current settings’ default set point.
I’m really struggling, and it’s really annoying.
Do you have any help for me to add this device to Z2M properly ?
Thanks in advance
PS: I have contacted the manufacturer to get his help, but he is obviously ignoring me.
PSS: here is for info what the “status” tab of the device looks like under Zigbee2mqtt:
I managed to go a little bit further into my thermostat converter, but I still struggle.
I went on the official GitHub repository to submit my issue concerning the thermostat integration. Sadly, the GitHub community is pretty inactive for new device integrations.
I have new “PH25” heater thermostats that I need to add on Zigbee2mqtt.
Some general information first :
These thermostats are compatible to Zigbee (no mqtt), but the only available data is then the local temperature (readonly)
These products are also linked to a proprietary android/iOS solution, through WIFI, with a full support of all functionalities that are available manually:
- temperature set point
- various modes: Comfort+, Comfort, Eco, Frost protection
I did some researches, and tried manually a lot of things, without actual technical background.
Now, the converter looks like as attached below. Please note that I built this converter by copy-pasting what i could found here and there.
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['E-Ctrl'], // The model ID from: Device with modelID 'lumi.sens' is not supported.
model: 'PH25', // Vendor model number, look on the device for a model number
vendor: 'Imhotep creation', // Vendor of the device (only used for documentation and startup logging)
description: 'Heater thermostat', // Description of the device, copy from vendor site. (only used for documentation and startup logging),
fromZigbee: [fz.thermostat, fz.hvac_user_interface, fz.occupancy],
toZigbee:
[
tz.thermostat_local_temperature,
tz.thermostat_system_mode,
tz.thermostat_occupied_heating_setpoint,
//tz.thermostat_unoccupied_heating_setpoint,
//tz.thermostat_occupied_cooling_setpoint,
tz.thermostat_running_state,
],
exposes:
[
exposes.climate()
.withSetpoint('occupied_heating_setpoint', 7, 28, 0.5)
.withLocalTemperature()
.withLocalTemperatureCalibration()
//.withSystemMode(['off', 'auto','cool','heat', 'fan_only','dry']) // 'emergency_heating','precooling','sleep'
.withRunningState(['idle', 'heat', 'cool'])
.withControlSequenceOfOperation(['cooling_only','cooling_with_reheat','heating_only','heating_with_reheat','cooling_and_heating_4-pipes','cooling_and_heating_4-pipes_with_reheat']),
e.occupancy(),
exposes.enum('system_mode', ea.ALL, ['off','auto', 'comfort', 'eco', 'frost_protection']),
],
};
module.exports = definition;
Situation now
What seem to work
occupancy expose
temperature set point expose (read and write).
local temperature expose
What’s remains to be fixed
mode expose does not work
opened window detection expose (optional, as the main Z2Mqtt automation objective is the selection of the thermostat mode …)
Unless I’m wrong, what interests me is SystemMode. I defined the enum according to the Zigbee2mqtt doc, to see already what it could give.
But:
Only the Off mode turns off the thermostat. Any other mode turns it back on (this is normal actually). The choice of the other modes has no impact on the effective mode of the thermostat if I manually change the mode on the thermostat, I don’t see any log through MQTT Explorer.
Do you have any ideas on how to move forward on this integration of heating modes?
Thanks in advance!
PS : I tied to have access to “raw” data in HomeAssistant, removing the link to the converter, and collecting the raw logs from the unsupported thermostat (without any converter so) when i manually change the modes on the thermostat.
I got this:
debug 2023-04-28 16:57:00Received Zigbee message from 'Radiateur', type 'attributeReport', cluster 'hvacThermostat', data '{}' from endpoint 1 with groupID 0
debug 2023-04-28 16:57:01Received Zigbee message from 'Radiateur', type 'attributeReport', cluster 'hvacThermostat', data '{"16384":2}' from endpoint 1 with groupID 0
debug 2023-04-28 16:59:00Received Zigbee message from 'Radiateur', type 'attributeReport', cluster 'hvacThermostat', data '{"localTemp":2103}' from endpoint 1 with groupID 0
debug 2023-04-28 16:59:10Received Zigbee message from 'Radiateur', type 'attributeReport', cluster 'hvacThermostat', data '{"occupiedHeatingSetpoint":1100}' from endpoint 1 with groupID 0
debug 2023-04-28 16:59:11Received Zigbee message from 'Radiateur', type 'attributeReport', cluster 'hvacThermostat', data '{"occupiedHeatingSetpoint":1100}' from endpoint 1 with groupID 0
debug 2023-04-28 16:59:12Received Zigbee message from 'Radiateur', type 'attributeReport', cluster 'hvacThermostat', data '{"maxHeatSetpointLimit":1200}' from endpoint 1 with groupID 0
debug 2023-04-28 16:59:12Received Zigbee message from 'Radiateur', type 'attributeReport', cluster 'hvacThermostat', data '{"maxHeatSetpointLimit":1200}' from endpoint 1 with groupID 0
debug 2023-04-28 16:59:13Received Zigbee message from 'Radiateur', type 'attributeReport', cluster 'hvacThermostat', data '{}' from endpoint 1 with groupID 0
debug 2023-04-28 16:59:14Received Zigbee message from 'Radiateur', type 'attributeReport', cluster 'hvacThermostat', data '{"16384":3}' from endpoint 1 with groupID 0