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

Adding WOOX r7051 Siren #1822

Closed
m4v1 opened this issue Nov 29, 2020 · 4 comments
Closed

Adding WOOX r7051 Siren #1822

m4v1 opened this issue Nov 29, 2020 · 4 comments
Labels

Comments

@m4v1
Copy link
Contributor

m4v1 commented Nov 29, 2020

I am about to add the device with a pr, but I would like to ask some help before.
This is the code of the device:

{
    zigbeeModel: ["TS0219"],
    model: "r7051",
    vendor: "WOOX",
    description: "Smart siren",
    fromZigbee: [fz.battery, fz.ts0219_alarm, fz.ts0219_power_source],
    toZigbee: [tz.warning],
    exposes: [e.battery()],
    meta: { disableDefaultResponse: true, configureKey: 1 },
    configure: async (device, coordinatorEndpoint) => {
      const endpoint = device.getEndpoint(1);
      await bind(endpoint, coordinatorEndpoint, ["genPowerCfg"]);
      await configureReporting.batteryPercentageRemaining(endpoint);
    },
  }

And these are the 2 converters added to the toZigbee.js file:

ts0219_alarm: {
    cluster: "ssIasZone",
    type: "attributeReport",
    convert: (model, msg, publish, options, meta) => {
      const zoneStatus = msg.data.zoneStatus;
      return {
        active: zoneStatus === 17 ? true : false,
      };
    },
  },
  ts0219_power_source: {
    cluster: "genBasic",
    type: "attributeReport",
    convert: (model, msg, publish, options, meta) => {
      const powerSource = msg.data.powerSource;
      return {
        ac_connected: powerSource === 2 ? true : false,
      };
    },
  },

So far I can read correct informations from the device and set the warning on and off with MQTT with these payloads:

{"warning": {"mode": "emergency"}}
{"warning": {"mode": "stop"}}

But I am unable to change duration, level or command the strobe. If I send commands as per the tz.warning converter, they are ignored from the device.

This is the db entry for the device:

{
  "id": 4,
  "type": "Router",
  "ieeeAddr": "0xbc33acfffe11f8c1",
  "nwkAddr": 63439,
  "manufId": 0,
  "manufName": "_TYZB01_ynsiasng",
  "powerSource": "Emergency mains and transfer switch",
  "modelId": "TS0219",
  "epList": [
    1
  ],
  "endpoints": {
    "1": {
      "profId": 260,
      "epId": 1,
      "devId": 1027,
      "inClusterList": [
        0,
        1,
        3,
        4,
        5,
        1280,
        1282,
        61183
      ],
      "outClusterList": [
        3,
        25
      ],
      "clusters": {
        "genBasic": {
          "attributes": {
            "modelId": "TS0219",
            "manufacturerName": "_TYZB01_ynsiasng",
            "powerSource": 6,
            "zclVersion": 3,
            "appVersion": 74,
            "hwVersion": 2,
            "dateCode": "20190430"
          }
        },
        "genPowerCfg": {
          "attributes": {
            "batteryVoltage": 37,
            "batteryPercentageRemaining": 65
          }
        },
        "ssIasZone": {
          "attributes": {
            "zoneStatus": 16,
            "iasCieAddr": "0x00212effff061c96",
            "zoneState": 1
          }
        },
        "ssIasWd": {
          "attributes": {
            "1": 50,
            "2": 50,
            "3": 0,
            "maxDuration": 240
          }
        }
      },
      "binds": [
        {
          "cluster": 1,
          "type": "endpoint",
          "deviceIeeeAddress": "0x00212effff061c96",
          "endpointID": 1
        }
      ],
      "meta": {
        
      }
    }
  },
  "appVersion": 74,
  "hwVersion": 2,
  "dateCode": "20190430",
  "zclVersion": 3,
  "interviewCompleted": true,
  "meta": {
    "configured": 1,
    "reporting": 1
  },
  "lastSeen": 1606215097098
}

As you can see the ssIasWd cluster has some attributes:

"attributes": {
  "1": 50,
  "2": 50,
  "3": 0,
  "maxDuration": 240
}

I have no clue how to interact with them or what they mean. Maybe it is possible to write a custom converter and try to set some values to see what happens, but I am not sure how to proceed from here.
Thank you in advance if anyone could provide some ideas.

@github-actions
Copy link
Contributor

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

@gisi97
Copy link

gisi97 commented Jan 10, 2023

hi, I have a tuya siren that has the same zigbee model (TS0219) as the woox device. How can I get my device to work? Can you help me understand better?
I leave the link attached with more information.
#5240

@bkbilly
Copy link

bkbilly commented Jan 10, 2023

I am not sure if it helps, because I've never tried it myself, but there are instructions on how to add support for new device here:
https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html

@gisi97
Copy link

gisi97 commented Jan 11, 2023

hi, thanks for the reply. I already tried it, both the one you sent me and the other guide for tuya devices, but I can't make a working converter. I can't get datapoints. Any other ideas?

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

No branches or pull requests

3 participants