### 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
```JavaScript
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;
if (dpValue.datatype === 2) {
value = data.readUInt32BE(0);
} else if (dpValue.datatype === 4) {
value = data[0];
} else {
value = data[0];
}
switch (dp) {
case 1:
result.temperature = value / 10;
break;
case 2:
result.humidity = value;
break;
case 3:
result.battery_state = value;
result.battery = value === 0 ? 10 : (value === 1 ? 50 : 100);
result.battery_low = value === 0;
break;
case 17:
result.time_format = value ? '12h' : '24h';
break;
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;
```
### What does/doesn't work with the external definition?
Working:
- indoor temperature
- indoor humidity
- outdoor temperature
- battery level
- low battery warning
- 24-hour time synchronization
Not working:
- time format information
- you tell me
### Notes