zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

[New device support]: Tuya TRV TS0601 _TZE200_dv8abrrz (GTZ06)

Open maciekn opened this issue 3 years ago • 4 comments

Link

https://www.houseiq.pl/pl/p/Glowica-termostatyczna-GTZ06-ZigBee-3.0-TUYA/1620

Database entry

{"id":18,"type":"EndDevice","ieeeAddr":"0x9035eafffe0a42ad","nwkAddr":34691,"manufId":4098,"manufName":"_TZE200_dv8abrrz","powerSource":"Battery","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[0,4,5,61184],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"�y�\u0012�y�\u0012","65506":31,"65508":0,"modelId":"TS0601","manufacturerName":"_TZE200_dv8abrrz","powerSource":3,"zclVersion":3,"appVersion":72,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":72,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1666883958376,"defaultSendRequestWhen":"immediate"}

Comments

The device is sold as exactly the same TRV as _TZE200_a4bpgplm authored by ID3 (already supported) I've made a workaround by doing a shameless copy of original device descriptor. It almost works - at least when it comes to basic operations. However, I noticed warning messages which seem to manifest that part of the protocol has changed:

warning 2022-10-27 17:19:18zigbee-herdsman-converters:haozee: NOT RECOGNIZED DP #151 with data {"dp":151,"datatype":4,"data":{"type":"Buffer","data":[0]}}
warning 2022-10-27 17:19:18zigbee-herdsman-converters:haozee: NOT RECOGNIZED DP #152 with data {"dp":152,"datatype":4,"data":{"type":"Buffer","data":[0]}}

Here's where my ZigBee knowledge ends ;)

External converter

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
        fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_dv8abrrz'}],
        model: 'TS0601_thermostat_1a',
        vendor: 'TuYa',
        description: 'Thermostatic radiator valve',
        whiteLabel: [
            {vendor: 'Unknown/id3.pl', model: 'GTZ06a\'},
        ],
        onEvent: tuya.onEventSetLocalTime,
        fromZigbee: [fz.ignore_basic_report, fz.ignore_tuya_set_time, fz.haozee_thermostat],
        toZigbee: [
            tz.haozee_thermostat_system_mode, tz.haozee_thermostat_current_heating_setpoint, tz.haozee_thermostat_boost_heating,
            tz.haozee_thermostat_boost_heating_countdown, tz.haozee_thermostat_window_detection,
            tz.haozee_thermostat_child_lock, tz.haozee_thermostat_temperature_calibration, tz.haozee_thermostat_max_temperature,
            tz.haozee_thermostat_min_temperature,
        ],
        exposes: [
            e.battery(), e.child_lock(), e.max_temperature(), e.min_temperature(),
            e.position(), e.window_detection(),
            exposes.binary('window', ea.STATE, 'CLOSED', 'OPEN').withDescription('Window status closed or open '),
            exposes.binary('heating', ea.STATE, 'ON', 'OFF').withDescription('Device valve is open or closed (heating or not)'),
            exposes.climate()
                .withLocalTemperature(ea.STATE).withSetpoint('current_heating_setpoint', 5, 35, 0.5, ea.STATE_SET)
                .withLocalTemperatureCalibration(-30, 30, 0.1, ea.STATE_SET).withPreset(['auto', 'manual', 'off', 'on'],
                    'MANUAL MODE ☝ - In this mode, the device executes manual temperature setting. ' +
                    'When the set temperature is lower than the "minimum temperature", the valve is closed (forced closed). ' +
                    'AUTO MODE ⏱ - In this mode, the device executes a preset week programming temperature time and temperature. ' +
                    'ON - In this mode, the thermostat stays open ' +
                    'OFF - In this mode, the thermostat stays closed'),
            exposes.composite('programming_mode').withDescription('Auto MODE ⏱ - In this mode, ' +
                    'the device executes a preset week programming temperature time and temperature. ')
                .withFeature(exposes.text('monday_schedule', ea.STATE))
                .withFeature(exposes.text('tuesday_schedule', ea.STATE))
                .withFeature(exposes.text('wednesday_schedule', ea.STATE))
                .withFeature(exposes.text('thursday_schedule', ea.STATE))
                .withFeature(exposes.text('friday_schedule', ea.STATE))
                .withFeature(exposes.text('saturday_schedule', ea.STATE))
                .withFeature(exposes.text('sunday_schedule', ea.STATE)),
            exposes.binary('boost_heating', ea.STATE_SET, 'ON', 'OFF').withDescription('Boost Heating: press and hold "+" for 3 seconds, ' +
                'the device will enter the boost heating mode, and the ▷╵◁ will flash. The countdown will be displayed in the APP'),
            exposes.numeric('boost_heating_countdown', ea.STATE_SET).withUnit('min').withDescription('Countdown in minutes')
                .withValueMin(0).withValueMax(1000),
        ],
    };

module.exports = definition;

Supported color modes

No response

Color temperature range

No response

maciekn avatar Oct 27 '22 15:10 maciekn

To find out what these datapoints see https://www.zigbee2mqtt.io/advanced/support-new-devices/03_find_tuya_data_points.html#requirements-and-caveats

Koenkk avatar Oct 27 '22 18:10 Koenkk

Thanks for the tip @Koenkk . Unfortunately I don't own Tuya Zigbee Gateway

maciekn avatar Oct 28 '22 11:10 maciekn

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Nov 28 '22 00:11 github-actions[bot]

The issue still exists. Am I missing something? It is very unlikely that I am the only one who bought this device ;)

maciekn avatar Nov 28 '22 07:11 maciekn

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Dec 29 '22 00:12 github-actions[bot]

The issue still exists.

maciekn avatar Dec 30 '22 07:12 maciekn

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Jan 30 '23 00:01 github-actions[bot]

The issue still exists.

maciekn avatar Jan 30 '23 18:01 maciekn

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Mar 03 '23 01:03 github-actions[bot]