Heiman HS2WD-E siren: state.alert always remains at "none"

Hi,
I’m using a deCONZ RaspBee II with the deCONZ HA add-on.
When my Heiman HS2WD-E siren starts up, its state in Home Assistant always stays at off, its state never returns a state at on.
So I can’t use the on/off state of the siren to trigger an automation. I think this is also the reason why the HA service siren.toggle is not working.

In deConz API “state.alert” always remains at “none”, is that a bug?

{
“etag”: “ddc677a495cfcb6e30378b225389a20d”,
“hascolor”: false,
“lastannounced”: null,
“lastseen”: “2022-06-15T21:09Z”,
“manufacturername”: “Heiman”,
“modelid”: “WarningDevice”,
“name”: “Sirène Salon”,
“state”: {
“alert”: “none”,
“reachable”: true
},
“swversion”: “2018.03.21”,
“type”: “Warning device”,
“uniqueid”: “00:0d:6f:00:15:3a:09:b1-01”

Thanks for your help.

Yes, I think you have found the problem yourself.
BTW can you try to make the request using a REST client ? Getting Started - deCONZ REST-API
Or if you can retreive the http request and the return ?

If I m right need to send the body {“alert”:“lselect”} to the state endpoint Lights - deCONZ REST-API

Start siren:
curl -H ‘Content-Type: application/json’ -X PUT -d ‘{“alert”:“lselect”}: 1}’ http://172.30.33.3:40850/api/90144AB332/lights/2/state
curl -H ‘Content-Type: application/json’ -X PUT -d ‘{“alert”:“lselect”}: 1}’ http://172.30.33.3:40850/api/90144AB332/lights/2/state [{“success”:{"/lights/2/state/alert":“lselect”}}]

Show that siren state.alert is not updated, always “alert”:“none”:
curl -X GET -i ‘http://172.30.33.3:40850/api/90144AB332/lights/2
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=utf-8
Content-Length: 339
ETag:“1d1d75ea1a8eb52c3dc744d2471f0d93”

{“etag”:“1d1d75ea1a8eb52c3dc744d2471f0d93”,“hascolor”:false,“lastannounced”:“2022-05-06T19:53:15Z”,“lastseen”:“2022-06-17T14:16Z”,“manufacturername”:“Heiman”,“modelid”:“WarningDevice”,“name”:“Sirène Garage”,“state”:{“alert”:“none”,“reachable”:true},“swversion”:“2018.03.21”,“type”:“Warning device”,“uniqueid”:“00:0d:6f:00:15:3a:0f:86-01”}

Thx ^^.
I think there is enought information.

This device is handled by legacy code.
If I make a DDF to use for this device (to try with the DDF core), are you able to put it on your machine ? (Not easy on HA)

Sorry, but I’m using deCONZ as HA plugin. I don’t know how to load a ddf file to HA Hassio!

Hi,
@Smanar,
Do you have any action in progress to fix this bug?
Are you going to create a new ddf file?
Bests regards.

In fact It seem the state/alert is write only.
So you can use it to send value, to trigger a siren, but you will have no API update and no websocket return.

I have found some more information here Develco siren SIRZB-110 · Issue #4432 · dresden-elektronik/deconz-rest-plugin · GitHub

You can to use {“alert”:“lselect”, "ontime":10}

This command don’t work like a “on” then “off”, it’s a “on for X seconds”

Ok, Thank you for these explanations.

If I make a DDF to use for this device (to try with the DDF core), are you able to put it on your machine ?

I’ve got one of this device, would be please to test a DDF :wink:

No need ^^.
I have finaly see all is normal. state/alert is write only.
So you can use it to send value, to trigger a siren, but you will have no API update and no websocket return.

Is there a way to get the battery state without DDF ?

Arf, right.
Have checked the code, nothing for battery, so need to try with a DDF, and there is some specific code in the legacy code for this device .

But it’s a siren with battery ? The battery can’t stay alive long time …

And as this device is a “light” entry, need to create a ZHABattery to have it …

Yes it’s a siren with a battery backup that can stay alive up to 4 hours (dixit manufacturer).

