Issues setting up Siren (Heiman HS2WD-E) with zigbee2mqtt

Hi All,

I have been trying a week, to set up my siren in the home assistant. I have followed several guides and different ways in the config in order to get it working. My latest attempt has been to use the following code:

Which has brought me the furthest, I now have a toggle and I can switch on and off, however I get an error in the z2m:

" No converter available for 'state' ("{\"warning\": {\"mode\": burglar, \"level\": very_high, \"strobe_level\": high, \"strobe\": true, \"strobe_duty_cycle\": 10, \"duration\": 120}}")"

I have tried with switch as well, and also by using scripts - but nothing seems to work. I have no clue what is causing the issue and if there is something else in my set up that is wrong?

In z2m I am able to expose the warning to get sound, but that’s all.

I’m running a RPI 4 with a sonoff ZB dongle-E

Home Assistant 2023.1.4
Supervisor 2022.12.1
Operating System 9.4
Frontend 20230110.0 - latest

Thanks for any help and be aware that I am just a newbie without too much experience, however this is the first obstacle I haven’t been able to overcome so far.

Did you read this?
https://www.zigbee2mqtt.io/devices/HS2WD-E.html

Yes, I have read it - since that’s what my code is based on.
Still no luck, and as I mentioned I am afraid my error is coming from somwhere else since I get this converter error.

I use this part in my alarm automation, and it works as I want it to work.
e.g this activates or reset the HS2WD-E depending on the trigger id.

  action:
  # Activate or Reset the Sirene
    - service: mqtt.publish
      data:
        topic: zigbee2mqtt/Sirene/set
        payload: >-
          {{
              '{"warning": {"duration":10, "mode":"stop", "strobe":true}}'
            if trigger.id == "reset" else
              '{"warning": {"duration":120, "mode":"emergency", "strobe":false}}'
          }}

It seems like nothing happen, I have tried your code, I have tried publish mqtt in developer tool just to see if I can publish anything. There’s no reaction in any logs, I tried to see if anything happens in mqtt explorer but still nothing. :frowning:

I really can’t get what’s wrong… Only way to get sound is through expose in z2m, but that’s all.

Strange… because when I use the Developer Tools, I see the red light flashing for 10 sec.
Maybe the dongle is causing the issue?

I am jealous… for me nothing happens.

Well - I have the siren connected and I can find it in z2m. But it seems like I cannot access nor set any payload. I don’t know if the issue is my set up or the siren. But I’m totally lost and I have no idea how to tackle this. :frowning: i hope someone with similar issues know how to solve it!

Just a question.

Have you added the integration “Mosquitto broker MQTT” to your HA?

Yes of course, I’m running a lot of devices on my home assistant. (28 at the moment, mixed routers and end devices.) So all those works, only issues with the siren…

This works for me under my mqtt: section

  switch:
    - name: "Heiman Siren"
      state_topic: "zigbee2mqtt/z2m_siren_0x84fd27fffe862fcc/set"
      command_topic: "zigbee2mqtt/z2m_siren_0x84fd27fffe862fcc/set"
      payload_on: '{"warning": {"duration": 1800, "level": "very_high", "mode": "emergency", "strobe": false}}'  # 1800 seconds (30 minutes is the max)
      payload_off: '{"warning": {"duration": 1, "level": "high", "mode": "stop", "strobe": false}}'
      retain: false

1 Like

Although it is an old topic, I stumbled upon it and for future users to solve their issue: I think your issue is related to using the " correctly.
Thus:

“mode”: “burglar” and “level”: “very_high”

Hi, have you found a solution? I’m having the same problem.

in my case the final trick was to add

command_template: "{{ value }}"

So my complete code looks as following in case of anyone needs a template:

  siren:
    - name: "Sirene"
      unique_id: siren_EG
      state_topic: "zigbee2mqtt/siren/set"
      command_topic: "zigbee2mqtt/siren/set"
      command_template: "{{ value }}"
      payload_on: '{"warning": {"mode": "fire", "level": "high", "strobe_level": "high", "strobe": true, "strobe_duty_cycle": 2, "duration": 180}}'
      payload_off: '{"warning": {"mode": "stop", "level": "high", "strobe_level": "high", "strobe": true, "strobe_duty_cycle": 2, "duration": 180}}'
      optimistic: false
      retain: false