[New device support]: TS0601 (_TZE284_rlytpmij)
Link
https://it.aliexpress.com/item/1005009990353884.html
Database entry
{"id":91,"type":"Router","ieeeAddr":"0xa4c1386e3e1362a4","nwkAddr":57418,"manufId":4417,"manufName":"_TZE284_rlytpmij","powerSource":"Mains (single phase)","modelId":"TS0601","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0,60672],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"\n\u0000\u0000\u0000f\u000b\u0000\u0000\u0000\u0012\u0010\u0000\u0000\u0000\u0016","65506":56,"65508":0,"modelId":"TS0601","manufacturerName":"_TZE284_rlytpmij","powerSource":1,"zclVersion":3,"appVersion":81,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":81,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"interviewState":"SUCCESSFUL","meta":{},"lastSeen":1763162846541}
Zigbee2MQTT version
2.6.3
External definition
export default {
zigbeeModel: ['TS0601'],
model: 'TS0601',
vendor: '_TZE284_rlytpmij',
description: 'Automatically generated definition',
extend: [],
};
What does/doesn't work with the external definition?
Nothing works with the generated external definition.
The device pairs successfully, but:
- No datapoints are detected
- No exposes are shown
- No actions or states are available
- The device does not respond to any command
The external definition contains only zigbeeModel/model/vendor and does not map any Tuya DP, so the device is non-functional.
Notes
The device seems to be a new Tuya TS0601 variant with manufacturer "_TZE284_rlytpmij", which is not present in the current zigbee-herdsman-converters database.
I am available to:
- test custom converters
- extract additional logs
- provide DP sniffing information if needed
Let me know what information would be most useful.
🙏 Thank you for creating this issue and sharing your external converter!
In case all features work, please submit a pull request on this repository so the device can be supported out-of-the-box with the next release. For instructions on how to create a pull request see the docs.
If NOT all features work, please follow the How To Support new devices. Since this is a Tuya also consider How To Support new Tuya devices.
If you need help with the process, feel free to ask here and we'll be happy to assist.
All Tuya datapoints:
TS0601 _TZE284_rlytpmij [Moes ZHT-S01]
1 Switch = system_mode
2 Mode [Manual / Auto / ECO]
3 Backlight brightness [0 / 1 / 2 / 3] [0% 20% 50% 100%]
19 Temperature correction [-9 .. 9]
20 Fault Alarm [ n/a ]
28 Factory data reset [ n/a ]
32 Sensor selection [IN / OUT / both]
39 Child lock [ON / OFF]
46 Temperature scale [celsius / fahrenheit]
47 State of the valve [Open / Close] = running_state
101 Floor Temperature
103 Antifreeze [on / off]
104 Program Mode [off / single_break / weekend / no_day_off]
106 Start temperature difference [0.5 .. 3] = deadzone_temp
107 ECO Temperature Setting
108 Weekly Programming [BgAUCAAQCx4UDB4QEQAUFgAQCAAUFwAQ]
111 Target Temperature = current heating setpoint
114 Set Temperature Upper Limit (Floor)
116 Set temperature Lower Limit (Floor)
117 Current Temperature (Room)
102 Floor Temperature °F
105 Start temperature difference °F
109 ECO Temperature Setting °F
110 Temperature correction °F
112 Target Temperature °F
113 Set Temperature Upper Limit °F
115 Set temperature Lower Limit °F
118 Current Temperature °F
My first version of external 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 modernExtend = require('zigbee-herdsman-converters/lib/modernExtend');
const e = exposes.presets;
const ea = exposes.access;
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const exposesLocal = {
hour: (name) => exposes.numeric(name, ea.STATE_SET).withValueMin(0).withValueMax(23),
minute: (name) => exposes.numeric(name, ea.STATE_SET).withValueMin(0).withValueMax(59),
program_temperature: (name) => exposes.numeric(name, ea.STATE_SET).withUnit('°C').withValueMin(5).withValueMax(35),
};
const weeklyProgramExpose = exposes.composite('weekly_programming', 'weekly_programming', ea.STATE_SET)
.withDescription('Time of day and setpoint in weekly programming mode');
for (let i = 1; i <= 6; i++) {
weeklyProgramExpose
.withFeature(exposesLocal.hour(`weekdays_program_${i}_hour`))
.withFeature(exposesLocal.minute(`weekdays_program_${i}_minute`))
.withFeature(exposesLocal.program_temperature(`weekdays_program_${i}_temperature`));
}
for (let i = 1; i <= 2; i++) {
weeklyProgramExpose
.withFeature(exposesLocal.hour(`weekend_program_${i}_hour`))
.withFeature(exposesLocal.minute(`weekend_program_${i}_minute`))
.withFeature(exposesLocal.program_temperature(`weekend_program_${i}_temperature`));
}
const decodeSchedule = (rawValue) => {
const arr = Array.isArray(rawValue) ? rawValue : Array.from(rawValue);
const result = {};
for (let i = 0; i < 6; i++) {
result[`weekdays_program_${i+1}_hour`] = arr[i*3 + 0];
result[`weekdays_program_${i+1}_minute`] = arr[i*3 + 1];
result[`weekdays_program_${i+1}_temperature`] = arr[i*3 + 2];
}
for (let i = 0; i < 2; i++) {
result[`weekend_program_${i+1}_hour`] = arr[18 + i*3 + 0];
result[`weekend_program_${i+1}_minute`] = arr[18 + i*3 + 1];
result[`weekend_program_${i+1}_temperature`] = arr[18 + i*3 + 2];
}
return result;
};
const encodeSchedule = (obj) => {
const arr = [];
for (let i = 1; i <= 6; i++) {
arr.push(obj[`weekdays_program_${i}_hour`] ?? 0);
arr.push(obj[`weekdays_program_${i}_minute`] ?? 0);
arr.push(obj[`weekdays_program_${i}_temperature`] ?? 16);
}
for (let i = 1; i <= 2; i++) {
arr.push(obj[`weekend_program_${i}_hour`] ?? 0);
arr.push(obj[`weekend_program_${i}_minute`] ?? 0);
arr.push(obj[`weekend_program_${i}_temperature`] ?? 16);
}
return arr;
};
const definition = {
fingerprint: [
{
modelID: 'TS0601',
manufacturerName: '_TZE284_rlytpmij',
},
],
model: 'TS0601 Moes ZHT-S01',
vendor: 'Moes',
description: 'Moes ZHT-S01 Thermostat (custom integration)',
extend: [
tuya.modernExtend.tuyaBase({
dp: true,
exclude: [1, 3, 103],
}),
],
exposes: [
weeklyProgramExpose,
e.child_lock(),
e.enum('system_mode', ea.STATE_SET, ['off', 'heat'])
.withDescription('Thermostat system mode (device enabled/disabled)'),
e.enum('preset', ea.STATE_SET, ['manual', 'auto', 'eco'])
.withDescription('Thermostat preset mode'),
e.numeric('target_temperature', ea.STATE_SET)
.withUnit('°C')
.withValueMin(1).withValueMax(45).withValueStep(1)
.withDescription('Target heating temperature (heatpoint)'),
e.numeric('eco_temperature', ea.STATE_SET)
.withUnit('°C')
.withDescription('Eco mode temperature'),
e.numeric('deadzone_temperature', ea.STATE_SET)
.withUnit('°C')
.withValueMin(0.5).withValueMax(5).withValueStep(0.5)
.withDescription('Temperature deadzone'),
e.enum('backlight_brightness', ea.STATE_SET, ['Off','20%','50%','100%'])
.withDescription('Backlight brightness'),
e.numeric('max_temperature_limit', ea.STATE_SET)
.withUnit('°C')
.withDescription('Floor maximal temperature limit')
.withValueMin(20).withValueMax(45),
e.numeric('min_temperature_limit', ea.STATE_SET)
.withUnit('°C')
.withDescription('Floor minimal temperature limit')
.withValueMin(1).withValueMax(10),
e.enum('sensor', ea.STATE_SET, ['IN', 'OUT', 'BOTH'])
.withDescription('Temperature sensor selection'),
e.enum('temperature_scale', ea.STATE_SET, ['celsius', 'fahrenheit'])
.withDescription('Temperature scale selection (Do not switch to Fahrenheit - converter is prepared only for Celsius data points)'),
e.binary('antifreeze', ea.STATE_SET, 'off', 'on')
.withDescription('Antifreeze function'),
e.climate()
.withLocalTemperature(ea.STATE)
.withLocalTemperatureCalibration(-9, 9, 1, ea.STATE_SET)
.withPreset(['manual', 'auto', 'eco'], ea.STATE)
.withSystemMode(['off', 'heat'], ea.STATE)
.withRunningState(['heat', 'idle'], ea.STATE),
e.numeric('floor_temperature', ea.STATE)
.withUnit('°C')
.withDescription('Temperature from floor sensor'),
e.enum('program_mode', ea.STATE_SET, ['off', 'single_break', 'weekend', 'no_day_off'])
.withDescription('Program mode type selection'),
// e.enum('fault_alarm', ea.STATE, ['OK', 'FAULT'])
// .withDescription('Fault alarm indicator'),
],
meta: {
tuyaDatapoints: [
[1, 'system_mode', {
from: (value) => (value === true ? 'heat' : 'off'),
to: (value) => value === 'heat',
}],
[2, 'preset', tuya.valueConverterBasic.lookup({
auto: tuya.enum(0),
manual: tuya.enum(1),
eco: tuya.enum(2),
})],
[3, 'backlight_brightness', tuya.valueConverterBasic.lookup({
'Off': tuya.enum(0),
'20%': tuya.enum(1),
'50%': tuya.enum(2),
'100%': tuya.enum(3),
})],
[19, 'local_temperature_calibration', tuya.valueConverter.localTemperatureCalibration],
// [20, 'fault_alarm', tuya.valueConverterBasic.lookup({OK: 0, FAULT: 1})],
// [28, 'factory_reset', tuya.valueConverter.raw],
[32, 'sensor', tuya.valueConverterBasic.lookup({
IN: tuya.enum(0),
OUT: tuya.enum(1),
BOTH: tuya.enum(2),
})],
[39, 'child_lock', tuya.valueConverter.lockUnlock],
[46, 'temperature_scale', tuya.valueConverterBasic.lookup({
celsius: tuya.enum(0),
fahrenheit: tuya.enum(1),
})],
[47, null, {
from: (value, meta, options) => {
return {running_state: value === 1 ? 'idle' : 'heat'};
},
}],
[101, 'floor_temperature', tuya.valueConverter.divideBy10],
[103, 'antifreeze', {
from: (value) => (value === true ? 'on' : 'off'),
to: (value) => value === 'on',
}],
[104, 'program_mode', tuya.valueConverterBasic.lookup({
off: tuya.enum(0),
single_break: tuya.enum(1),
weekend: tuya.enum(2),
no_day_off: tuya.enum(3),
})],
[106, 'deadzone_temperature', tuya.valueConverter.divideBy10],
[107, 'eco_temperature', tuya.valueConverter.raw],
[108, 'weekly_programming', {
from: (value, meta, options) => decodeSchedule(value),
to: (entityValue, meta, options) => encodeSchedule(entityValue),
}],
[111, 'target_temperature', tuya.valueConverter.divideBy10],
[114, 'max_temperature_limit', tuya.valueConverter.divideBy10],
[116, 'min_temperature_limit', tuya.valueConverter.divideBy10],
[117, 'local_temperature', tuya.valueConverter.divideBy10],
],
},
};
module.exports = definition;
amazing job pksoft !!
I successfully set up the _TZE284_rlytpmij variant using the code above, but I encountered an issue where the device would not be discovered by Home Assistant. The Zigbee2MQTT log showed the following error:
z2m: EventBus error 'HomeAssistant/entityRenamed': No setpoint found or it is missing value_min/max
It seems the standard e.climate() helper doesn't automatically detect the setpoint limits for this specific datapoint configuration in recent Z2M versions.
Here is a modified external converter that fixes this issue by manually defining the climate expose and explicitly injecting the current_heating_setpoint feature with min, max, and step values.
Note: I tested time synchronization fixes as well, but this specific device seems to ignore time write/read responses from the coordinator, so the time display remains in UTC if the host system is not set correctly.
Working code:
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 modernExtend = require('zigbee-herdsman-converters/lib/modernExtend');
const e = exposes.presets;
const ea = exposes.access;
const tuya = require('zigbee-herdsman-converters/lib/tuya');
// --- Helper functions for Weekly Schedule ---
const exposesLocal = {
hour: (name) => exposes.numeric(name, ea.STATE_SET).withValueMin(0).withValueMax(23),
minute: (name) => exposes.numeric(name, ea.STATE_SET).withValueMin(0).withValueMax(59),
program_temperature: (name) => exposes.numeric(name, ea.STATE_SET).withUnit('°C').withValueMin(5).withValueMax(35),
};
const weeklyProgramExpose = exposes.composite('weekly_programming', 'weekly_programming', ea.STATE_SET)
.withDescription('Time of day and setpoint in weekly programming mode');
for (let i = 1; i <= 6; i++) {
weeklyProgramExpose
.withFeature(exposesLocal.hour(`weekdays_program_${i}_hour`))
.withFeature(exposesLocal.minute(`weekdays_program_${i}_minute`))
.withFeature(exposesLocal.program_temperature(`weekdays_program_${i}_temperature`));
}
for (let i = 1; i <= 2; i++) {
weeklyProgramExpose
.withFeature(exposesLocal.hour(`weekend_program_${i}_hour`))
.withFeature(exposesLocal.minute(`weekend_program_${i}_minute`))
.withFeature(exposesLocal.program_temperature(`weekend_program_${i}_temperature`));
}
const decodeSchedule = (rawValue) => {
const arr = Array.isArray(rawValue) ? rawValue : Array.from(rawValue);
const result = {};
for (let i = 0; i < 6; i++) {
result[`weekdays_program_${i+1}_hour`] = arr[i*3 + 0];
result[`weekdays_program_${i+1}_minute`] = arr[i*3 + 1];
result[`weekdays_program_${i+1}_temperature`] = arr[i*3 + 2];
}
for (let i = 0; i < 2; i++) {
result[`weekend_program_${i+1}_hour`] = arr[18 + i*3 + 0];
result[`weekend_program_${i+1}_minute`] = arr[18 + i*3 + 1];
result[`weekend_program_${i+1}_temperature`] = arr[18 + i*3 + 2];
}
return result;
};
const encodeSchedule = (obj) => {
const arr = [];
for (let i = 1; i <= 6; i++) {
arr.push(obj[`weekdays_program_${i}_hour`] ?? 0);
arr.push(obj[`weekdays_program_${i}_minute`] ?? 0);
arr.push(obj[`weekdays_program_${i}_temperature`] ?? 16);
}
for (let i = 1; i <= 2; i++) {
arr.push(obj[`weekend_program_${i}_hour`] ?? 0);
arr.push(obj[`weekend_program_${i}_minute`] ?? 0);
arr.push(obj[`weekend_program_${i}_temperature`] ?? 16);
}
return arr;
};
// --- FIX FOR HOME ASSISTANT DISCOVERY ---
// Standard e.climate() caused "No setpoint found or it is missing value_min/max" error.
// We define the climate expose manually and explicitly push the setpoint feature with limits.
const myClimate = e.climate()
.withLocalTemperature(ea.STATE)
.withLocalTemperatureCalibration(-9, 9, 1, ea.STATE_SET)
.withPreset(['manual', 'auto', 'eco'], ea.STATE)
.withSystemMode(['off', 'heat'], ea.STATE)
.withRunningState(['heat', 'idle'], ea.STATE);
myClimate.features.push({
type: 'numeric',
name: 'current_heating_setpoint',
property: 'current_heating_setpoint',
access: ea.STATE_SET,
unit: '°C',
value_min: 5,
value_max: 35,
value_step: 0.5
});
// ----------------------------------------
const definition = {
fingerprint: [
{
modelID: 'TS0601',
manufacturerName: '_TZE284_rlytpmij',
},
],
model: 'TS0601_Moes_ZHT_S01',
vendor: 'Moes',
description: 'Moes ZHT-S01 Smart Thermostat',
extend: [
tuya.modernExtend.tuyaBase({
dp: true,
exclude: [1, 3, 103],
}),
],
exposes: [
weeklyProgramExpose,
e.child_lock(),
e.enum('system_mode', ea.STATE_SET, ['off', 'heat'])
.withDescription('Thermostat system mode'),
e.enum('preset', ea.STATE_SET, ['manual', 'auto', 'eco'])
.withDescription('Thermostat preset mode'),
e.numeric('target_temperature', ea.STATE_SET)
.withUnit('°C')
.withValueMin(1).withValueMax(45).withValueStep(1)
.withDescription('Target heating temperature (heatpoint)'),
e.numeric('eco_temperature', ea.STATE_SET)
.withUnit('°C')
.withDescription('Eco mode temperature'),
e.numeric('deadzone_temperature', ea.STATE_SET)
.withUnit('°C')
.withValueMin(0.5).withValueMax(5).withValueStep(0.5)
.withDescription('Temperature deadzone'),
e.enum('backlight_brightness', ea.STATE_SET, ['Off','20%','50%','100%'])
.withDescription('Backlight brightness'),
e.numeric('max_temperature_limit', ea.STATE_SET)
.withUnit('°C')
.withDescription('Floor maximal temperature limit')
.withValueMin(20).withValueMax(45),
e.numeric('min_temperature_limit', ea.STATE_SET)
.withUnit('°C')
.withDescription('Floor minimal temperature limit')
.withValueMin(1).withValueMax(10),
e.enum('sensor', ea.STATE_SET, ['IN', 'OUT', 'BOTH'])
.withDescription('Temperature sensor selection'),
e.enum('temperature_scale', ea.STATE_SET, ['celsius', 'fahrenheit'])
.withDescription('Temperature scale selection'),
e.binary('antifreeze', ea.STATE_SET, 'off', 'on')
.withDescription('Antifreeze function'),
myClimate, // Using the fixed climate expose
e.numeric('floor_temperature', ea.STATE)
.withUnit('°C')
.withDescription('Temperature from floor sensor'),
e.enum('program_mode', ea.STATE_SET, ['off', 'single_break', 'weekend', 'no_day_off'])
.withDescription('Program mode type selection'),
],
meta: {
tuyaDatapoints: [
[1, 'system_mode', {
from: (value) => (value === true ? 'heat' : 'off'),
to: (value) => value === 'heat',
}],
[2, 'preset', tuya.valueConverterBasic.lookup({
auto: tuya.enum(0),
manual: tuya.enum(1),
eco: tuya.enum(2),
})],
[3, 'backlight_brightness', tuya.valueConverterBasic.lookup({
'Off': tuya.enum(0),
'20%': tuya.enum(1),
'50%': tuya.enum(2),
'100%': tuya.enum(3),
})],
[19, 'local_temperature_calibration', tuya.valueConverter.localTemperatureCalibration],
[32, 'sensor', tuya.valueConverterBasic.lookup({
IN: tuya.enum(0),
OUT: tuya.enum(1),
BOTH: tuya.enum(2),
})],
[39, 'child_lock', tuya.valueConverter.lockUnlock],
[46, 'temperature_scale', tuya.valueConverterBasic.lookup({
celsius: tuya.enum(0),
fahrenheit: tuya.enum(1),
})],
[47, null, {
from: (value, meta, options) => {
return {running_state: value === 1 ? 'idle' : 'heat'};
},
}],
[101, 'floor_temperature', tuya.valueConverter.divideBy10],
[103, 'antifreeze', {
from: (value) => (value === true ? 'on' : 'off'),
to: (value) => value === 'on',
}],
[104, 'program_mode', tuya.valueConverterBasic.lookup({
off: tuya.enum(0),
single_break: tuya.enum(1),
weekend: tuya.enum(2),
no_day_off: tuya.enum(3),
})],
[106, 'deadzone_temperature', tuya.valueConverter.divideBy10],
[107, 'eco_temperature', tuya.valueConverter.raw],
[108, 'weekly_programming', {
from: (value, meta, options) => decodeSchedule(value),
to: (entityValue, meta, options) => encodeSchedule(entityValue),
}],
// IMPORTANT: Mapped to 'current_heating_setpoint' to match custom climate expose
[111, 'current_heating_setpoint', tuya.valueConverter.divideBy10],
[114, 'max_temperature_limit', tuya.valueConverter.divideBy10],
[116, 'min_temperature_limit', tuya.valueConverter.divideBy10],
[117, 'local_temperature', tuya.valueConverter.divideBy10],
],
},
};
module.exports = definition;
Thanks for the information. I haven't solved the integration into Home Assistant yet. This was just an initial technological demonstration of an external converter for Z2M based on data points I captured from the Tuya Developer Platform. It was also intended as a basis for someone who is capable (unlike me) of integrating this device directly into Z2M for native support. So, thanks for the next steps...
Been using this in Z2M for Home assistant Support, though it definitely needs work like @pksoft585 says Most of the difference is just naming schemes like "current_heating_setpoint" Works for what i need it to at the moment
external.mjs
import * as exposes from "zigbee-herdsman-converters/lib/exposes"
import * as tuya from "zigbee-herdsman-converters/lib/tuya"
const e = exposes.presets
const ea = exposes.access
/*
export default {
fingerprint: tuya.fingerprint("TS0601", ["_TZE284_rlytpmij"]),
model: "ZHT-S01",
vendor: "Moes",
description: 'Zigbee wall thermostat',
extend: [
tuya.modernExtend.tuyaBase({
dp: true,
timeStart: "1970",
}),
],
exposes: [
e
.climate()
.withSystemMode(["off", "heat"], ea.STATE)
.withSetpoint("current_heating_setpoint", 5, 35, 0.5, ea.STATE_SET)
.withLocalTemperature(ea.STATE)
],
meta: {
tuyaDatapoints: [
[1, "system_mode", tuya.valueConverterBasic.lookup({heat: true, off: false})],
[111, "current_heating_setpoint", tuya.valueConverter.divideBy10],
[117, "local_temperature", tuya.valueConverter.divideBy10],
],
}
}
*/
const exposesLocal = {
hour: (name) => exposes.numeric(name, ea.STATE_SET).withValueMin(0).withValueMax(23),
minute: (name) => exposes.numeric(name, ea.STATE_SET).withValueMin(0).withValueMax(59),
program_temperature: (name) => exposes.numeric(name, ea.STATE_SET).withUnit('°C').withValueMin(5).withValueMax(35),
};
const weeklyProgramExpose = exposes.composite('weekly_programming', 'weekly_programming', ea.STATE_SET)
.withDescription('Time of day and setpoint in weekly programming mode');
for (let i = 1; i <= 6; i++) {
weeklyProgramExpose
.withFeature(exposesLocal.hour(`weekdays_program_${i}_hour`))
.withFeature(exposesLocal.minute(`weekdays_program_${i}_minute`))
.withFeature(exposesLocal.program_temperature(`weekdays_program_${i}_temperature`));
}
for (let i = 1; i <= 2; i++) {
weeklyProgramExpose
.withFeature(exposesLocal.hour(`weekend_program_${i}_hour`))
.withFeature(exposesLocal.minute(`weekend_program_${i}_minute`))
.withFeature(exposesLocal.program_temperature(`weekend_program_${i}_temperature`));
}
const decodeSchedule = (rawValue) => {
const arr = Array.isArray(rawValue) ? rawValue : Array.from(rawValue);
const result = {};
for (let i = 0; i < 6; i++) {
result[`weekdays_program_${i+1}_hour`] = arr[i*3 + 0];
result[`weekdays_program_${i+1}_minute`] = arr[i*3 + 1];
result[`weekdays_program_${i+1}_temperature`] = arr[i*3 + 2];
}
for (let i = 0; i < 2; i++) {
result[`weekend_program_${i+1}_hour`] = arr[18 + i*3 + 0];
result[`weekend_program_${i+1}_minute`] = arr[18 + i*3 + 1];
result[`weekend_program_${i+1}_temperature`] = arr[18 + i*3 + 2];
}
return result;
};
const encodeSchedule = (obj) => {
const arr = [];
for (let i = 1; i <= 6; i++) {
arr.push(obj[`weekdays_program_${i}_hour`] ?? 0);
arr.push(obj[`weekdays_program_${i}_minute`] ?? 0);
arr.push(obj[`weekdays_program_${i}_temperature`] ?? 16);
}
for (let i = 1; i <= 2; i++) {
arr.push(obj[`weekend_program_${i}_hour`] ?? 0);
arr.push(obj[`weekend_program_${i}_minute`] ?? 0);
arr.push(obj[`weekend_program_${i}_temperature`] ?? 16);
}
return arr;
};
export default {
fingerprint: [
{
modelID: 'TS0601',
manufacturerName: '_TZE284_rlytpmij',
},
],
model: 'TS0601 Moes ZHT-S01',
vendor: 'Moes',
description: 'Moes ZHT-S01 Thermostat (custom integration)',
extend: [
tuya.modernExtend.tuyaBase({
dp: true,
}),
],
exposes: [
weeklyProgramExpose,
e.child_lock(),
e.enum('system_mode', ea.STATE_SET, ['off', 'heat'])
.withDescription('Thermostat system mode (device enabled/disabled)'),
e.enum('preset', ea.STATE_SET, ['manual', 'auto', 'eco'])
.withDescription('Thermostat preset mode'),
e.numeric('eco_temperature', ea.STATE_SET)
.withUnit('°C')
.withDescription('Eco mode temperature'),
e.numeric('deadzone_temperature', ea.STATE_SET)
.withUnit('°C')
.withValueMin(0.5).withValueMax(5).withValueStep(0.5)
.withDescription('Temperature deadzone'),
e.enum('backlight_brightness', ea.STATE_SET, ['Off','20%','50%','100%'])
.withDescription('Backlight brightness'),
e.numeric('max_temperature_limit', ea.STATE_SET)
.withUnit('°C')
.withDescription('Floor maximal temperature limit')
.withValueMin(20).withValueMax(45),
e.numeric('min_temperature_limit', ea.STATE_SET)
.withUnit('°C')
.withDescription('Floor minimal temperature limit')
.withValueMin(1).withValueMax(10),
e.enum('sensor', ea.STATE_SET, ['IN', 'OUT', 'BOTH'])
.withDescription('Temperature sensor selection'),
e.enum('temperature_scale', ea.STATE_SET, ['celsius', 'fahrenheit'])
.withDescription('Temperature scale selection (Do not switch to Fahrenheit - converter is prepared only for Celsius data points)'),
e.binary('antifreeze', ea.STATE_SET, 'off', 'on')
.withDescription('Antifreeze function'),
e.climate()
.withSystemMode(['off', 'heat'], ea.STATE)
.withSetpoint('current_heating_setpoint', 5, 35, 0.5, ea.STATE_SET)
.withLocalTemperature(ea.STATE)
.withLocalTemperatureCalibration(-9, 9, 1, ea.STATE_SET)
.withPreset(['manual', 'auto', 'eco'], ea.STATE)
.withRunningState(['idle', 'heat'], ea.STATE),
e.numeric('floor_temperature', ea.STATE)
.withUnit('°C')
.withDescription('Temperature from floor sensor'),
e.enum('program_mode', ea.STATE_SET, ['off', 'single_break', 'weekend', 'no_day_off'])
.withDescription('Program mode type selection'),
// e.enum('fault_alarm', ea.STATE, ['OK', 'FAULT'])
// .withDescription('Fault alarm indicator'),
],
meta: {
tuyaDatapoints: [
[1, 'system_mode', {
from: (value) => (value === true ? 'heat' : 'off'),
to: (value) => value === 'heat',
}],
[2, 'preset', tuya.valueConverterBasic.lookup({
auto: tuya.enum(0),
manual: tuya.enum(1),
eco: tuya.enum(2),
})],
[3, 'backlight_brightness', tuya.valueConverterBasic.lookup({
'Off': tuya.enum(0),
'20%': tuya.enum(1),
'50%': tuya.enum(2),
'100%': tuya.enum(3),
})],
[19, 'local_temperature_calibration', tuya.valueConverter.localTemperatureCalibration],
// [20, 'fault_alarm', tuya.valueConverterBasic.lookup({OK: 0, FAULT: 1})],
// [28, 'factory_reset', tuya.valueConverter.raw],
[32, 'sensor', tuya.valueConverterBasic.lookup({
IN: tuya.enum(0),
OUT: tuya.enum(1),
BOTH: tuya.enum(2),
})],
[39, 'child_lock', tuya.valueConverter.lockUnlock],
[46, 'temperature_scale', tuya.valueConverterBasic.lookup({
celsius: tuya.enum(0),
fahrenheit: tuya.enum(1),
})],
[47, "running_state", tuya.valueConverterBasic.lookup({
heat: tuya.enum(0),
idle: tuya.enum(1),
})],
[101, 'floor_temperature', tuya.valueConverter.divideBy10],
[103, 'antifreeze', {
from: (value) => (value === true ? 'on' : 'off'),
to: (value) => value === 'on',
}],
[104, 'program_mode', tuya.valueConverterBasic.lookup({
off: tuya.enum(0),
single_break: tuya.enum(1),
weekend: tuya.enum(2),
no_day_off: tuya.enum(3),
})],
[106, 'deadzone_temperature', tuya.valueConverter.divideBy10],
[107, 'eco_temperature', tuya.valueConverter.raw],
[108, 'weekly_programming', {
from: (value, meta, options) => decodeSchedule(value),
to: (entityValue, meta, options) => encodeSchedule(entityValue),
}],
[111, 'current_heating_setpoint', tuya.valueConverter.divideBy10],
[114, 'max_temperature_limit', tuya.valueConverter.divideBy10],
[116, 'min_temperature_limit', tuya.valueConverter.divideBy10],
[117, 'local_temperature', tuya.valueConverter.divideBy10],
],
},
};
Guys @AlexWright1324 @pksoft585, can you also confirm that it is not possible to set 'max_temperature_limit' below 30°C? After setting it to a lower temperature, it always reverts to 30°C.
@DavidJelinek Yes I can confirm, the minimum value accepted is 30°C. Maybe this could be solved with custom firmware, though I don't know how viable this is.
On a side note, is anyone else having issues with the thermostat not being responsive enough to temperature change? This could potentially just be the environment I have it installed in.
Datapoints 114 and 116:
114 Set Temperature Upper Limit (Floor) - max_temperature_limit 116 Set temperature Lower Limit (Floor) - min_temperature_limit
These are temperature limits for floor (from floor temperature sensor). So I think these limits are OK. Using lower floor limits doesn't make sense for heating. But it is only my point of view....
Try ChatGPT:
For underfloor heating, the typical and comfortable floor surface temperatures depend on the room type and heating load, but here are reliable general ranges: ⭐ Normal floor temperatures
Living areas, bedrooms 24–27 °C This is the most common range for comfort. Floors usually feel gently warm, not hot.
Bathrooms 27–30 °C Bathrooms are allowed (and often designed) to run slightly warmer for comfort with bare feet. Maximum recommended (standards) 29 °C for living areas 33 °C for bathrooms Building standards (EN 1264) usually set these limits to avoid discomfort and protect flooring materials. ⭐ What you will realistically see day-to-day Most well-insulated houses with heat pumps operate the floor around 23–26 °C most of the time. The room air temperature will often be around 21–23 °C, so the floor only needs to be slightly warmer. ⭐ If you are using a heat pump Because your system is low-temperature, it’s typical to see: Supply temperature: 25–32 °C Floor surface: 22–27 °C This matches the typical 4.5 kW heating load you mentioned for your planned house. ⭐ Signs something is off Above 30 °C in normal rooms → too much heat loss, incorrect balancing, or thermostat faults. Below 22 °C while heating but the room is cold → possibly insufficient flow or too low supply temp.
I think this is somewhat off topic...
Just a note - there is a difference between the actual floor temperature and the temperature measured by the sensor under the floor. And those limits are for the underfloor temperature sensor. Similarly, Datapoint 101 Floor Temperature is not the floor temperature, but the temperature measured by the lower sensor under the floor, which should be between the limits (DP 114-116). How this affects the actual floor temperature depends on the construction and materials of the floor and floor heating. Moreover, this only applies if only the bottom (underfloor) sensor or a combination of the bottom and room sensors in the thermostat is enabled on the thermostat. If the bottom sensor is not present or enabled, all these values are meaningless.
No ChatGPT used...
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days