Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge πŸŒ‰, get rid of your proprietary Zigbee bridges πŸ”¨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.53k stars 1.63k forks source link

[New device support]: #22844

Open 72longboard opened 1 month ago

72longboard commented 1 month ago

Link

https://es.aliexpress.com/item/1005006923987304.html?srcSns=sns_Copy&spreadType=socialShare&bizType=ProductDetail&social_params=6000095348167&aff_fcid=edc5a5efbe864160b08f0be54d56e580-1717115370159-07010-_onkx4EO&tt=MG&aff_fsk=_onkx4EO&aff_platform=default&sk=_onkx4EO&aff_trace_key=edc5a5efbe864160b08f0be54d56e580-1717115370159-07010-_onkx4EO&shareId=6000095348167&businessType=ProductDetail&platform=AE&terminal_id=4f343b0e05b24ec5a29e575a82deeb16&afSmartRedirect=y

Database entry

{"id":18,"type":"EndDevice","ieeeAddr":"0x94b216fffef1b487","nwkAddr":47149,"manufId":4098,"manufName":"_TZ3210_5rta89nj","powerSource":"Battery","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":1026,"inClusterList":[0,3,1,1280,61184],"outClusterList":[10,25],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":74,"stackVersion":1,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1717113801806}

Comments

Please make a new registration so that I can use this product

External definition

const {identify, battery, iasZoneAlarm} = require('zigbee-herdsman-converters/lib/modernExtend');

const definition = {
    zigbeeModel: ['TS0601'],
    model: 'TS0601',
    vendor: '_TZ3210_5rta89nj',
    description: 'Automatically generated definition',
    extend: [identify(), battery(), iasZoneAlarm({"zoneType":"generic","zoneAttributes":["alarm_1","alarm_2","tamper","battery_low"]})],
    meta: {},
};

module.exports = definition;
kkqq9320 commented 1 month ago

I found datapoints, but I'm not sure how to create an external converter. datapoints is here,

`[4, 'battery_level'],

[102, 'device_control'], [103, 'security_mode'], [104, 'ratio_of_opening'], [105, 'charge_state'], [106, 'manual_mode'], [107, 'fault'], [108, 'motor_calibration'], [109, 'installation_type'], [110, 'slow_stop'], [111, 'solar_energy_current'], [112, 'fixed_window_sash'], [113, 'motor_timeout'], [114, 'window_state'] `

plplaaa2 commented 1 month ago

Although some progress has been made, the external converter can read data points but cannot be controlled.

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

const definition = { zigbeeModel: [ '5rta89nj' // Tubular motors ], fingerprint: [ // Curtain motors: {modelID: 'TS0601', manufacturerName: '_TZ3210_5rta89nj'}, ], model: 'TS0601', vendor: '_TZ3210_5rta89nj', description: 'window pusher', fromZigbee: [tuya.fz.datapoints], toZigbee: [tuya.tz.datapoints], configure: tuya.configureMagicPacket, exposes: [ e.battery(), e.cover_position('position', 'state', ea.STATE_SET,['OPEN', 'CLOSE', 'STOP']).withDescription('Window Control'), e.enum('alarm_mode', ea.STATE_SET, ['True', 'False']), e.binary('charge_state', ea.STATE, 'charging', 'discharging'), e.enum('manual_mode', ea.STATE_SET, ['True', 'False']), e.binary('error', ea.STATE, true, false).withDescription('Fault'), e.numeric('calibration', ea.STATE_SET).withValueMin(10).withValueMax(90).withDescription('Motor calibration').withUnit('s'), e.enum('motor_direction', ea.STATE_SET, ['left', 'right']).withDescription('Install Side'), e.enum('mode', ea.STATE_SET, ['True', 'False']).withDescription('Slow_stop'), e.numeric('countdown', ea.STATE_SET).withValueMin(10).withValueMax(90).withDescription('Motor Timeout').withUnit('s'), e.binary('window_detection', ea.STATE, true, false).withDescription('Window State'),

],
meta: {
    // All datapoints go in here
    tuyaDatapoints: [
        [4, 'battery', tuya.valueConverter.raw],
        [102, 'state', tuya.valueConverterBasic.lookup({'OPEN': tuya.enum(0), 'CLOSE': tuya.enum(1), 'STOP': tuya.enum(2)})],
        [103, 'alarm_mode', tuya.valueConverterBasic.lookup({'True': tuya.enum(0), 'False': tuya.enum(1),})],
        [104, 'position', tuya.valueConverter.coverPosition],
        [104, 'position', tuya.valueConverter.raw],
        [105, 'charge_state', tuya.valueConverter.trueFalse1],
        [106, 'manual_mode', tuya.valueConverterBasic.lookup({'True': tuya.enum(0), 'False': tuya.enum(1),})],
        [107, 'error', tuya.valueConverter.trueFalse1],
        [108, 'calibration', tuya.valueConverter.calibration],
        [108, 'calibration', tuya.valueConverter.raw],
        [109, 'motor_direction', tuya.valueConverterBasic.lookup({'left': tuya.enum(0), 'right': tuya.enum(1)})],
        [110, 'mode', tuya.valueConverterBasic.lookup({'True': tuya.enum(0), 'False': tuya.enum(1)})],
        [113, 'countdown', tuya.valueConverter.countdown],
        [113, 'countdown', tuya.valueConverter.raw],
        [114, 'window_detection', tuya.valueConverter.trueFalse0],
        ],
},
extend: [
    // A preferred new way of extending functionality.
],

};

module.exports = definition;

tribakzero commented 3 weeks ago

I have the same device and the external converter works great to display some values like the battery, state, position, window_detection although it seems like the state is inverted (I open the window and it says it's closed).

Hope I could help actively but at least you have a beta tester here. πŸ™

ezeghers commented 3 weeks ago

I have the same device and the external converter works great to display some values like the battery, state, position, window_detection although it seems like the state is inverted (I open the window and it says it's closed).

Hope I could help actively but at least you have a beta tester here. πŸ™

Regarding the Open/closed state being reversed, it does the same in the the Moes or Smartlife app. Mine is mounted on the left side of the inside window and regardless of the settings in the app, it does not reverse. I sent it to the Moes support for them to investigate.

qkddn49 commented 2 weeks ago

λ‚˜λŠ” λ™μΌν•œ μž₯치λ₯Ό 가지고 있으며 μ™ΈλΆ€ λ³€ν™˜κΈ°λŠ” μƒνƒœκ°€ λ°˜μ „λœ κ²ƒμ²˜λŸΌ λ³΄μ΄μ§€λ§Œ 배터리, μƒνƒœ, μœ„μΉ˜, window_Detectionκ³Ό 같은 일뢀 값을 ν‘œμ‹œν•˜λŠ” 데 ν›Œλ₯­ν•˜κ²Œ μž‘λ™ν•©λ‹ˆλ‹€(창을 μ—΄λ©΄ λ‹«ν˜€ μžˆλ‹€κ³  ν‘œμ‹œλ©λ‹ˆλ‹€).

μ œκ°€ 적극적으둜 도움을 λ“œλ¦΄ 수 있기λ₯Ό λ°”λΌμ§€λ§Œ 적어도 μ—¬κΈ°μ—λŠ” 베타 ν…ŒμŠ€ν„°κ°€ μžˆμŠ΅λ‹ˆλ‹€. πŸ™

.Can I get the source code?

tribakzero commented 2 weeks ago

λ‚˜λŠ” λ™μΌν•œ μž₯치λ₯Ό 가지고 있으며 μ™ΈλΆ€ λ³€ν™˜κΈ°λŠ” μƒνƒœκ°€ λ°˜μ „λœ κ²ƒμ²˜λŸΌ λ³΄μ΄μ§€λ§Œ 배터리, μƒνƒœ, μœ„μΉ˜, window_Detectionκ³Ό 같은 일뢀 값을 ν‘œμ‹œν•˜λŠ” 데 ν›Œλ₯­ν•˜κ²Œ μž‘λ™ν•©λ‹ˆλ‹€(창을 μ—΄λ©΄ λ‹«ν˜€ μžˆλ‹€κ³  ν‘œμ‹œλ©λ‹ˆλ‹€). μ œκ°€ 적극적으둜 도움을 λ“œλ¦΄ 수 있기λ₯Ό λ°”λΌμ§€λ§Œ 적어도 μ—¬κΈ°μ—λŠ” 베타 ν…ŒμŠ€ν„°κ°€ μžˆμŠ΅λ‹ˆλ‹€. πŸ™

.Can I get the source code?

https://github.com/Koenkk/zigbee2mqtt/issues/22844#issuecomment-2171450055

qkddn49 commented 2 weeks ago

It's explained that it can't be controlled Is it controlled?

tribakzero commented 2 weeks ago

It's explained that it can't be controlled Is it controlled?

Current external converter allows to read values, no control enabled at the moment.

Although some progress has been made, the external converter can read data points but cannot be controlled.

qkddn49 commented 2 weeks ago

I got it. Thank you.

kkossev commented 2 weeks ago

Although some progress has been made, the external converter can read data points but cannot be controlled.

@plplaaa2 this device requires command 0x04 to be used when writing 0xEF00 cluster Data Points (instead of 0x00). Probably @koenk can help.