Closed Tilt7238 closed 1 month ago
Same issue, I ordered the zigbee gateway so I can map the correct data. The expected delivery will be by the end of next week.
If I find time and the correct mapping data i will try to contribute it so others can use is too.
I'm very much intersted as I bought multiple of these radiator valves and can't use them right now :( I'd love to help in any way but I don't have a tuya gateway nor the knowledge to developp an adapter for new devices.
I'll follow this thread with care though!
I'm interested too ! Thanks in advance if you find the way to bring compatibility !
I have a tuya zigbee gateway and followed the steps outlined in the zigbee2mqtt wiki to Find Tuya Datapoints
Through this I obtained the following data points for _TZE204_pcdmj88b
thermostat:
{
"2": "Mode",
"4": "Set temperature",
"5": "Current temperature",
"6": "Battery capacity",
"7": "Child lock",
"8": "Temperature scale",
"9": "Set temperature ceiling",
"10": "The lower limit of temperature",
"14": "Window check",
"16": "Window temp",
"17": "Window time",
"18": "Backlight brightness",
"19": "Factory data reset",
"21": "Holiday temperature",
"24": "Home temp",
"25": "Leave temp",
"28": "Week program",
"29": "Week program Tuesday",
"30": "Week program Wednesday",
"31": "Week program Thursday",
"32": "Week program Friday",
"33": "Week program Saturday",
"34": "Week program Sunday",
"35": "Fault alarm",
"36": "Frost protection",
"37": "Rapid warming",
"38": "Rapid heating countdown",
"39": "Switch Scale",
"47": "Temperature correction",
"48": "Valve testing",
"49": "State of the valve",
"101": "111"
}
I will try to write an external converter myself, but I am not sure if i can do it :)
Thanks a lot for spending time on this, I'm really glad! I'll try and look how to make a converter, but I welcome anyone more experimented to beat me to it!
Here is mine
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
fingerprint: [
{modelID: 'TS0601', manufacturerName: '_TZE204_pcdmj88b'},
],
model: 'TS0601_thermostat_3',
vendor: 'TuYa',
description: 'Thermostatic radiator valve',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
onEvent: tuya.onEventSetTime,
configure: tuya.configureMagicPacket,
exposes: [
e.child_lock(), e.battery_low(),
e.climate()
.withSetpoint('current_heating_setpoint', 5, 35, 1, ea.STATE_SET)
.withLocalTemperature(ea.STATE)
.withSystemMode(['auto', 'heat', 'off'], ea.STATE_SET)
.withRunningState(['idle', 'heat'], ea.STATE)
.withLocalTemperatureCalibration(-3, 3, 1, ea.STATE_SET),
...tuya.exposes.scheduleAllDays(ea.STATE_SET, 'HH:MM/C HH:MM/C HH:MM/C HH:MM/C HH:MM/C HH:MM/C'),
e.binary('scale_protection', ea.STATE_SET, 'ON', 'OFF').withDescription('If the heat sink is not fully opened within ' +
'two weeks or is not used for a long time, the valve will be blocked due to silting up and the heat sink will not be ' +
'able to be used. To ensure normal use of the heat sink, the controller will automatically open the valve fully every ' +
'two weeks. It will run for 30 seconds per time with the screen displaying "Ad", then return to its normal working state ' +
'again.'),
e.binary('frost_protection', ea.STATE_SET, 'ON', 'OFF').withDescription('When the room temperature is lower than ' +
'5 °C, the valve opens; when the temperature rises to 8 °C, the valve closes.'),
e.numeric('error', ea.STATE).withDescription('If NTC is damaged, "Er" will be on the TRV display.'),
],
meta: {
tuyaDatapoints: [
[2, 'system_mode', tuya.valueConverterBasic.lookup({'auto': tuya.enum(0), 'heat': tuya.enum(1), 'off': tuya.enum(2)})],
[4, 'current_heating_setpoint', tuya.valueConverter.divideBy10],
[5, 'local_temperature', tuya.valueConverter.divideBy10],
[6, 'battery', tuya.valueConverter.raw],
[7, 'child_lock', tuya.valueConverter.lockUnlock],
[28, 'schedule_monday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(1)],
[29, 'schedule_tuesday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(2)],
[30, 'schedule_wednesday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(3)],
[31, 'schedule_thursday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(4)],
[32, 'schedule_friday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(5)],
[33, 'schedule_saturday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(6)],
[34, 'schedule_sunday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(7)],
[35, 'fault_alarm', tuya.valueConverter.errorOrBatteryLow],
[36, 'frost_protection', tuya.valueConverter.onOff],
[39, 'scale_protection', tuya.valueConverter.onOff],
[47, 'local_temperature_calibration', tuya.valueConverter.localTempCalibration2],
[49, 'valve_state', tuya.valueConverterBasic.lookup({'closed': tuya.enum(0), 'open': tuya.enum(1)})],
],
},
};
module.exports = definition;
Works/tested:
current_heating_setpoint
local_temperature
valve_state
open/closedCaveats
system_mode
looks like preset@tnako thank you very much for implementing the converter, I tested it and can confirm that changing target temperature works and triggers the valve. Local temperature is fine too and it can be adjusted +/-3°C. With that and some Home Assistant automation, I think we can pretty much do anything.
It would be perfect if we could directly act on the valve state (percentage opened ?) to rely on any external thermometer, but I can work around that. Would DP 48 "valve testing" be worth exploring?
Thanks again!
@tnako thank you very much :)
I might be wrong, but I think DP 48 refers to the thermostat opening and closing the valve to the max/min for testing.
@tnako could you create a PR?
@tnako could you create a PR?
Sure. First time is best time and closer to weekends.
If I disappear after this promise:
@tnako I updated with your last version, thank you very much.
It seems that the presets all have a fixed target temperature value (except manual mode) : eco is 20°C (how tf is that "eco"), comfort is 25°C (🔥 ), holiday ('away') is 15°C.
@jim-fx you have a tuya gateway, right? Do you know if those values are updatable at all with the official tuya app, or are they hard-coded and the only solution in homeassistant is to use manual mode?
Thanks again for all the work put into this :)
Not sure, I would guess the values are hardcoded. But if you connect the thermostat to home assistant you don't need presets anymore? I accidentaly bought two, I dont mind sending you one 4 free if you would like to play around yourself :)
@jim-fx that's very nice of you but not necessary, I already own 5 of them, only one is installed yet, though 😄 You're right that manual mode is enough, but preset would have been a nice "cherry on top" feature, for example in Home Assistant when no one is at home you trigger the "away" preset instead of setting the manual mode to 17°C, it's a bit easier to understand in the UI.
Anyway 'tis but a detail, thank you for answering ;)
@T0ytoy added holiday_temperature
, comfort_temperature
and eco_temperature
. Quick check show possibility to change preset temps
```typescript const exposes = require('zigbee-herdsman-converters/lib/exposes'); const tuya = require('zigbee-herdsman-converters/lib/tuya'); const e = exposes.presets; const ea = exposes.access; const definition = { fingerprint: [ {modelID: 'TS0601', manufacturerName: '_TZE204_pcdmj88b'}, ], model: 'TS0601_thermostat_1', vendor: 'TuYa', description: 'Thermostatic radiator valve', fromZigbee: [tuya.fz.datapoints], toZigbee: [tuya.tz.datapoints], onEvent: tuya.onEventSetLocalTime, configure: tuya.configureMagicPacket, exposes: [ e.child_lock(), e.battery(), e.battery_low(), e.climate() .withSetpoint('current_heating_setpoint', 5, 35, 0.5, ea.STATE_SET) .withLocalTemperature(ea.STATE) .withPreset(['schedule', 'holiday', 'manual', 'comfort', 'eco']) .withSystemMode(['off', 'heat'], ea.STATE) .withLocalTemperatureCalibration(-3, 3, 1, ea.STATE_SET), ...tuya.exposes.scheduleAllDays(ea.STATE_SET, 'HH:MM/C HH:MM/C HH:MM/C HH:MM/C HH:MM/C HH:MM/C'), e.holiday_temperature().withValueMin(5).withValueMax(30), e.comfort_temperature().withValueMin(5).withValueMax(30), e.eco_temperature().withValueMin(5).withValueMax(30), e.binary('scale_protection', ea.STATE_SET, 'ON', 'OFF').withDescription('If the heat sink is not fully opened within ' + 'two weeks or is not used for a long time, the valve will be blocked due to silting up and the heat sink will not be ' + 'able to be used. To ensure normal use of the heat sink, the controller will automatically open the valve fully every ' + 'two weeks. It will run for 30 seconds per time with the screen displaying "Ad", then return to its normal working state ' + 'again.'), e.binary('frost_protection', ea.STATE_SET, 'ON', 'OFF').withDescription('When the room temperature is lower than ' + '5 °C, the valve opens; when the temperature rises to 8 °C, the valve closes.'), e.numeric('error', ea.STATE).withDescription('If NTC is damaged, "Er" will be on the TRV display.'), e.binary('boost_heating', ea.STATE_SET, 'ON', 'OFF') .withDescription('Boost Heating: the device will enter the boost heating mode.'), ], meta: { tuyaDatapoints: [ [2, 'preset', tuya.valueConverterBasic.lookup({'schedule': tuya.enum(0), 'holiday': tuya.enum(1), 'manual': tuya.enum(2), 'comfort': tuya.enum(3), 'eco': tuya.enum(4)})], [4, 'current_heating_setpoint', tuya.valueConverter.divideBy10], [5, 'local_temperature', tuya.valueConverter.divideBy10], [6, 'battery', tuya.valueConverter.raw], [7, 'child_lock', tuya.valueConverter.lockUnlock], [21, 'holiday_temperature', tuya.valueConverter.divideBy10], [24, 'comfort_temperature', tuya.valueConverter.divideBy10], [25, 'eco_temperature', tuya.valueConverter.divideBy10], [28, 'schedule_monday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(1)], [29, 'schedule_tuesday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(2)], [30, 'schedule_wednesday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(3)], [31, 'schedule_thursday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(4)], [32, 'schedule_friday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(5)], [33, 'schedule_saturday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(6)], [34, 'schedule_sunday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(7)], [35, 'fault_alarm', tuya.valueConverter.errorOrBatteryLow], [36, 'frost_protection', tuya.valueConverter.onOff], [37, 'boost_heating', tuya.valueConverter.onOff], [39, 'scale_protection', tuya.valueConverter.onOff], [47, 'local_temperature_calibration', tuya.valueConverter.localTempCalibration2], [49, 'system_mode', tuya.valueConverterBasic.lookup({'off': tuya.enum(0), 'heat': tuya.enum(1)})], ], }, }; module.exports = definition; ```
Going to create PR
Thank you for looking it up! Those TRV went from unusable to good home assistant product in a few day, that is so great.
Looking up at your converter, I was wondering if the third parameter of :
.withLocalTemperatureCalibration(-3, 3, 1, ea.STATE_SET)
was the increment size. If that is the case, it would be better at 0.5 or even 0.1, as 1C is a bit high for calibration. But maybe there is a hardware limitation and it cannot be done.
Thanks again!
Yes, '1' is precision and you can put any step there. For this valve only 1C calibration works in my tests.
Personally I use home assistance and calibration way easy to do with template.sensors
. Example of usage hoas filter
on raw data: Red is raw valve values and Blue is 5min moving average.
And merged to main branch. Thank everybody! With datapoints here was easy to make convertor 👍
Thank you very much for doing this @tnako, it's really good of you. I've got one of these devices and have been playing with the device & the converter:
tuya.ts
here - I don't know how to know if that's a genuine limitation in the device or not. According to the AliExpress link above it supports 6 transitions each for 5+2, 6+1 or 7 individual days, the same as the TZE200_hue3yfsn. If that's the case, there should be another datapoint for "schedule" like this one.i tested dev branch, some functions need to be corrected:
not tested
And I'm missing functions:
Maybe for description modell nr. is "BAB-1413Pro-E" and it looks similar to Tuya TV02, but it isnt
How do you even get those devices in pairing mode? Only possible via Tuya gateway?
How do you even get those devices in pairing mode? Only possible via Tuya gateway?
In the manual it says to press the reset button for >5seconds
Not sure what manual you have but mine doesn't have this option.
How do you even get those devices in pairing mode? Only possible via Tuya gateway?
There is a very small black button above the display which you can only see when you have device open. You have to push that until the wlan symbol blinks.
I have a small black button. The only thing it does when pressed once is change the orientation of the display. When pressed longer nothing happens other than it turning off the display after 10s of pressing.
I can see the Wifi symbol. I have no idea how to pair this device. Comms should be Zigbee.
I have the same devices, to pair them, you have to "activate" the TRV by pressing a button, so the display is active (took me a little bit to figure this out cause i wondered why it did not start pairing), then you have to press that little, black button for a few seconds, then a blue LED should start to blink, which means the device is in pairing mode.
This is the S2 button:
But the support for this device is only going to be released with the next zigbee2mqtt update next month right?
Yes, well, I think. I finally have pairing mode. Thank you guys. But zigbee2mqtt can't see those devices yet.
Hello, I got this thermostat to work with the latest dev branch, but I have one problem. I can't get local temperature calibration to work with homeassistant. When I change it via zigbee2MQTT web interface it works fine, but when I try to change it via homeassistant entity number.[name]_local_temperature_calibration it doesn't work. Does anybody have the same problem?
I updated to the latest version which was released. (stable) Support is in the changelog.
Still if I enter pariring mode (blue light blinking) - I cannot see the devices in zigbee2mqtt. Any ideas?
I updated to the latest version which was released. (stable) Support is in the changelog.
Still if I enter pariring mode (blue light blinking) - I cannot see the devices in zigbee2mqtt. Any ideas?
Its working for me and was added after allowing new devices
Should work after enabling join. Maybe reset the device and then try again?
A problem that I am having is that the device just turns to off mode after a while although it's set to manual mode and was set to heat mode.
I have two devices. I did reset both of them and tried to pair them. Enable the device by pressing the big button and then pressing S2 for 5s until the Wifi light blinks in blue color. Using zigbee2mqtt with a Sonoff V3 Dongle (recommended one) connected to Home Assistant Supervised. (Other Zigbee devices are workin flawlessly)
Yet, I can't connect those new devices. Must be a different devices? My model printed on the manual is: BAB-1314Pro-E Do you have any information on your make/model?
@apedance BAB-1314Pro-E
Same model number on my manual, everything works great on z2m with a Zigate+. The fact that both TRV can't connect might mean the problem iis with z2m or your dongle?
Same model number on my manual, everything works great on z2m with a Zigate+. The fact that both TRV can't connect might mean the problem iis with z2m or your dongle?
hmmm. I am using the recommended SONOFF Zigbee 3.0 USB Dongle Plus ZBDongle-P with crrent version: 1.34.0-1 zigbee2mqtt. Hue Sensors and other TRVs are working fine. Can this be related to the dongle specifically?
@shyney7 thanks. :)
edit: I reconnected the dongle and now they are working...
It seems that it switches to off after about 2-3 minutes. Every switch to on was triggered by me in the logs and the off switches were triggered without any input from my side?
Looking at your graph that's because the actual current temperature (the blue line) is already above the target temperature (the pink line), so the TRV is doing what it's supposed to, turning off the heat. Or am I misunderstanding your question?
Testing two right now. They work fine so far. They have far worse signal rates LQI at the same conditions than a SONOFF TRVZB device for instance.
Looking at your graph that's because the actual current temperature (the blue line) is already above the target temperature (the pink line), so the TRV is doing what it's supposed to, turning off the heat. Or am I misunderstanding your question?
It's not the same behavior like my other tuya device. Its stays on even after reaching the target temperature. That makes more sense to me to keep the desired level. You don't want to close the valve completely after reaching the temperature and only opening it after the temperature is falling below level again.
Here is how it is on the other device (_TZE200_hue3yfsn):
This is also the reason why the temperature is overshooting as you can see in the graph below. At 16:00 I installed the new thermostat. It should look like before a steady temperature. Since the thermostat is closing completely and then opening completely the temperature is overshooting the target temperature all the time.
The _TZE200_hue3yfsn doesn't expose its valve state though - the herdsman code for that device always reports the valve as open (unless the device is set to Heating Stop iirc). So the orange shading on the first graph will look that way even if you set the target temperature to 15 degrees and the valve is actually fully closed.
I think the reason the temperature graph you've posted varies so wildly is that the device only measures temperature to whole degrees, whereas the _TZE200_hue3yfsn measures to 0.1 degrees.
Looking at your graph that's because the actual current temperature (the blue line) is already above the target temperature (the pink line), so the TRV is doing what it's supposed to, turning off the heat. Or am I misunderstanding your question?
It's not the same behavior like my other tuya device. Its stays on even after reaching the target temperature. That makes more sense to me to keep the desired level. You don't want to close the valve completely after reaching the temperature and only opening it after the temperature is falling below level again.
Here is how it is on the other device (_TZE200_hue3yfsn):
![
This is also the reason why the temperature is overshooting as you can see in the graph below. At 16:00 I installed the new thermostat. It should look like before a steady temperature. Since the thermostat is closing completely and then opening completely the temperature is overshooting the target temperature all the time. ![
But your problem has nothing to do with z2m. z2m sends the target value to the device and the device adjusts it. It's like a switch, if the switch flickers it has nothing to do with z2m
@j4m3s thanks for the clarification 👍. I didn't know that the _TZE200_hue3yfsn model doesn't transfer the valve state and thought that heating is the normal state. So everything is working fine from the z2m side . Although I think that these thermostats are useless with such a high delta. Not even the standard thermostats that just work mechanically without electronics work better than this. Is it possible to force on/off from HA so that I can use a PID controller e.g. to control the thermostat and use an external temperature sensor?
This is one of the reasons why I've decided I don't like these devices and stopped using them - I've bought another _TZE200_hue3yfsn instead (although I really wish it exposed the valve state!).
To answer your question: you could create an automation which sets the target temperature to a high value when your external sensor shows the temperature is too low, and vice versa when the sensor shows it's too low. But I think you'd still see big swings due to the thermal inertia in the radiator. To avoid the swings you would want to control the % open of the valve to have it open a small amount when it's close to target. That's not possible with this device. The other alternative is to use an automation to adjust the temperature calibration value up or down according to the delta between the temperature the device detects and the external sensor. Unfortunately that doesn't work well on this device either - not only is the local device temperature resolution poor but the calibration can only be adjusted in 1 degree steps too.
So tnako has done a great job of adding support for the device to z2m, but IMO they're not very good devices so I dont use them.
@j4m3s thanks for the clarification 👍. I didn't know that the _TZE200_hue3yfsn model doesn't transfer the valve state and thought that heating is the normal state. So everything is working fine from the z2m side . Although I think that these thermostats are useless with such a high delta. Not even the standard thermostats that just work mechanically without electronics work better than this. Is it possible to force on/off from HA so that I can use a PID controller e.g. to control the thermostat and use an external temperature sensor?
Maybe the problem is a high value for "blind spot"?
@dockerpirate since it's already set to 1° by default I don't see any optimization potential here!?
Thanks everyone for the work. I ordered TV02 a month ago and sadly go those cheaper TS0601. They really look flimsy compared to TV02, but at least thanks to you they works with z2m.
Thanks everyone for the work. I ordered TV02 a month ago and sadly go those cheaper TS0601. They really look flimsy compared to TV02, but at least thanks to you they works with z2m.
Me too - it seems EARU are shipping these cheaper inferior units instead of the ones they're actually advertising. I opened a dispute on AliExpress to get a refund!
Thanks everyone for the work. I ordered TV02 a month ago and sadly go those cheaper TS0601. They really look flimsy compared to TV02, but at least thanks to you they works with z2m.
Me too - it seems EARU are shipping these cheaper inferior units instead of the ones they're actually advertising. I opened a dispute on AliExpress to get a refund!
I did too but they asked me to return the product, just a loss of time and money, hopefully the next shipment is OK.
What we really need is better firmware for the devices so that they use 0.1 degree increments for temp and calibration, and expose the valve open state. Then they'd be OK :)
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days
Link
https://de.aliexpress.com/item/1005006066560400.html
Database entry
{"id":7,"type":"EndDevice","ieeeAddr":"0xa4c138c059067de9","nwkAddr":46572,"manufId":4417,"manufName":"_TZE204_pcdmj88b","powerSource":"Battery","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65506":56,"65508":0,"appVersion":73,"modelId":"TS0601","manufacturerName":"_TZE204_pcdmj88b","powerSource":3,"zclVersion":3,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":73,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1698512485137,"defaultSendRequestWhen":"immediate"}
Comments
I bought 2 of these thermostats and tried it with the existing TV02-Zigbee external converter in Tuya.ts , but it didn't work. I also tried the converter below which I found in another issue
External converter
Supported color modes
No response
Color temperature range
No response