Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
12.19k stars 1.68k forks source link

[New device support]: Smart home radiator valves TRV-705ZB (BEOK Controls) #24247

Open mrumskiy opened 1 month ago

mrumskiy commented 1 month ago

Link

https://www.beok-controls.com/thermostatic-radiator-valve/zigbee-trv-actuator/zigbee-smart-home-radiator-valves.html

Database entry

{"id":19,"type":"EndDevice","ieeeAddr":"0xa4c138dd1abf3cbc","nwkAddr":26479,"manufId":4417,"manufName":"_TZE284_ltwbm23f","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":"b��.\u0011","65506":56,"65508":0,"modelId":"TS0601","manufacturerName":"_TZE284_ltwbm23f","powerSource":3,"zclVersion":3,"appVersion":77,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":77,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1728223302713}

Zigbee2MQTT version

1.40.2

Comments

I tried to add this new device but appears in the list as not supported yet. Please include this device in the list of supported devices

External definition

const definition = {
    zigbeeModel: ['TS0601'],
    model: 'TS0601',
    vendor: '_TZE284_ltwbm23f',
    description: 'Automatically generated definition',
    extend: [],
    meta: {},
};

module.exports = definition;

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

It shows that the device is Not supported

larryson309 commented 1 month ago

Hi, I have the same wish! Thanks for it!

dobmeierr commented 1 month ago

Hello, i have the same unsupperted device

24167

4ug3r commented 1 month ago

Link

https://www.beok-controls.com/thermostatic-radiator-valve/zigbee-trv-actuator/zigbee-smart-home-radiator-valves.html

Database entry

{"id":19,"type":"EndDevice","ieeeAddr":"0xa4c138dd1abf3cbc","nwkAddr":26479,"manufId":4417,"manufName":"_TZE284_ltwbm23f","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":"b��.\u0011","65506":56,"65508":0,"modelId":"TS0601","manufacturerName":"_TZE284_ltwbm23f","powerSource":3,"zclVersion":3,"appVersion":77,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":77,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1728223302713}

Zigbee2MQTT version

1.40.2

Comments

I tried to add this new device but appears in the list as not supported yet. Please include this device in the list of supported devices

External definition

const definition = {
    zigbeeModel: ['TS0601'],
    model: 'TS0601',
    vendor: '_TZE284_ltwbm23f',
    description: 'Automatically generated definition',
    extend: [],
    meta: {},
};

module.exports = definition;

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

It shows that the device is Not supported

Go for it (:

https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html#_2-creating-the-external-definition

larryson309 commented 1 month ago

Because it is a tuya device, I created this beok.js - File - but it doesn't work. I don't see anything in the debug log file. I'm new in any programming, and my english isn't the best.

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 definition = {
    // Since a lot of Tuya devices use the same modelID, but use different datapoints
    // it's necessary to provide a fingerprint instead of a zigbeeModel
    fingerprint: [
        {
            // The model ID from: Device with modelID 'TS0601' is not supported
            // You may need to add \u0000 at the end of the name in some cases
            modelID: 'TRV-705ZB',
            // The manufacturer name from: Device with modelID 'TS0601' is not supported.
            manufacturerName: '_TZE284_ltwbm23f',
        },
    ],
    model: 'TRV-705ZB',
    vendor: '_TZE284_ltwbm23f',
    description: 'Fill in a description of the device here',
    fromZigbee: [tuya.fz.datapoints],
    toZigbee: [tuya.tz.datapoints],
    onEvent: tuya.onEventSetTime, // Add this if you are getting no converter for 'commandMcuSyncTime'
    configure: tuya.configureMagicPacket,
    exposes: [
        // Here you should put all functionality that your device exposes
    ],
    meta: {
        // All datapoints go in here
        tuyaDatapoints: [],
    },
    extend: [
        // A preferred new way of extending functionality.
    ],
};

module.exports = definition;
adelaiglesia commented 3 weeks ago

Hi, @larryson309, @mrumskiy, @dobmeierr, i have bought one of this valves. I have crafted a basic converter to use. This is not a complete converter which is ready to upload to zigbee2mqtt but it does the job. @4ug3r @Koenkk When i have a complete converter i will do a pull request.

For all the people that are searching 'TRV-705ZB zigbee2mqtt' or similar in Google i have to say that this is the best quality construcion tuya valve i have purchased, and i have 8 models. The battery cap doesn't drop, screen is well lit, buttons work...

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 e = exposes.presets;
const ea = exposes.access;
const tuya = require('zigbee-herdsman-converters/lib/tuya');

const definition = {
    fingerprint: [
        {
            // The model ID from: Device with modelID 'TS0601' is not supported
            // You may need to add \u0000 at the end of the name in some cases
            modelID: 'TS0601',
            // The manufacturer name from: Device with modelID 'TS0601' is not supported.
            manufacturerName: '_TZE284_ltwbm23f',
        },
    ],
    model: 'TRV-705ZB',
    vendor: 'TuYa',
    description: 'Thermostat Radiator Valve',
    fromZigbee: [tuya.fz.datapoints],
    toZigbee: [tuya.tz.datapoints],
    onEvent: tuya.onEventSetTime, // Add this if you are getting no converter for 'commandMcuSyncTime'
    configure: tuya.configureMagicPacket,
    exposes: [
        e.climate()
            .withLocalTemperatureCalibration(-5, 5, 0.1, ea.STATE_SET)
            .withLocalTemperature(ea.STATE).withSetpoint('current_heating_setpoint', 5, 30, 0.5, ea.STATE_SET),
        e.enum('preset', ea.STATE_SET, ['off', 'antifrost', 'eco', 'comfort', 'program', 'valve_open']).withDescription('Off deactivates valve operation, '
            + 'the other modes presets when setting on 5º (antifrost), from 15º (eco) and from 20º (comfort). ' + 
            'It is better to set directly the temperature to deactivate off mode.'),
        e.enum('valve_status', ea.STATE_SET, ['valve_closed', 'valve_open']).withDescription('Off deactivates valve operation, '
            + 'the other modes presets when setting on 5º (antifrost), from 15º (eco) and from 20º (comfort). ' + 
            'It is better to set directly the temperature to deactivate off mode.'),
        e.child_lock(),
    ],

    meta: {
        tuyaDatapoints: [
            [2, 'preset', tuya.valueConverterBasic.lookup({
                'off': tuya.enum(0),
                'antifrost': tuya.enum(1),
                'eco': tuya.enum(2),
                'comfort': tuya.enum(3),
                'program': tuya.enum(4),
                'valve_open': tuya.enum(5),
            })],
            [2, 'valve_status', tuya.valueConverterBasic.lookup({
                'valve_closed': tuya.enum(0),
                'auto': tuya.enum(1),
                'auto': tuya.enum(2),
                'auto': tuya.enum(4),
                'auto': tuya.enum(3),
                'valve_open': tuya.enum(5),
            }, 'auto')],
            [4, 'current_heating_setpoint', tuya.valueConverter.divideBy10],
            [5, 'local_temperature', tuya.valueConverter.divideBy10],
            [7, 'child_lock', tuya.valueConverter.lockUnlock],
            [47, 'local_temperature_calibration', tuya.valueConverter.localTempCalibration1],
        ],
    },
};

module.exports = definition;

For zigbee2mqtt starting guys:

  1. Copy this in the zigbee2mqtt config folder (The same folder where configuration.yaml is) and save it as tuya_trv705.js
  2. Modify configuration.yaml adding
    external_converters:
    - tuya_trv705.js

If you have in your file an 'external_converters' add bellow the file line.

Bye