-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New device support]: Tuya thermostat TS0601 _TZE204_pcdmj88b #19462
Comments
Same issue, I ordered the zigbee gateway so I can map the correct data. 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'll follow this thread with care though! |
I'm interested too ! |
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 {
"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
Works/tested:
Caveats
|
@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? |
Sure. First time is best time and closer to weekends. If I disappear after this promise: Details
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'}, // Mine
],
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)
.withPreset(['schedule', 'holiday', 'manual', 'comfort', 'eco'])
.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.'),
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],
[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, 'running_state', tuya.valueConverterBasic.lookup({'idle': tuya.enum(0), 'heat': tuya.enum(1)})],
],
},
};
module.exports = definition; |
@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 😄 Anyway 'tis but a detail, thank you for answering ;) |
@T0ytoy added Details
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 : Thanks again! |
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:
|
How do you even get those devices in pairing mode? |
In the manual it says to press the reset button for >5seconds |
There is a very small black button above the display which you can only see when you have device open. |
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. |
Yes, well, I think. |
Hello, |
I updated to the latest version which was released. (stable) Still if I enter pariring mode (blue light blinking) - I cannot see the devices in zigbee2mqtt. |
Its working for me and was added after allowing new devices |
I have two devices. I did reset both of them and tried to pair them. Yet, I can't connect those new devices. Must be a different devices? |
@apedance |
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. @shyney7 thanks. :) edit: I reconnected the dongle and now they are working... |
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. |
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. |
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. |
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. |
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
The text was updated successfully, but these errors were encountered: