Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/CBUS_PROTOCOL.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ Controls motorized devices like blinds, curtains, and garage doors.
- `OFF <group>` - Start closing/lowering (fully closed)
- `RAMP <group> <level>` - Set position level (0-255, where 0=closed, 255=open)
- `TERMINATERAMP <group>` - Stop movement at current position
- `ENABLE SET //{project}/{net}/{app}/{group} <0-255>` - Set the native Enable Control byte (MQTT `.../set`; opt-in via `cbus_enable_control_app_id`)
- `ENABLE LABEL //{project}/{net}/{app} <language> <group> hex <bytes>` - Set the group label (MQTT `.../label`; UTF-8 hex, language 1)
- `ENABLE REMOVE //{project}/{net}/{app}/{group}` - Delete the C-Gate group object (MQTT `.../remove` with payload `ON`)

**Events:**
- `enable on <network>/<app>/<group>` - Cover fully opened
Expand Down
12 changes: 10 additions & 2 deletions docs/SETTINGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ The poll expands to `network/application` pairs covering lighting (56) plus whic
| `ha_discovery_networks` | `ha_discovery_networks` | number[] | `[]` | Networks to scan for discovery. In the add-on this falls back to `getall_networks` when left empty. Also drives the security zone status sync. |
| `ha_discovery_scene_enabled` | `ha_discovery_scene_enabled` | boolean | `true` | Publish an HA `scene` entity per trigger group alongside the `event` and `button` entities. Set `false` to suppress scenes. |

> **Add-on gating:** most `ha_discovery_*` options are only applied when `ha_discovery_enabled` is on. The deliberate exceptions are `cbus_aircon_app_id`, `cbus_security_app_id`, the three `cbus_security_*_enabled` switches, `cbus_measurement_app_id`, `cbus_clock_enabled` and `cbus_scene_module_enabled` — those publish over plain MQTT and would otherwise silently stop working for MQTT-only installs.
> **Add-on gating:** most `ha_discovery_*` options are only applied when `ha_discovery_enabled` is on. The deliberate exceptions are `cbus_aircon_app_id`, `cbus_security_app_id`, the three `cbus_security_*_enabled` switches, `cbus_measurement_app_id`, `cbus_clock_enabled`, `cbus_scene_module_enabled` and `cbus_enable_control_app_id` — those publish over plain MQTT and would otherwise silently stop working for MQTT-only installs.

---

Expand Down Expand Up @@ -297,6 +297,14 @@ The sensors carry no `device_class`. Home Assistant's `timestamp` class wants IS
|---|---|---|---|---|
| `cbus_scene_module_enabled` | `cbus_scene_module_enabled` | boolean | `false` | Accept MQTT `cbus/write/{net}/{app}/{set}/play` and `/record` payloads (scene number 0–255) that become C-Gate `SCENE PLAY` / `SCENE RECORD`. Off by default: most installs use Trigger Control scenes instead, and a record write overwrites module memory. |

## Enable Control extra verbs

ON/OFF/RAMP on Enable Control already work through the generic lighting-style topics. These extra C-Gate verbs are MQTT-only (no Home Assistant entities).

| Setting | Add-on option | Type | Default | Notes |
|---|---|---|---|---|
| `cbus_enable_control_app_id` | `cbus_enable_control_app_id` | string \| null | `null` | Typically `203` (`$CB`). Gates `cbus/write/{net}/{app}/{group}/set` (native byte 0–255, or ON/OFF), `/label` (UTF-8 text, hex-encoded, clipped to 32 characters, English language code 1), and `/remove` (payload must be ON; this **deletes the C-Gate group object**). Leave unset to ignore those topics. |

Temperature Broadcast (app 25) reads are always decoded. Writes use `cbus/write/{net}/25/{group}/temperature` with a Celsius payload (0.0–63.75); cgateweb sends `TEMPERATURE BROADCAST` with `rawByte = round(°C × 4)`.

---
Expand Down Expand Up @@ -508,4 +516,4 @@ The one setting that is read but has no effect is `logging` — see [Logging](#l
7. **`web_port` is standalone-only, by design.** The add-on hardcodes `ingress_port: 8080` and its watchdog to the same port, so exposing it would let a user break ingress and the Supervisor watchdog at once.
8. **`mqttCertFile` and `mqttKeyFile` are standalone-only.** The add-on exposes `mqtt_ca_file` but no client certificate or key option, so mutual TLS is not configurable there.
9. **`trace` is standalone-only.** The add-on's `log_level` schema is `list(debug|info|warn|error)`; anything else falls back to `info`.
10. **Most `ha_discovery_*` add-on options are ignored when `ha_discovery_enabled` is off.** The exceptions — `cbus_aircon_app_id`, `cbus_security_app_id`, the `cbus_security_*_enabled` switches, `cbus_measurement_app_id`, `cbus_clock_enabled` and `cbus_scene_module_enabled` — are deliberate, so MQTT-only installs keep working.
10. **Most `ha_discovery_*` add-on options are ignored when `ha_discovery_enabled` is off.** The exceptions — `cbus_aircon_app_id`, `cbus_security_app_id`, the `cbus_security_*_enabled` switches, `cbus_measurement_app_id`, `cbus_clock_enabled`, `cbus_scene_module_enabled` and `cbus_enable_control_app_id` — are deliberate, so MQTT-only installs keep working.
6 changes: 6 additions & 0 deletions homeassistant-addon/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

If this add-on saves you time, you can [buy me a coffee](https://buymeacoffee.com/dougrathbone).

## [1.32.0] - 2026-08-25

### Added

- **Enable Control groups can be set, labelled, and removed over MQTT.** Opt in with the Enable Control application ID (typically 203); remove deletes the C-Gate group and needs ON on the remove topic.

## [1.31.0] - 2026-08-25

### Added
Expand Down
1 change: 1 addition & 0 deletions homeassistant-addon/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ Disable auto-discovery (`auto_discover_networks: false`) if:
| `cbus_measurement_app_id` | integer | (null) | C-Bus Measurement application id (`228`) for analogue/numeric sensor readings (temperature, power, light level, energy, etc). Decodes `measurement data ...` events and publishes `cbus/read/{network}/228/{device}/{channel}/value` (the decoded number) and `/unit` (e.g. `W`, `°C`, `lx`; empty if unitless/custom), with a `sensor` entity auto-created per device/channel. Also gates the write path: publish `value,multiplier,units` to `cbus/write/{network}/228/{device}/{channel}/data` to inject a reading onto C-Bus (e.g. from a scripted/virtual sensor) — cgateweb sends the native `MEASUREMENT DATA` command. One setting gates both directions, since — unlike Air Conditioning/Security — this isn't a hardware-control write; it's how a measurement source (physical or scripted) gets its own data onto the bus. Off by default. |
| `cbus_clock_enabled` | boolean | `false` | Decode C-Bus Clock and Timekeeping (app 223) broadcasts as two diagnostic sensors on the network device, and ask C-Gate for a clock refresh on connect. Read-only: this never sets the network clock. Off by default. |
| `cbus_scene_module_enabled` | boolean | `false` | Accept MQTT `cbus/write/{network}/{app}/{set}/play` and `/record` (payload is the scene number) for a C-Bus Scene Module. Off by default: most installs use Trigger Control scenes, and a record write overwrites module memory. |
| `cbus_enable_control_app_id` | integer | (null) | C-Bus Enable Control application id (typically `203`) for extra MQTT writes: `cbus/write/{network}/{app}/{group}/set` (native 0–255, or ON/OFF), `/label` (group name, hex-encoded), and `/remove` (payload ON; deletes the C-Gate group object). Leave empty to disable. No Home Assistant entities. ON/OFF/RAMP on that application still work without this. |
| `ha_bridge_diagnostics_enabled` | boolean | `true` | Publish bridge health/diagnostic entities to Home Assistant via MQTT Discovery |
| `ha_bridge_diagnostics_interval_sec` | integer | `60` | How often to refresh bridge diagnostic states (seconds) |

Expand Down
5 changes: 4 additions & 1 deletion homeassistant-addon/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "C-Gate Web Bridge"
version: "1.31.0"
version: "1.32.0"
slug: cgateweb
description: "Bridge between Clipsal C-Bus systems and MQTT/Home Assistant"
url: "https://github.com/dougrathbone/cgateweb"
Expand Down Expand Up @@ -199,6 +199,9 @@ schema:
cbus_measurement_app_id: "int(1,255)?"
cbus_clock_enabled: "bool?"
cbus_scene_module_enabled: "bool?"
# Enable Control extra verbs (typically 203/$CB). Optional; omit from
# options. SET/LABEL/REMOVE MQTT writes only — no HA entities.
cbus_enable_control_app_id: "int(1,255)?"
ha_hvac_temperature_unit: "list(C|F)?"

# ── Bridge Diagnostics ──
Expand Down
98 changes: 98 additions & 0 deletions homeassistant-addon/translations/catalog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4445,6 +4445,104 @@ configuration:
Типово вимкнено: більшість використовує сцени Trigger Control, а запис
перезаписує пам'ять модуля."

cbus_enable_control_app_id:
name:
en: Enable Control Application ID
de: Enable-Control-Anwendungs-ID
es: ID de aplicación Enable Control
fr: ID d'application Enable Control
it: ID applicazione Enable Control
nl: Enable Control-toepassings-ID
pt: ID da aplicação Enable Control
ru: ID приложения Enable Control
zh: Enable Control 应用 ID
ja: Enable Control アプリケーションID
ko: Enable Control 애플리케이션 ID
pl: ID aplikacji Enable Control
sv: Enable Control-applikations-ID
no: Enable Control-applikasjons-ID
da: Enable Control-applikations-id
cs: ID aplikace Enable Control
uk: ID застосунку Enable Control
description:
en: >-
C-Bus Enable Control application id (typically 203) for MQTT set, label
and remove writes. Leave empty to disable. Remove deletes the C-Gate
group object — publish ON on the remove topic. Labels are hex-encoded.
No Home Assistant entities are created.
de: >-
C-Bus Enable-Control-Anwendungs-ID (typisch 203) für MQTT-Schreibvorgänge
set, label und remove. Leer lassen zum Deaktivieren. Remove löscht das
C-Gate-Gruppenobjekt — ON auf das Remove-Topic veröffentlichen. Labels
werden hex-kodiert. Es werden keine Home-Assistant-Entitäten erstellt.
es: >-
ID de aplicación Enable Control de C-Bus (típicamente 203) para escrituras
MQTT set, label y remove. Vacío para desactivar. Remove elimina el objeto
de grupo de C-Gate: publique ON en el topic remove. Las etiquetas se
codifican en hex. No se crean entidades de Home Assistant.
fr: >-
ID d'application Enable Control C-Bus (typiquement 203) pour les écritures
MQTT set, label et remove. Laisser vide pour désactiver. Remove supprime
l'objet groupe C-Gate — publiez ON sur le topic remove. Les libellés sont
encodés en hex. Aucune entité Home Assistant n'est créée.
it: >-
ID applicazione Enable Control C-Bus (in genere 203) per scritture MQTT
set, label e remove. Lasciare vuoto per disattivare. Remove elimina
l'oggetto gruppo C-Gate: pubblicare ON sul topic remove. Le etichette
sono in hex. Non vengono create entità Home Assistant.
nl: >-
C-Bus Enable Control-toepassings-ID (meestal 203) voor MQTT-writes set,
label en remove. Leeg laten om uit te schakelen. Remove verwijdert het
C-Gate-groepsobject — publiceer ON op het remove-topic. Labels zijn
hex-gecodeerd. Er worden geen Home Assistant-entiteiten aangemaakt.
pt: >-
ID da aplicação Enable Control C-Bus (tipicamente 203) para escritas MQTT
set, label e remove. Deixe vazio para desativar. Remove apaga o objeto de
grupo do C-Gate — publique ON no tópico remove. Etiquetas em hex. Não
cria entidades do Home Assistant.
ru: >-
ID приложения Enable Control C-Bus (обычно 203) для MQTT-записей set,
label и remove. Пусто — выкл. Remove удаляет объект группы C-Gate —
публикуйте ON в топик remove. Метки в hex. Сущности Home Assistant не
создаются.
zh: C-Bus Enable Control 应用 ID(通常为 203),用于 MQTT 的 set、label 和 remove 写入。留空即关闭。remove 会删除 C-Gate
组对象——请在 remove 主题发布 ON。标签以十六进制编码。不会创建 Home Assistant 实体。
ja: C-Bus Enable Control アプリケーションID(通常 203)。MQTT の set / label / remove 書き込み用。空で無効。remove は
C-Gate グループオブジェクトを削除します。remove トピックに ON を発行してください。ラベルは hex 符号化。Home
Assistant エンティティは作成しません。
ko: "C-Bus Enable Control 애플리케이션 ID(보통 203). MQTT set, label, remove 쓰기용. 비우면
꺼짐. remove는 C-Gate 그룹 객체를 삭제하므로 remove 토픽에 ON을 게시하세요. 라벨은 hex 인코딩.
Home Assistant 엔티티는 만들지 않습니다."
pl: >-
ID aplikacji Enable Control C-Bus (zazwyczaj 203) dla zapisów MQTT set,
label i remove. Puste wyłącza. Remove usuwa obiekt grupy C-Gate —
publikuj ON na temacie remove. Etykiety w hex. Nie tworzy encji Home
Assistant.
sv: >-
C-Bus Enable Control-applikations-ID (vanligen 203) för MQTT-skrivningar
set, label och remove. Tomt inaktiverar. Remove tar bort C-Gate-gruppobjektet
— publicera ON på remove-ämnet. Etiketter hex-kodas. Inga Home
Assistant-entiteter skapas.
no: >-
C-Bus Enable Control-applikasjons-ID (vanligvis 203) for MQTT-skriving
set, label og remove. Tomt slår av. Remove sletter C-Gate-gruppeobjektet
— publiser ON på remove-emnet. Etiketter hex-kodes. Ingen Home
Assistant-entiteter opprettes.
da: >-
C-Bus Enable Control-applikations-id (typisk 203) til MQTT-skrivninger
set, label og remove. Tomt slår fra. Remove sletter C-Gate-gruppeobjektet
— publicér ON på remove-emnet. Etiketter hex-kodes. Der oprettes ingen
Home Assistant-entiteter.
cs: >-
ID aplikace Enable Control C-Bus (typicky 203) pro MQTT zápisy set, label
a remove. Prázdné vypne. Remove smaže objekt skupiny C-Gate — publikujte
ON na téma remove. Štítky v hex. Nevytváří entity Home Assistant.
uk: >-
ID застосунку Enable Control C-Bus (зазвичай 203) для MQTT-записів set,
label і remove. Порожнє вимикає. Remove видаляє об'єкт групи C-Gate —
публікуйте ON у топік remove. Мітки в hex. Сутності Home Assistant не
створюються.

ha_bridge_diagnostics_enabled:
name:
en: Enable Bridge Diagnostics
Expand Down
6 changes: 6 additions & 0 deletions homeassistant-addon/translations/cs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,12 @@ configuration:
Přijímá MQTT příkazy pro přehrání nebo nahrání scén na C-Bus Scene Module.
Ve výchozím stavu vypnuto: většina používá scény Trigger Control a nahrání
přepíše paměť modulu.
cbus_enable_control_app_id:
name: ID aplikace Enable Control
description: >-
ID aplikace Enable Control C-Bus (typicky 203) pro MQTT zápisy set, label
a remove. Prázdné vypne. Remove smaže objekt skupiny C-Gate — publikujte
ON na téma remove. Štítky v hex. Nevytváří entity Home Assistant.
ha_bridge_diagnostics_enabled:
name: Povolit diagnostiku bridge
description: >-
Expand Down
7 changes: 7 additions & 0 deletions homeassistant-addon/translations/da.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,13 @@ configuration:
Accepterer MQTT-kommandoer der afspiller eller optager scener på et C-Bus
Scene Module. Fra som standard: de fleste bruger Trigger Control, og
optagelse overskriver modulets hukommelse.
cbus_enable_control_app_id:
name: Enable Control-applikations-id
description: >-
C-Bus Enable Control-applikations-id (typisk 203) til MQTT-skrivninger
set, label og remove. Tomt slår fra. Remove sletter C-Gate-gruppeobjektet
— publicér ON på remove-emnet. Etiketter hex-kodes. Der oprettes ingen
Home Assistant-entiteter.
ha_bridge_diagnostics_enabled:
name: Aktivér bridge-diagnostik
description: >-
Expand Down
7 changes: 7 additions & 0 deletions homeassistant-addon/translations/de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,13 @@ configuration:
Akzeptiert MQTT-Befehle zum Abspielen oder Aufzeichnen von Szenen auf
einem C-Bus Scene Module. Standardmäßig aus: die meisten Anlagen nutzen
Trigger-Control-Szenen, und Record überschreibt den Modulspeicher.
cbus_enable_control_app_id:
name: Enable-Control-Anwendungs-ID
description: >-
C-Bus Enable-Control-Anwendungs-ID (typisch 203) für MQTT-Schreibvorgänge
set, label und remove. Leer lassen zum Deaktivieren. Remove löscht das
C-Gate-Gruppenobjekt — ON auf das Remove-Topic veröffentlichen. Labels
werden hex-kodiert. Es werden keine Home-Assistant-Entitäten erstellt.
ha_bridge_diagnostics_enabled:
name: Bridge-Diagnose aktivieren
description: >-
Expand Down
7 changes: 7 additions & 0 deletions homeassistant-addon/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,13 @@ configuration:
Accept MQTT commands that play or record scenes on a C-Bus Scene Module.
Off by default: most installs use Trigger Control scenes instead, and a
record write overwrites module memory.
cbus_enable_control_app_id:
name: Enable Control Application ID
description: >-
C-Bus Enable Control application id (typically 203) for MQTT set, label
and remove writes. Leave empty to disable. Remove deletes the C-Gate group
object — publish ON on the remove topic. Labels are hex-encoded. No Home
Assistant entities are created.
ha_bridge_diagnostics_enabled:
name: Enable Bridge Diagnostics
description: >-
Expand Down
7 changes: 7 additions & 0 deletions homeassistant-addon/translations/es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,13 @@ configuration:
Acepta comandos MQTT para reproducir o grabar escenas en un Scene Module
C-Bus. Desactivado por defecto: la mayoría usa escenas de Trigger Control,
y grabar sobrescribe la memoria del módulo.
cbus_enable_control_app_id:
name: ID de aplicación Enable Control
description: >-
ID de aplicación Enable Control de C-Bus (típicamente 203) para escrituras
MQTT set, label y remove. Vacío para desactivar. Remove elimina el objeto
de grupo de C-Gate: publique ON en el topic remove. Las etiquetas se
codifican en hex. No se crean entidades de Home Assistant.
ha_bridge_diagnostics_enabled:
name: Habilitar diagnósticos del bridge
description: >-
Expand Down
7 changes: 7 additions & 0 deletions homeassistant-addon/translations/fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,13 @@ configuration:
Scene Module C-Bus. Désactivé par défaut : la plupart des installs
utilisent Trigger Control, et un enregistrement écrase la mémoire du
module.
cbus_enable_control_app_id:
name: ID d'application Enable Control
description: >-
ID d'application Enable Control C-Bus (typiquement 203) pour les écritures
MQTT set, label et remove. Laisser vide pour désactiver. Remove supprime
l'objet groupe C-Gate — publiez ON sur le topic remove. Les libellés sont
encodés en hex. Aucune entité Home Assistant n'est créée.
ha_bridge_diagnostics_enabled:
name: Activer les diagnostics du bridge
description: >-
Expand Down
7 changes: 7 additions & 0 deletions homeassistant-addon/translations/it.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,13 @@ configuration:
Accetta comandi MQTT per riprodurre o registrare scene su un Scene Module
C-Bus. Disattivo di default: la maggior parte usa scene Trigger Control, e
la registrazione sovrascrive la memoria del modulo.
cbus_enable_control_app_id:
name: ID applicazione Enable Control
description: >-
ID applicazione Enable Control C-Bus (in genere 203) per scritture MQTT
set, label e remove. Lasciare vuoto per disattivare. Remove elimina
l'oggetto gruppo C-Gate: pubblicare ON sul topic remove. Le etichette sono
in hex. Non vengono create entità Home Assistant.
ha_bridge_diagnostics_enabled:
name: Abilita diagnostica del bridge
description: >-
Expand Down
Loading