Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New device support]: TUYA TS0601 Door and Window Sensor with Siren Alarm _TZE284_u8ouaqsz #25820

Open
Velomeloman opened this issue Jan 14, 2025 · 1 comment
Labels
new device support New device support request

Comments

@Velomeloman
Copy link

Velomeloman commented Jan 14, 2025

Link

https://aliexpress.ru/item/1005008147746523.html?spm=a2g2w.orderdetail.0.0.28d94aa6z2QTK3&sku_id=12000043992895257

Database entry

{"id":64,"type":"EndDevice","ieeeAddr":"0xa4c138132632d9be","nwkAddr":20330,"manufId":4417,"manufName":"_TZE284_u8ouaqsz","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,"65506":56,"65508":1,"appVersion":77,"modelId":"TS0601","manufacturerName":"_TZE284_u8ouaqsz","powerSource":3,"zclVersion":3,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":77,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1736689483941}

Zigbee2MQTT version

2.0.0-2

Comments

I sniffed new device. @u236 helped with extracting datapoints. I created converter, but contact doesn't work.

External definition

const exposes = require('zigbee-herdsman-converters/lib/exposes');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    zigbeeModel: ['TS0601'],
    model: 'TS0601',
    vendor: '_TZE284_u8ouaqsz',
    description: 'Door sensor with siren alarm',
    fromZigbee: [tuya.fz.datapoints],
    toZigbee: [tuya.tz.datapoints],
    configure: tuya.configureMagicPacket,
    exposes: [
        e.contact(), 
        e.battery(),
        e.binary('alarm', ea.STATE_SET, 'ON', 'OFF').withDescription('Sound the alarm'),
        e.binary('strobe', ea.STATE_SET, 'ON', 'OFF').withDescription('Led strobe the alarm'),
        e
            .numeric('volume', ea.STATE_SET)
            .withValueMin(1)
            .withValueMax(100)
            .withValueStep(1)
            .withUnit('%')
            .withDescription('How loud the alarm sounds for when triggered'),
        e
            .numeric('duration', ea.STATE_SET)
            .withValueMin(3)
            .withValueMax(180)
            .withValueStep(1)
            .withUnit('s')
            .withDescription('How long the alarm sounds for when triggered'),

    ],
    meta: {
        tuyaDatapoints: [
            [1, 'contact', tuya.valueConverter.trueFalseInvert],
            [2, 'battery', tuya.valueConverter.raw],
            [101, 'alarm', tuya.valueConverter.onOff],
            [102, 'strobe', tuya.valueConverter.onOff],
            [103, 'volume', tuya.valueConverter.raw],
            [104, 'duration', tuya.valueConverter.raw],
        ],
    },
};

module.exports = definition;

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

tz works, fz doesn't work

@Velomeloman Velomeloman added the new device support New device support request label Jan 14, 2025
@Velomeloman
Copy link
Author

pcap file:
_TZE284_u8ouaqsz-TS0601.zip
Subsequence:

  1. Interview
  2. Contact activation (closing)
  3. Opening
  4. Enable Siren from a sensor single click
  5. Disable Siren from a sensor double click
    Everything else from the application:
  6. Enable Siren
  7. Disable Siren
  8. Enable blinker
  9. Disable blinker
  10. Setting the volume to 100%
  11. Setting the time to 16 seconds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new device support New device support request
Projects
None yet
Development

No branches or pull requests

1 participant