Search by

adachsoft / zigbee2mqtt-coordinator

Arkadiusz Adach

A PHP library and console workers for coordinating ZigBee2MQTT switch endpoints over MQTT

Package info

gitlab.com/a.adach/zigbee2mqtt-coordinator

Issues

pkg:composer/adachsoft/zigbee2mqtt-coordinator

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

v0.1.0 2026-11-20 14:44 UTC

This package is auto-updated.

Last update: 2026-11-20 13:44:27 UTC


README

adachsoft/zigbee2mqtt-coordinator provides PHP services and console workers for coordinating multi-endpoint ZigBee2MQTT switches, linking switch endpoints across devices, and caching bridge telemetry.

Features

  • Coordinate endpoint commands and state reports through MQTT.
  • Link endpoints and propagate physical state changes while avoiding command loops.
  • Retry unconfirmed commands and recover state after MQTT reconnects.
  • Run independent contexts in a shared MQTT event loop.
  • Cache ZigBee bridge data using PSR-16-compatible storage.
  • Run the included Symfony Console daemon commands.

Requirements

PHP 8.3 or newer, Composer, and a reachable MQTT broker are required to run the daemons.

Installation

composer require adachsoft/zigbee2mqtt-coordinator

Configure the broker with MQTT_HOST, MQTT_PORT, MQTT_CLIENT_ID, and optionally MQTT_USERNAME and MQTT_PASSWORD.

Usage

Run the included workers from the package root:

php bin/console app:zigbee2mqtt:switch-coordinator kitchen
php bin/console app:zigbee2mqtt:link-switch --dev=kitchen/state_left --dev=hall/state_right
php bin/console app:mqtt-zigbee:cache

The coordinator defaults to the state_left, state_center, and state_right endpoints. Repeat --endpoints to configure a different set. Link-switch members use the device/endpoint format. See the usage example for a broker configuration and topic walkthrough.

Applications that manage their own MQTT client can use ContextFactory and MultiContextRunner to run multiple coordinator contexts with one client. The MQTT client contract is transport-independent; the included console uses the adachsoft/mqtt-adapter package.