If you could test the DDF and add what’s required, if anything, that would be brilliant…

Many thanks. But when using DDF editor and looking at the clusters from this device, here is the DDF I propose.But before applying it I wish to have some feedback, especially regarding the bindings part and the fact that I had to add manually ZHAAlarm because there is none of this in DDF editor.

{
  "schema": "devcap1.schema.json",
  "manufacturername": ["Heiman", "HEIMAN"],
  "modelid": ["WarningDevice", "WarningDevice-EF-3.0"],
  "vendor": "Heiman",
  "product": "Smart siren HS2WD-E",
  "sleeper": false,
  "status": "Silver",
  "subdevices": [
    {
      "type": "$TYPE_WARNING_DEVICE",
      "restapi": "/lights",
      "uuid": [
        "$address.ext",
        "0x01"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "state/alert",
          "default": "none"
        },
        {
          "name": "state/reachable"
        }
      ]
    },
    {
      "type": "$TYPE_BATTERY_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0001"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/battery",
          "refresh.interval": 3600
        },
        {
          "name": "state/lastupdated"
        }
      ]
    },
    {
      "type": "ZHAAlarm",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0500"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0403",
        "endpoint": "0x01",
        "in": [
          "0x0000",
          "0x0001",
          "0x0500"
        ]
      },
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/battery"
        },
        {
          "name": "config/enrolled"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/pending"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/alarm"
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/lowbattery"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0001",
      "report": [
        {
          "at": "0x0021",
          "dt": "0x20",
          "min": 30,
          "max": 120,
          "change": "0x00000001"
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0500",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x30",
          "min": 0,
          "max": 0
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0502",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x21",
          "min": 0,
          "max": 0
        }
      ]
    }
  ]
}

Here are the clusters for that device
image


image
image





I had to add manually ZHAAlarm because there is none of this in DDF editor.

Ha yes right, have just added it DDF: Add ZHAAlamr json by Smanar · Pull Request #6397 · dresden-elektronik/deconz-rest-plugin · GitHub

About binding, I m using bigger value for battery, no need too much report.
You have min=max = 0 for the cluster 0x0502
And for the cluster 0x0500, it s special, it realy depend of device. You can completely skip it, some device have native report for this one. The more used is just

    {
      "bind": "unicast",
      "src.ep": 1,
      "dst.ep": 1,
      "cl": "0x0500"
    }

To set a binding but without report.

And some device need to set a report too (I know only 1)

In your PR battery is state/battery but in @Swoop proposed DDF it’s config/battery.
Which one is the appropriate approach ?

Tried this DDF
{ "schema": "devcap1.schema.json", "manufacturername": [ "Heiman", "HEIMAN" ], "modelid": [ "WarningDevice", "WarningDevice-EF-3.0" ], "vendor": "Heiman", "product": "Smart siren HS2WD-E", "sleeper": false, "status": "Silver", "path": "/devices/HS2WD-E.json", "subdevices": [ { "type": "$TYPE_WARNING_DEVICE", "restapi": "/lights", "uuid": [ "$address.ext", "0x01" ], "items": [ { "name": "attr/id" }, { "name": "attr/lastannounced" }, { "name": "attr/lastseen" }, { "name": "attr/manufacturername" }, { "name": "attr/modelid" }, { "name": "attr/name" }, { "name": "attr/swversion" }, { "name": "attr/type" }, { "name": "attr/uniqueid" }, { "name": "state/alert", "default": "none" }, { "name": "state/reachable" } ] }, { "type": "$TYPE_BATTERY_SENSOR", "restapi": "/sensors", "uuid": [ "$address.ext", "0x01", "0x0001" ], "items": [ { "name": "attr/id" }, { "name": "attr/lastannounced" }, { "name": "attr/lastseen" }, { "name": "attr/manufacturername" }, { "name": "attr/modelid" }, { "name": "attr/name" }, { "name": "attr/swversion" }, { "name": "attr/type" }, { "name": "attr/uniqueid" }, { "name": "config/on" }, { "name": "config/reachable" }, { "name": "state/battery", "refresh.interval": 3600 }, { "name": "state/lastupdated" } ] }, { "type": "ZHAAlarm", "restapi": "/sensors", "uuid": [ "$address.ext", "0x01", "0x0500" ], "fingerprint": { "profile": "0x0104", "device": "0x0403", "endpoint": "0x01", "in": [ "0x0000", "0x0001", "0x0500" ] }, "items": [ { "name": "attr/id" }, { "name": "attr/lastannounced" }, { "name": "attr/lastseen" }, { "name": "attr/manufacturername" }, { "name": "attr/modelid" }, { "name": "attr/name" }, { "name": "attr/swversion" }, { "name": "attr/type" }, { "name": "attr/uniqueid" }, { "name": "config/enrolled", "public": false }, { "name": "config/on" }, { "name": "config/pending" }, { "name": "config/reachable" }, { "name": "state/alarm" }, { "name": "state/battery", "refresh.interval": 3600 }, { "name": "state/lastupdated" }, { "name": "state/lowbattery" } ] } ], "bindings": [ { "bind": "unicast", "src.ep": 1, "cl": "0x0001", "report": [ { "at": "0x0021", "dt": "0x20", "min": 60, "max": 360, "change": "0x00000001" } ] }, { "bind": "unicast", "src.ep": 1, "dst.ep": 1, "cl": "0x0500" }, { "bind": "unicast", "src.ep": 1, "cl": "0x0502", "report": [ { "at": "0x0000", "dt": "0x21", "min": 30, "max": 120 } ] } ] }
but could not see new states, even after a hot reload.

