zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

[External Converter]: TS0601 from _TZE200_xixlazkg

Open xuw opened this issue 1 year ago • 2 comments

Link

http://www.xinguifeng.com/cn/Thermostat/show-545.html

Database entry

{"id":36,"type":"Router","ieeeAddr":"0xa4c1388065e3765a","nwkAddr":38198,"manufId":4417,"manufName":"_TZE200_xixlazkg","powerSource":"Mains (single phase)","modelId":"TS0601","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"h՝0i","65506":54,"65508":0,"65534":0,"modelId":"TS0601","manufacturerName":"_TZE200_xixlazkg","powerSource":1,"zclVersion":3,"appVersion":70,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":70,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"interviewState":"SUCCESSFUL","meta":{"configured":-708457359},"lastSeen":1762307114123}

Zigbee2MQTT version

2.6.3

External converter

import * as tuya from 'zigbee-herdsman-converters/lib/tuya';
import {presets as e, access as ea} from 'zigbee-herdsman-converters/lib/exposes';

export default {
  fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_xixlazkg'}],
  model: 'TS0601_thermostat',
  vendor: 'Tuya',
  description: 'Tuya thermostat',

  // Generic Tuya datapoints handlers
  fromZigbee: [tuya.fz.datapoints],
  toZigbee: [tuya.tz.datapoints],

  // Time sync + magic packet remain the same
  onEvent: tuya.onEventSetTime,
  configure: tuya.configureMagicPacket,

  exposes: [
    e.child_lock(),
    e.climate()
      .withSetpoint('current_heating_setpoint', 10, 35, 1, ea.STATE_SET)
      .withLocalTemperature(ea.STATE)
      .withSystemMode(
        ['heat', 'cool', 'dry', 'fan_only', 'emergency_heating', 'auto'],
        ea.STATE_SET
      )
      .withFanMode(['low', 'medium', 'high', 'auto'])
      .withPreset(['off', 'on'])
      // 0.1° step recommended; access optional but explicit here
      .withLocalTemperatureCalibration(-9.9, 9.9, 0.1, ea.STATE_SET),
    // e.binary('battery_low', ea.STATE, true, false),
    // e.numeric('error', ea.STATE).withDescription('error.'),
  ],

  // Tuya DP map
  meta: {
    tuyaDatapoints: [
      [1, 'preset', tuya.valueConverterBasic.lookup({'off': false, 'on': true})],
      [2, 'system_mode', tuya.valueConverterBasic.lookup({
        'fan_only': tuya.enum(0), 'cool': tuya.enum(1), 'dry': tuya.enum(2),
        'heat': tuya.enum(3), 'emergency_heating': tuya.enum(5), 'auto': tuya.enum(4),
      })],
      [28, 'fan_mode', tuya.valueConverterBasic.lookup({
        'low': tuya.enum(0), 'medium': tuya.enum(1), 'high': tuya.enum(2), 'auto': tuya.enum(3),
      })],
      [16, 'current_heating_setpoint', tuya.valueConverter.raw],          // change to divideBy10 if your device uses 0.1°C steps on dp16
      [24, 'local_temperature', tuya.valueConverter.divideBy10],
      [40, 'child_lock', tuya.valueConverter.lockUnlock],
      [44, 'local_temperature_calibration', tuya.valueConverter.localTemperatureCalibration],
      [45, 'error', tuya.valueConverter.raw],
      [35, 'battery_low', tuya.valueConverter.trueFalse0],
    ],
  },
};

What does/doesn't work with the external definition?

It works find on my settings.

Notes

software_build_id: undefined date_code: `` endpoints:

{"1":{"clusters":{"input":["genGroups","genScenes","manuSpecificTuya","genBasic"],"output":["genOta","genTime"]}},"242":{"clusters":{"input":[],"output":["greenPower"]}}}

xuw avatar Nov 05 '25 01:11 xuw

🙏 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.

github-actions[bot] avatar Nov 05 '25 01:11 github-actions[bot]

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

github-actions[bot] avatar Jan 05 '26 00:01 github-actions[bot]