Zigbee Neo Siren AB02B2-v2 trying to switch melody

Thanks for this! Then it’s not really the solution I wanted. I was planning to change the melody and trigger the siren, then giving the siren the ability to act as a door opened alert, a fire alarm, etc by using the different melodies. That’s a shame!

The “No Sensor” zigbee version @cavester is using doesn’t sleep whether on battery or mains. Changes should be immediate.

Even the “with sensor” zigbee version that IS sleepy should honor the change without being forced awake, it just may take a few seconds.

Everything you want should be doable. It’s what I do.

When I tested the ZHA quirk this was working, but I’ve moved to zigbee2mqtt for all but a couple devices now. I’ll move one of these back to ZHA when I get home and check.

Hi Jerrm,
I did look at z2m and got it running Cnut could not work out how to add devices and gave up! I guess at c£10 each I could use one for each purpose, it just feels wasteful.
Do I need to remove ZHA to add zigbee2mqtt? Is that where I am going wrong? Does it need a second controller to be plugged into my hassio?

You can run both at the same time, but they will need separate coordinators.

I’ve kept ZHA running, but with just a couple of devices that are close to the HA box so I don’t need a strong ZHA mesh.

Philosophically, I like the design goals of ZHA, but find Z2M better in actual use. Still, for the $12 cost of the extra Sonoff stick, I like keeping ZHA in place for testing and comparison. Always open to migrating back if/when it seems right.

For now, wait until I can do some testing with the device under ZHA.

Thanks! I’ll await your feedback :slightly_smiling_face:

It works for me as expected from both the Manage Clusters dialog and my script.

My system versions:

Home Assistant Core 2022.5.4
Home Assistant Supervisor 2022.05.3
Home Assistant OS 7.6
Coordinator: Sonoff Zigbee 3 Dongle +, CC1352/CC2652, Z-Stack 3.30+ (build 20220103)

The script I had started for ZHA. Never fixed it to get the iee_id from a device/entity parameter:

alias: Tuya Siren ZHA
sequence:
  - service: zha.set_zigbee_cluster_attribute
    data:
      ieee: '{{ ieee_id }}'
      endpoint_id: 1
      cluster_id: 6
      cluster_type: in
      attribute: 0x466
      value: '{{ melody | default(default_melody) }}'
  - service: zha.set_zigbee_cluster_attribute
    data:
      ieee: '{{ ieee_id }}'
      endpoint_id: 1
      cluster_id: 6
      cluster_type: in
      attribute: 0x267
      value: '{{ duration | default(default_duration) }}'
  - service: zha.set_zigbee_cluster_attribute
    data:
      ieee: '{{ ieee_id }}'
      endpoint_id: 1
      cluster_id: 6
      cluster_type: in
      attribute: 0x474
      value: '{{ volume | default(default_volume) }}'
  - service: zha.set_zigbee_cluster_attribute
    data:
      ieee: '{{ ieee_id }}'
      endpoint_id: 1
      cluster_id: 6
      cluster_type: in
      attribute: 0
      value: '{{ alarm | default(1) }}'
description: Tuya Siren ZHA
fields:
  ieee_id:
    description: zigbee ieee id
    example: a4:c1:38:00:12:34:56:78
  melody:
    description: melody
    example: 1-18
  duration:
    description: duration in seconds
    example: 4
  volume:
    description: volume
    example: 0, 1, 2
  alarm:
    description: alarm
    example: on or off
variables:
  default_melody: 18
  default_duration: 4
  default_volume: 1
mode: parallel

Example calling the script from developer tools:

5 Likes

Thanks Jerrm.
I was just changing the melody, then triggering the siren via the switch. I’ll give this a go. I find sometimes a hassio reboot stops the siren working and then I have to reboot the siren, so I am thinking of giving zigbee2mqtt a go too, I’ve ordered another coordinator, don’t tell the wife :wink:

That’s fine. It was working via the UI Manage Clusters and entitiy on_off as well. Script provided because I hadn’t deleted the ZHA version yet and it makes the thing easier to deal with.

If you do Z2M, be sure to change the channel to something reasonable. Z2M defaults to zigbee channel 11 which is dumb. ZHA uses channel 15, so best for Z2M would likely be 20 or 25 if you intend to keep both active.

A recently updated tutorial video showing change channels and network keys/ids is How to Install Zigbee2MQTT with Home Assistant 2022 - YouTube

Thanks,
I realise now i’d not quite grasped functionality of scripts. i now have a different tone for the door opening, the door bell, the smoke alarm and the CO alarm. Thank you!

My z2m version of the script adds a 50ms delay after changing each setting. After experimenting a little more yesterday, I think the ZHA version probably needs the delay too.

I think the device can miss a command if they come in too quickly.

I’m on HA 2022.8.4.
I’m still struggling to get this to work. For my siren, the clusters don’t seem to match what you have. i have a
TuyaManufClusterSiren (Endpoint id: 1, Id: 0xef00, Type: in)
this one has attributes 0x0466, 0x027, & 0x0474, and they match volume, melody, duration
and I have
TuyaSirenOnOff (Endpoint id: 1, Id: 0x0006, Type: in)
and this one just has on/off attributes. In your code above it seemed like all of the settings were in cluster 6.
When I attempt to set anything in the TuyaManufClusterSiren, it doesn’t seem to stick. I can set it, then if I ‘get’ it, it shows None

