[External Converter]: TS0601 from _TZE284_hodyryli
Link
https://aliexpress.com/item/1005010228473749.html
Database entry
{"id":45,"type":"EndDevice","ieeeAddr":"0xa4c138d5d80004fc","nwkAddr":30511,"manufId":4417,"manufName":"_TZE284_hodyryli","powerSource":"Battery","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0,60672],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65487":14400,"65503":"\u0000\u0000\u0000\u0000\u0011","65506":56,"65508":1,"65534":0,"stackVersion":0,"dateCode":"","manufacturerName":"_TZE284_hodyryli","zclVersion":3,"appVersion":80,"modelId":"TS0601","powerSource":3}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":80,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"interviewState":"SUCCESSFUL","meta":{"configured":-383675228},"lastSeen":1763074448009}
Zigbee2MQTT version
2.6.3 (unknown)
External converter
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const e = exposes.presets;
const ea = exposes.access;
const fzLocal = {
tuya_weather_station: {
cluster: 'manuSpecificTuya',
type: ['commandDataReport', 'commandActiveStatusReport', 'commandMcuSyncTime'],
convert: (model, msg, publish, options, meta) => {
const result = {};
// Handle time synchronization request from device
if (msg.type === 'commandMcuSyncTime') {
(async () => {
try {
const endpoint = msg.endpoint;
const now = new Date();
const utcTime = Math.round(now.getTime() / 1000);
const localTime = utcTime - (now.getTimezoneOffset() * 60);
const utcArray = [
(utcTime >> 24) & 0xFF,
(utcTime >> 16) & 0xFF,
(utcTime >> 8) & 0xFF,
utcTime & 0xFF,
];
const localArray = [
(localTime >> 24) & 0xFF,
(localTime >> 16) & 0xFF,
(localTime >> 8) & 0xFF,
localTime & 0xFF,
];
const payload = {
payloadSize: 8,
payload: [...utcArray, ...localArray],
};
await endpoint.command('manuSpecificTuya', 'mcuSyncTime', payload, {disableDefaultResponse: true});
await new Promise(resolve => setTimeout(resolve, 500));
try {
await tuya.sendDataPointBool(endpoint, 17, false);
} catch (e) {
// Ignore if DP 17 doesn't exist
}
} catch (error) {
// Silently ignore time sync errors
}
})();
return {};
}
if (!msg.data || !msg.data.dpValues) return {};
// Process each datapoint
for (const dpValue of msg.data.dpValues) {
const dp = dpValue.dp;
const data = dpValue.data;
let value;
if (dpValue.datatype === 2) { // VALUE type (4-byte integer)
if (dp === 38) {
// For external temperature, use signed 16-bit from last 2 bytes
// This supports both positive and negative temperatures
const uint16 = data.readUInt16BE(data.length - 2);
value = uint16 > 32767 ? uint16 - 65536 : uint16;
} else {
// For other values, use unsigned 32-bit
value = data.readUInt32BE(0);
}
} else if (dpValue.datatype === 4) { // BOOL/ENUM type
value = data[0];
} else {
value = data[0];
}
// Map datapoints to properties
switch (dp) {
case 1: // Internal temperature (°C * 10)
result.temperature = value / 10;
break;
case 2: // Humidity (%)
result.humidity = value;
break;
case 3: // Battery state (0=low, 1=medium, 2=full)
result.battery_state = value;
result.battery = value === 0 ? 10 : (value === 1 ? 50 : 100);
result.battery_low = value === 0;
break;
case 17: // Time format (0=24h, 1=12h)
result.time_format = value ? '12h' : '24h';
break;
case 38: // External temperature (°C * 10, supports negative values)
result.temperature_external = value / 10;
break;
default:
// Ignore unknown datapoints
break;
}
}
return result;
},
},
};
const definition = {
fingerprint: tuya.fingerprint('TS0601', ['_TZE284_hodyryli']),
model: 'TS0601_weather_station',
vendor: 'TuYa',
description: 'Weather station with clock, internal/external temperature and humidity',
fromZigbee: [fzLocal.tuya_weather_station],
toZigbee: [tuya.tz.datapoints],
configure: tuya.configureMagicPacket,
exposes: [
e.temperature()
.withDescription('Internal temperature sensor'),
e.humidity()
.withDescription('Internal humidity sensor'),
e.numeric('temperature_external', ea.STATE)
.withUnit('°C')
.withDescription('External temperature sensor'),
e.battery()
.withDescription('Battery level (10%=low, 50%=medium, 100%=full)'),
e.battery_low()
.withDescription('Battery low warning'),
e.enum('battery_state', ea.STATE, [0, 1, 2])
.withDescription('Raw battery state (0=low, 1=medium, 2=full)'),
e.enum('time_format', ea.STATE, ['12h', '24h'])
.withDescription('Clock time format'),
],
meta: {},
};
module.exports = definition;
What does/doesn't work with the external definition?
Working:
- indoor temperature
- indoor humidity
- outdoor temperature as temperature sensor
- battery level
- low battery warning
- 24-hour time synchronization
Not working:
- time format information
- you tell me
Notes
🙏 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.
🙏 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.
🙏 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.
Hi @pielaNomNom
Thanks a lot for your external converter, works fine so far.
Negative temperature values will be showed wrongly as readUInt32BE() reads an unsigned int, but it seems that here a signed int is used.
// Example
const bufNegative = Buffer.from([255,255,255,196]);
console.log(bufNegative.readUInt32BE(0)/10); // Wrong: 429496723.6
console.log(bufNegative.readInt32BE(0)/10); // Correct: -6
const bufPositive = Buffer.from([0,0,0,48]);
console.log(bufPositive.readUInt32BE(0)/10); // Correct: 4.8
console.log(bufPositive.readInt32BE(0)/10); // Correct: 4.8
Debug Info:
[2025-11-18 06:16:28] debug: zh:controller: Received payload: clusterID=61184, address=22215, groupID=0, endpoint=1, destinationEndpoint=1, wasBroadcast=false, linkQuality=135, frame={"header":{"frameControl":{"frameType":1,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":false,"reservedBits":0},"transactionSequenceNumber":172,"commandIdentifier":2},"payload":{"seq":5121,"dpValues":[{"dp":38,"datatype":2,"data":{"type":"Buffer","data":[255,255,255,196]}}]},"command":{"ID":2,"parameters":[{"name":"seq","type":33},{"name":"dpValues","type":1011}],"name":"dataReport"}}
[2025-11-18 06:16:28] debug: z2m: Received Zigbee message from 'Balkon & TK', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[255,255,255,196],"type":"Buffer"},"datatype":2,"dp":38}],"seq":5121}' from endpoint 1 with groupID 0
Updated external converter (Replaced readUInt32BE() with readInt32BE()):
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const e = exposes.presets;
const ea = exposes.access;
const fzLocal = {
tuya_weather_station: {
cluster: 'manuSpecificTuya',
type: ['commandDataReport', 'commandActiveStatusReport', 'commandMcuSyncTime'],
convert: (model, msg, publish, options, meta) => {
const result = {};
// Time synchro
if (msg.type === 'commandMcuSyncTime') {
(async () => {
try {
const endpoint = msg.endpoint;
const now = new Date();
const utcTime = Math.round(now.getTime() / 1000);
const localTime = utcTime - (now.getTimezoneOffset() * 60);
const utcArray = [
(utcTime >> 24) & 0xFF,
(utcTime >> 16) & 0xFF,
(utcTime >> 8) & 0xFF,
utcTime & 0xFF,
];
const localArray = [
(localTime >> 24) & 0xFF,
(localTime >> 16) & 0xFF,
(localTime >> 8) & 0xFF,
localTime & 0xFF,
];
const payload = {
payloadSize: 8,
payload: [...utcArray, ...localArray],
};
await endpoint.command('manuSpecificTuya', 'mcuSyncTime', payload, {disableDefaultResponse: true});
// set 24h time format
await new Promise(resolve => setTimeout(resolve, 500));
try {
await tuya.sendDataPointBool(endpoint, 17, false);
} catch (e) {
// Ignore if DP 17 don't exist
}
} catch (error) {
// Ignore time synchro errors
}
})();
return {};
}
if (!msg.data || !msg.data.dpValues) return {};
for (const dpValue of msg.data.dpValues) {
const dp = dpValue.dp;
const data = dpValue.data;
let value;
// temperature
if (dpValue.datatype === 2) {
// Reads the data as an unsigned big-endian 32-bit integer (Negative numbers will be wrong, eg. 429496724.6)
// value = data.readUInt32BE(0);
// Reads the data as a signed big-endian 32-bit integer (Negative numbers will be correct)
value = data.readInt32BE(0);
} else if (dpValue.datatype === 4) {
value = data[0];
} else {
value = data[0];
}
switch (dp) {
// temperature
case 1:
result.temperature = value / 10;
break;
// humidity
case 2:
result.humidity = value;
break;
// battery_state
case 3:
result.battery_state = value;
result.battery = value === 0 ? 10 : (value === 1 ? 50 : 100);
result.battery_low = value === 0;
break;
// time_format
case 17:
result.time_format = value ? '12h' : '24h';
break;
// temperature_external
case 38:
result.temperature_external = value / 10;
break;
}
}
return result;
},
},
};
const definition = {
fingerprint: tuya.fingerprint('TS0601', ['_TZE284_hodyryli']),
model: 'TS0601_weather_station',
vendor: 'TuYa',
description: 'Weather station with clock, internal/external temperature and humidity',
fromZigbee: [fzLocal.tuya_weather_station],
toZigbee: [tuya.tz.datapoints],
configure: tuya.configureMagicPacket,
exposes: [
e.temperature().withDescription('Internal temperature'),
e.humidity().withDescription('Internal humidity'),
e.numeric('temperature_external', ea.STATE)
.withUnit('°C')
.withDescription('External temperature sensor'),
e.battery()
.withDescription('Battery level (10%=low, 50%=medium, 100%=full)'),
e.battery_low()
.withDescription('Battery low warning'),
e.enum('battery_state', ea.STATE, [0, 1, 2])
.withDescription('Raw battery state (0=low, 1=medium, 2=full)'),
e.enum('time_format', ea.STATE, ['12h', '24h'])
.withDescription('Clock time format'),
],
meta: {
tuyaDatapoints: [
[1, 'temperature', tuya.valueConverter.divideBy10],
[2, 'humidity', tuya.valueConverter.raw],
[3, 'battery_state', tuya.valueConverter.raw],
[17, 'time_format', tuya.valueConverter.onOff],
[38, 'temperature_external', tuya.valueConverter.divideBy10],
],
},
};
module.exports = definition;
🙏 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.
@hn0pw fixed, TY
🙏 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.
Vielen Dank für die tolle Arbeit. 💯 Funktioniert soweit mit folgendem Gerät https://de.aliexpress.com/item/1005010231176557.html?spm=a2g0o.order_list.order_list_main.5.63cc5c5fZUdsyF&gatewayAdapt=glo2deu (s. https://github.com/Koenkk/zigbee2mqtt/issues/29541) gut.
Allerdings gibt es einen Anzeigefehler (mit dem ich persönlich kein Problem habe) bei der "Temperature external":
@aruba68 this seems to me like a problem during copy/paste of .withUnit('°C') on my side it shows it correctly.
@pielaNomNom maybe it makes sense to use readUIntBE() instead of readInt32BE() as this is also used in existing implementation?
Just an idea, not tested until now...
https://github.com/Koenkk/zigbee-herdsman-converters/blob/c7d126f5cef06728da93a9d8a0c6dba4fe099aad/src/lib/tuya.ts#L867C59-L867C69
Also is it also possible to expose the external temperature the same way as the internal temperature with e.temperature()?
Or is there the need to do in the different way?
🙏 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.
🙏 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.
@hn0pw Pls check it now. Negative temperatures are detected (I had to put it in the freezer). The sensor is now recognized as a temperature sensor again (I use it in a Better Thermostat). It seems that up to -10 degrees Celsius, the temperature is displayed correctly with decimal values. Below -10, only full units are displayed. Strange.
🙏 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.
Generally, zigbee2mqtt correctly detects two temperature entities. This isn't easy for MQTT; it's not as if it can accept a device with two temperature entities.
I really don't know how to handle this right now.
I'll just add a helper for the external temperature and that's it.
Yeah, so this is generally working for me, but the external temperature is not showing up correctly as a temperature in Home Assistant, although it displays units as C. Which is an issue, as I am a crazy American using F, and only the external temp shows as C.
Tried with mine. Got unexpected values.
Internal temp should be around -0.5°C, external temp around 0°C.
No idea how to debug or hack that, I'll have to read the doc i suppose...
Is the device now officially supported? Unfortunately, I couldn't find anything about it in the changelogs. Thank you in advance.
Is the device now officially supported? Unfortunately, I couldn't find anything about it in the changelogs. Thank you in advance.
No. On my device don't work the clock correct out of the box. Can somebody please submit a pull request on this repository so the device can be supported out-of-the-box with the next release.
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