{
    "etag": "e606f3d4147b44354c8ce4aee28be9cb",
    "hascolor": false,
    "lastannounced": "2022-09-28T17:40:05Z",
    "lastseen": "2022-10-06T19:05Z",
    "manufacturername": "HEIMAN",
    "modelid": "WarningDevice-EF-3.0",
    "name": "Sirene bureau",
    "state": {
        "alert": "none",
        "reachable": true
    },
    "swversion": "2021.2.19",
    "type": "Warning device",
    "uniqueid": "84:71:27:ff:fe:fe:ab:08-01"
}


After restarting deConz-GUI (by mistake :wink: I got two new sensors Battery
{ "config": { "on": true, "reachable": true }, "etag": "97058d4183cb93728d0d019032448ab0", "lastannounced": null, "lastseen": "2022-10-06T20:30Z", "manufacturername": "HEIMAN", "modelid": "WarningDevice-EF-3.0", "name": "Battery 35", "state": { "battery": 87, "lastupdated": "2022-10-06T20:28:47.671" }, "type": "ZHABattery", "uniqueid": "84:71:27:ff:fe:fe:ab:08-01-0001", "id": "35", "deviceclass": "sensors" } and Alarm

{
  "config": {
    "on": true,
    "pending": [],
    "reachable": true
  },
  "ep": 1,
  "etag": "5cc88be475cb7f8c235990694e49487c",
  "lastannounced": null,
  "lastseen": "2022-10-06T20:30Z",
  "manufacturername": "HEIMAN",
  "modelid": "WarningDevice-EF-3.0",
  "name": "Alarm 36",
  "state": {
    "alarm": null,
    "battery": 87,
    "lastupdated": "2022-10-06T20:28:47.673",
    "lowbattery": null
  },
  "type": "ZHAAlarm",
  "uniqueid": "84:71:27:ff:fe:fe:ab:08-01-0500",
  "id": "36",
  "deviceclass": "sensors"
}

I guess that I can may be delete the $TYPE_BATTERY_SENSOR from the DDF as I got the information in the ZHAAlarm part as a state.

Oups right, have corrected the battery field, thx.

I guess that I can may be delete the $TYPE_BATTERY_SENSOR from the DDF as I got the information in the ZHAAlarm part as a state

Yes, we are using the ZHAbattery for “light” device that have not sensor, but if there is a ZHAAlam, can use this one.

But I have a doubt, this device don’t need enrollement ? And he can’t trigger alarm, so the only usefull field in the ZHAAlarm is the state/tampered ? If yes for me better to use a ZHABattery instead of the ZHAAlarm ?