Is this still working for you with the latest HA release?

Some additional info: I notice that when I go to reconfigure the TuyaManufClusterSiren is blank for binding/reporting.

It’s also not working for me.
If I try to change any of the settings (volume, melody …), i got the green V, but it doesn’t change anything.
I am in version 2022.11.1

I had problems with reliability and so moved to Zigbee2mqtt, which is much easier to configure, once I’d got used to it.

Has anyone figured out the data that needs to be written to TuyaMCUSiren (Endpoint id: 1, Id: 0x0006, Type: in) for the various settings (volume, melodies etc.)?
Jim

1 Like

Has anyone been able to make this work without having a degree in computer science…?

1 Like

I would have thought that an alarm/siren would be a useful and popular addition to HA and therefore well supported, but it seems not!
Jim

2 Likes

If using the ZHA integration then suggest that you first open a new device support request (issue) to the ZHA Device Handlers integration to get help expanding a quirk for ZHA that maps all standard functions.

https://www.home-assistant.io/integrations/zha#how-to-add-support-for-new-and-unsupported-devices

https://github.com/zigpy/zha-device-handlers/issues

But frontend for ZHA integration is in need of UI development / user experience design improvements.

If you are talking about advanced device features in the ZHA integration UI in Home Assistant frontend then those are still not as user-friendly or easy to use as they could be if and when Home Assistant developers will ever add default support for some kind of device templating concept in the future (at least Nabu Casa’s user experience designers and UI developers discussed some ideas for the future that was along those lines during the second part of the State of the Open Home 2022 presentation video at around 1:20:00 timestamp), so while things in Home Assistant and the ZHA integration UI are getting easier but the ZHA UI and underlying features needed are not there yet.

https://www.youtube.com/live/D936T1Ze8-4?feature=share&t=4976

Quote: “Home Assistant gives you a lot of building blocks, it allows you to do a lot, but you need to build it yourself. That requires knowledge, that requires you to learn how to use it, and I think we can do better.” - Bram Kragten (Nabu Casa)

Until then, for better a worse, you need to understand that the ZHA integration is currently not yet a high-level application but rather more of a mid-level Zigbee implementation, meaning it does not offer full device abstraction for all known devices (such as the Philips Hue Bridge or IKEA Trådfri Gateway does and even Zigbee2MQTT does to some extent), but instead the ZHA integration currently only support a few specific device types mapped against existing Home Assistant device classes, as well as expose additional standard Zigbee clusters and attributes as entities in Home Assistant.

Also recommend you read through the whole ZHA integration documentation (which needs work too):

https://www.home-assistant.io/integrations/zha

So for now probably need to create a template and use templating with exposed entities in a Blueprint.

https://www.home-assistant.io/integrations/template/

https://www.home-assistant.io/docs/configuration/templating/

https://www.home-assistant.io/docs/automation/using_blueprints/

When you know what Zigbee clusters and attributes exposed as entities do then you have the option to simply use them ‘as is’ or make use of templates and configuring variables as template into Blueprints.

https://www.home-assistant.io/blog/2020/12/13/release-202012/#blueprints

https://www.home-assistant.io/docs/automation/using_blueprints/

https://www.home-assistant.io/docs/blueprint/

Also check out Selectors and Input Helpers for use in Blueprint automations for UI configuration:

https://www.home-assistant.io/docs/blueprint/selectors/

https://www.home-assistant.io/integrations/input_boolean/

In addition to searching the community to find out if there is an existing Blueprints for alarms (with siren):

https://community.home-assistant.io/c/configuration/blueprints/54

https://community.home-assistant.io/search?q=alarm%20%23configuration%3Ablueprints

There is also custom integrations and scripts that can use a siren, such as Alarmo based alarm system:

https://github.com/nielsfaber/alarmo

https://community.home-assistant.io/t/homeassiatant-alarm-management-alarm-control-panel/581471

In order to find out what all Zigbee clutsers and attribues do currently you will need to look up standard Zigbee clusters and attributes exposed as entities in Home Assistant then suggest that you ask the manufacturer if they can give you documentation or specification of which Zigbee clusters and attributes it exposes then you can look up those in the Zigbee specifications to see which options are available, see → https://github.com/zigpy/zha-device-handlers/blob/dev/README.md#primer

PS: ZHA (“Zigbee Home Automation”) is among the most popular integrations today according to Home Assistant Analytics so hopefully the future holds many UI improvements for streamlining experiences:

https://analytics.home-assistant.io/integrations/

https://www.home-assistant.io/blog/2022/01/19/streamlining-experiences/

It is now 2023 and I have the same problem as in this post. Was this ever resolved.
I update the cluster attributes to change the melody and get a green tick. But the melody on the device does not change.
Is there something else I need to do??

Hi jerrm,

I’d like to know if your neo siren can be connected via Sonoff dongle or third-party hub?