[New device support]: Halemeier HA-ZGMW2-S (MultiWhite² 4-channel remote)

Aperta Adatta ai principianti
#33,852 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, typescript
Ambito
embedded-iot

Direzione di ricerca

Inizia con le definizioni dei dispositivi Halemeier esistenti e gli helper modernExtend utilizzati da zigbee-herdsman-converters; l'issue fornisce una definizione JavaScript esterna completa e un comportamento dettagliato dei pulsanti già testato. Aggiungi il convertitore HA-ZGMW2-S con quattro endpoint, batteria, illuminazione, colore e comandi di scena. Done significa che ogni pulsante viene esposto con il canale selezionato, incluse le azioni di richiamo delle scene che contengono sia l'ID della scena sia l'endpoint, e che il convertitore funziona con la suite di test di supporto ai dispositivi esistente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Link

Halemeier S-Mitter MultiWhite² 4-channel remote, the sender for the HA-ZGMW2-E LED driver (already supported).

Database entry
{"type":"EndDevice","manufId":4723,"manufName":"Halemeier GmbH","powerSource":"Battery","modelId":"HA-ZGMW2-S","appVersion":0,"stackVersion":0,"hwVersion":0,"dateCode":"NULL","swBuildId":"2.7.6_r25","zclVersion":3,"interviewCompleted":true,"interviewState":"SUCCESSFUL","endpoints":{"1":{"profId":260,"epId":1,"devId":261,"inClusterList":[0,1,3,2821,4096],"outClusterList":[3,4,5,6,8,25,768,4096]},"2":{"profId":260,"epId":2,"devId":261,"inClusterList":[0,1,3,2821,4096],"outClusterList":[3,4,5,6,8,25,768,4096]},"3":{"profId":260,"epId":3,"devId":261,"inClusterList":[0,1,3,2821,4096],"outClusterList":[3,4,5,6,8,25,768,4096]},"4":{"profId":260,"epId":4,"devId":261,"inClusterList":[0,1,3,2821,4096],"outClusterList":[3,4,5,6,8,25,768,4096]}}}
Zigbee2MQTT version

2.14.3 (zigbee-herdsman-converters 26.125.0), Ember adapter (Sonoff Zigbee 3.0 USB Dongle Plus V2)

External definition
const m = require('zigbee-herdsman-converters/lib/modernExtend');
const exposes = require('zigbee-herdsman-converters/lib/exposes');

const channels = ['1', '2', '3', '4'];

const sceneActions = ['recall', 'store'].flatMap((cmd) =>
    ['1', '2', '3', '4'].flatMap((scene) => channels.map((ch) => `${cmd}_${scene}_${ch}`)),
);

module.exports = {
    zigbeeModel: ['HA-ZGMW2-S'],
    model: 'HA-ZGMW2-S',
    vendor: 'Halemeier',
    description: 'MultiWhite² 4-channel remote',
    extend: [
        m.deviceEndpoints({endpoints: {1: 1, 2: 2, 3: 3, 4: 4}}),
        m.battery(),
        m.identify(),
        m.commandsOnOff({endpointNames: channels}),
        m.commandsLevelCtrl({endpointNames: channels}),
        m.commandsColorCtrl({endpointNames: channels}),
        m.commandsScenes({endpointNames: channels, commands: ['recall', 'store']}),
        {exposes: [exposes.presets.action(sceneActions)], isModernExtend: true},
    ],
    meta: {multiEndpoint: true},
};
What does/doesn't work with the external definition?

Everything works; every button was tested on the device. Buttons 1–4 only select the channel (nothing is sent). The other buttons send group commands from the selected channel's endpoint (N = 1–4):

  • ⏻ → on_N / off_N (alternating)
  • ✱ large / small → brightness_step_up_N / brightness_step_down_N; held → brightness_move_up_N / brightness_move_down_N, then brightness_stop_N (sometimes stop_move_step_N)
  • WW / CW → color_temperature_step_up_N / color_temperature_step_down_N; held → color_temperature_move_up_N / color_temperature_move_down_N, then stop_move_step_N
  • S → recall_1_N
  • ▷ → hue_move_N / hue_stop_N (alternating)
  • Battery is reported on all 4 endpoints.
Notes

commandsScenes publishes recall_<sceneid>_<endpoint> (e.g. recall_1_3) but only exposes recall_<endpoint>, so Home Assistant's action event entity rejected the S button until the extra exposes above was added. That probably affects other multi-endpoint devices using commandsScenes.

Lingua principale
TypeScript
Stelle
15.8k
Fork
2.1k
Merge medio
1g 4h
PR unite (30g)
40

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Koenkk/zigbee2mqtt

Tutte le issue di Koenkk/zigbee2mqtt

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.