# Zigbee2MQTT → Gladys für Heiman HS2WD-E Sirene mappen

**URL:** <https://community.gladysassistant.com/t/mapping-zigbee2mqtt-gladys-pour-la-sirene-heiman-hs2wd-e/10651>\
**Category:** Demandes livrées\
**Tags:** in-progress\
**Created:** [17. August 2026 um 19:23 UTC](https://community.gladysassistant.com/t/mapping-zigbee2mqtt-gladys-pour-la-sirene-heiman-hs2wd-e/10651 "2026-08-17T19:23:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![spenceur](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/spenceur/32/1961_2.png) [@spenceur](https://community.gladysassistant.com/u/spenceur)\
**Post date:** [17. August 2026 um 19:23 UTC](https://community.gladysassistant.com/t/mapping-zigbee2mqtt-gladys-pour-la-sirene-heiman-hs2wd-e/10651/1 "2026-08-17T19:23:50Z")

</div>

Hallo,

Im Anschluss an die Diskussion über die Zuordnung von Zigbee2MQTT → Gladys für Alarme erstelle ich ein spezifisches Thema für die **Innensirene Heiman HS2WD-E**.

Ich verwende diese Sirene mit **Zigbee2MQTT**. Sie wird korrekt erkannt und in Gladys gemeldet, aber einige von Zigbee2MQTT bereitgestellte Funktionen scheinen derzeit nicht auf Gladys-Funktionen abgebildet zu sein.

Das Ziel wäre es, die verschiedenen Funktionen der Sirene direkt in Gladys nutzen zu können, insbesondere aus Szenen heraus, ohne manuell MQTT-Befehle senden zu müssen.

**Hardware:**

- Marke: Heiman
- Modell: HS2WD-E
- Typ: Innensirene
- Integration: Zigbee2MQTT

Dokumentation Zigbee2MQTT:

> **[Heiman HS2WD-E control via MQTT | Zigbee2MQTT](https://www.zigbee2mqtt.io/devices/HS2WD-E.html)**
>
> Integrate your Heiman HS2WD-E via Zigbee2MQTT with whatever smart home infrastructure you are using without the vendor's bridge or gateway.

Ursprünglicher Beitrag:

> [@Z2M Gladys für Alarmanlage zuordnen](https://community.gladysassistant.com/t/mapping-z2m-gladys-pour-alarme/10542):
>
> Jai fais l’acquisition de ces deux appareils [Heiman HS2WD-E control via MQTT | Zigbee2MQTT](https://www.zigbee2mqtt.io/devices/HS2WD-E.html)[NEO NAS-AB06B2 control via MQTT | Zigbee2MQTT](https://www.zigbee2mqtt.io/devices/NAS-AB06B2.html) Mais il semblerait qu’il manque des fonctionnalités : Est il possibles de les ajouter svp ? Merci par avance

doc zigbee:

| Modell | HS2WD-E |
| --- | --- |
| Hersteller | Heiman |
| Beschreibung | Intelligente Sirene |
| Exponiert | Batterie, max\_dauer, warnung |
| Bild | Heiman HS2WD-E |

### **Alarm auslösen**

Der Alarm kann durch Veröffentlichen einer Nachricht an `zigbee2mqtt/FRIENDLY_NAME/set` ausgelöst werden

`{"warning": {"duration": 10, "mode": "emergency", "strobe": false}}`.

Dabei gilt:

- `duration`: Anzahl der Sekunden, die der Alarm aktiv ist (max. 1800 Sekunden)
- `mode`: `stop` oder `emergency`
- `strobe`: `true` oder `false` lässt den Blitzlicht während des Alarms einmal aufblitzen

## **Exponiert**

### **Batterie (numerisch)**

Verbleibende Batterie in %, kann bis zu 24 Stunden dauern, bevor sie gemeldet wird.

Der Wert kann im veröffentlichten Zustand in der Eigenschaft `battery` gefunden werden.

Es ist nicht möglich, diesen Wert zu lesen (`/get`) oder zu schreiben (`/set`).

Der minimale Wert beträgt `0` und der maximale Wert `100`.

Die Einheit dieses Wertes ist `%`.

### **Maximale Dauer (numerisch)**

Maximale Dauer der Sirene.

Der Wert kann im veröffentlichten Zustand in der Eigenschaft `max_duration` gefunden werden.

Um den Wert zu lesen (`/get`), veröffentlichen Sie eine Nachricht im Thema `zigbee2mqtt/FRIENDLY_NAME/get` mit dem Payload `{"max_duration": ""}`.

Um einen Wert zu schreiben (`/set`), veröffentlichen Sie eine Nachricht im Thema `zigbee2mqtt/FRIENDLY_NAME/set` mit dem Payload `{"max_duration": NEW_VALUE}`.

Der minimale Wert beträgt `0` und der maximale Wert `600`.

Die Einheit dieses Wertes ist `s`.

### **Warnung (komposit)**

Kann durch Veröffentlichen an `zigbee2mqtt/FRIENDLY_NAME/set` mit dem Payload `{"warning": {"strobe": VALUE, "strobe_duty_cycle": VALUE, "duration": VALUE, "mode": VALUE}}` gesetzt werden

- `strobe` (binär): Blitzlicht (Licht) während der Warnung ein-/ausschalten, zulässige Werte: `true` oder `false`
- `strobe_duty_cycle` (numerisch): Länge des Blitzzyklus, max. Wert ist 10
- `duration` (numerisch): Dauer in Sekunden des Alarms, Einheit ist s
- `mode` (enum): Modus der Warnung (Soundeffekt), zulässige Werte: `stop`, `emergency`

Danke 🙂

---

<div class="post-metadata">

**Author:** ![cursor-bot](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cursor-bot/32/22252_2.png) [@cursor-bot](https://community.gladysassistant.com/u/cursor-bot)\
**Post date:** [19. August 2026 um 02:25 UTC](https://community.gladysassistant.com/t/mapping-zigbee2mqtt-gladys-pour-la-sirene-heiman-hs2wd-e/10651/2 "2026-08-19T02:25:46Z")

</div>

Hallo zusammen!

Dieses Thema ist nun **in Entwicklung**.

Ein Pull Request wurde erstellt, um die Zigbee2mqtt-Exposés der Heiman HS2WD-E-Sirene auf Gladys abzubilden:

> <https://github.com/GladysAssistant/Gladys/pull/2954>
>
> Implements feature request: https://community.gladysassistant.com/t/mapping-zigb…ee2mqtt-gladys-pour-la-sirene-heiman-hs2wd-e/10651
> 
> \### Description
> 
> The Heiman HS2WD-E indoor siren is discovered by Gladys through Zigbee2mqtt, but only its \`battery\` expose was mapped to a Gladys device feature. The siren itself could not be triggered, stopped or configured from a scene without publishing raw MQTT payloads.
> 
> This PR maps the two remaining exposes of the device (\[Zigbee2mqtt page\](https://www.zigbee2mqtt.io/devices/HS2WD-E.html)):
> 
> | Zigbee2mqtt expose | Gladys category | Gladys type |
> |---|---|---|
> | \`battery\` (numeric, 0-100 %) | \`battery\` | \`integer\` (already mapped) |
> | \`max\_duration\` (numeric, 0-600 s, read/write) | \`duration\` | \`decimal\` (unit: seconds) |
> | \`warning\` (composite, write-only) | \`siren\` | \`binary\` |
> 
> \*\*No new device feature category, type or unit was added\*\* — \`docs/specs/device-feature-categories.md\` asks to reuse the existing taxonomy first, and \`siren\`/\`binary\` plus \`duration\`/\`decimal\` (already used by the \`duration\` numeric expose) cover both capabilities. As a consequence there is no i18n or frontend change: both types are already registered in the frontend (\`DeviceRow.jsx\`, \`SupportedFeatureTypes.jsx\`, icons).
> 
> \#### Siren \`warning\` command
> 
> \`warning\` is a write-only Zigbee composite: the siren is driven by publishing \`{"warning": {"mode": …, "strobe": …, "duration": …}}\`. It is now exposed as a writable siren feature:
> 
> \- turning it \*\*on\*\* publishes an alarm mode with the strobe enabled and a duration of 600 s — the device stops by itself after that delay, or earlier if its own \`max\_duration\` attribute (now configurable from Gladys) is lower;
> \- turning it \*\*off\*\* publishes the \`stop\` mode.
> 
> The mode actually sent is picked from the modes the device declares in its expose, from a preference list of the Zigbee warning modes (\`emergency\`, \`burglar\`, \`fire\`, …) for the "on" side and \`stop\` for the "off" side. The HS2WD-E only declares \`stop\` and \`emergency\`, but other sirens declare a different subset: modes a device does not declare are ignored rather than sent, and if none of the candidates match, the Zigbee default mode is used. Only the sub-features the device declares (\`strobe\`, \`duration\`) are added to the payload.
> 
> \#### Composite expose mapping, generalised
> 
> \`compositeType.js\` previously assumed every composite expose was a \`color\_xy\` light color. It now resolves write/read handlers per expose name, keeping the existing color behaviour untouched and adding the \`warning\` handler.
> 
> \`mapExpose\` also no longer maps the sub-features of a composite that is itself mapped to a Gladys feature: they are only parts of the payload of a single command and cannot be set on their own. Without this, the \`duration\` sub-feature of \`warning\` was mapped as a standalone, non-working duration feature (it would publish \`{"duration": …}\` at the root of the payload, which the device ignores).
> 
> \### Forum
> 
> Forum: https://community.gladysassistant.com/t/mapping-zigbee2mqtt-gladys-pour-la-sirene-heiman-hs2wd-e/10651
> 
> \### Tests
> 
> \- \`server/test/services/zigbee2mqtt/exposes/sirenWarningCompositeType.test.js\` (new): start/stop payloads, device-specific mode subsets, unknown modes ignored, missing \`mode\` sub-feature, built Gladys feature, sub-features not exposed standalone.
> \- \`server/test/services/zigbee2mqtt/exposes/compositeType.test.js\`: per-name handler dispatch (color, unknown composite, missing expose).
> \- \`server/test/services/zigbee2mqtt/exposes/numericType.test.js\`: \`max\_duration\` feature definition.
> \- \`server/test/services/zigbee2mqtt/lib/setValue.test.js\`: end-to-end MQTT payloads published for the siren (start, stop, \`max\_duration\`), against a real HS2WD-E definition added to the discovered-devices fixture.
> \- \`server/test/services/zigbee2mqtt/utils/payloads/HS2WD-E.json\` (new): full real-device decoding fixture, so the whole \`definition\` → Gladys device conversion is asserted.
> 
> Local results: \`npm run prettier-check\`, \`npm run eslint\` (0 errors) and \`npm run coverage\` all pass on \`server/\`, with 100 % line and branch coverage on \`compositeType.js\`, \`numericType.js\` and \`mapExpose.js\`. \`front/\` is untouched.
> 
> This PR was opened by an automated Claude Code run. Testing on the real device is very welcome, since the siren behaviour could only be verified against the Zigbee2mqtt converter definitions here.
> 
> \### Checklist
> 
> \- \[x\] Tests pass: \`cd server && npm run coverage\` (Codecov requires 100% coverage on changed lines) and Cypress (\`npm run cypress:run\`) if the UI changed
> \- \[x\] Linter and prettier pass on both front and server (\`npm run eslint\`, \`npm run prettier\`)
> \- \[x\] No undocumented breaking change
> 
> 
> \---
> \_Generated by \[Claude Code\](https://claude.ai/code/session\_01SfenWHvJmw3ffPA92yAend)\_
> 
> 
> \## Summary by CodeRabbit
> 
> \* \*\*New Features\*\*
> \* Added support for Heiman HS2WD-E indoor sirens.
> \* Sirens can be started and stopped with supported alarm modes, strobe settings, and durations.
> \* Added configurable maximum alarm duration in seconds.
> \* Improved handling of siren controls so only relevant features are exposed.
> 
> \* \*\*Bug Fixes\*\*
> \* Prevented composite control sub-features from appearing as separate device features.

Zögert nicht, dem Pull Request zu folgen, zu testen (optional, besonders bei kleinen Anfragen) und euer Feedback hier zu hinterlassen, falls nötig.

---

<div class="post-metadata">

**Author:** ![cursor-bot](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cursor-bot/32/22252_2.png) [@cursor-bot](https://community.gladysassistant.com/u/cursor-bot)\
**Post date:** [28. August 2026 um 12:33 UTC](https://community.gladysassistant.com/t/mapping-zigbee2mqtt-gladys-pour-la-sirene-heiman-hs2wd-e/10651/3 "2026-08-28T12:33:30Z")

</div>


