Bonjour à tous,
Lors de mes tests sur le plugin daikin-onecta pour matterbridge je vois bien remonter dans Gladys le commutateur On/Off ainsi que les 2 températures de consignes (1 pour le mode clim et 1 pour le mode chauffage) :
La sélection du mode n’était pas visible dans Gladys alors que sur l’application Maison d’Apple je voyais bien les modes, voici des captures d’écrans de ce que je peux voir : (Il manque le mode ventilateur et déshumidificateur mais je ne sais pas dire si le problème vient du plugin ou bien d’apple qui ne sait pas gérer ces 2 modes).
Voici un petit résumé par l’IA entre les fonctionnalités Gladys et matterbridge :
@pierre-gilles Je suis malheureusement au max de mes connaissances pour rendre comptatible ceci.
Tu penses avoir un peu de temps pour regarder ?
Merci
Alors la situation a évolué depuis, car le cluster FanControl est maintenant géré par Gladys ! ( Mais personne n’avait testé le développement, donc on itère sur ce sujet : Matter : Investigation ventilateur Dyson Matterbridge )
Pour ModeSelect, je peux m’en occuper oui
Grâce aux nouvelles supported_options développés récemment, j’ai pu développer cette fonctionnalité !
Pour tester, je vous proposes une image Docker:
ghcr.io/gladysassistant/gladys-preview:cursor-matter-ac-mode-management-fb55
La PR :
GladysAssistant:master ← GladysAssistant:cursor/matter-ac-mode-management-fb55
ouvert 09:57AM - 20 Jul 26 UTC
## Description
Adds air conditioner operating mode management to the Matter int… egration, as requested on the community forum: https://community.gladysassistant.com/t/matter-climatiseur-gestion-des-modes/10225
Air conditioners exposed over Matter (e.g. Daikin units bridged through Matterbridge) expose their operating mode through the `Thermostat` cluster `SystemMode` attribute. Until now, Gladys only handled the local temperature and the heating/cooling setpoints, so the mode selector visible in Apple Home was missing in Gladys.
### Server (`server/services/matter`)
- New `utils/thermostatMatterMapping.js`: bidirectional mapping between Matter `SystemMode` (Off/Auto/Cool/Heat/EmergencyHeat/Precooling/FanOnly/Dry/Sleep) and Gladys `AC_MODE` (Auto/Cooling/Heating/Drying/Fan), plus `getAcModeSupportedOptions` which builds the feature `supported_options` from the Thermostat cluster capabilities (Auto only when the cluster has the `AutoMode` feature, Heat only with the `Heating` feature; Dry/FanOnly have no Matter capability flag and are always exposed on cooling devices).
- `convertToGladysDevice`: devices whose Thermostat cluster supports the `cooling` feature now expose an `air-conditioning/mode` feature (`:mode` external id suffix) with its `supported_options` (persisted via the mechanism introduced in #2567), and `min`/`max` derived from them.
- `matter.listenToStateChange`: subscribes to `SystemMode` attribute changes and emits the mapped Gladys AC mode (values without a Gladys equivalent, such as `Off`, are ignored — on/off is handled by the `OnOff` cluster).
- `matter.readInitialDeviceStates`: reads the initial `SystemMode` value on startup.
- `matter.setValue`: writes the `SystemMode` attribute when the user changes the mode from Gladys.
- README compatibility table updated.
### Server (core fix)
- `utils/normalizeSupportedOptions.js`: strip the DB metadata fields (`device_feature_id`, `created_at`, `updated_at`) from `supported_options` payloads. Devices fetched from the API include the full `DeviceFeatureSupportedOption` rows, so re-saving a device from an integration page failed validation with `"[0].device_feature_id" is not allowed` (found while testing this PR end-to-end).
### Front
- `AirConditioningModeDeviceFeature` now renders the mode buttons dynamically from the feature `supported_options` (sorted by `sort_order`, labels translated per mode with the stored label as fallback). Features without `supported_options` (e.g. existing MELCloud devices) keep the previous behavior: Auto/Cool/Heat, plus Dry/Fan when the feature `max` covers them.
- New `drying`/`fan` translations added to `en`, `fr`, and `de`.
## Tests
- New unit tests for `thermostatMatterMapping` (all mappings, unknown-value branches, and supported options per capability combination).
- Updated/extended tests for `convertToGladysDevice`, `listenToStateChange`, `readInitialDeviceStates`, `setValue`, `matter.init` and `normalizeSupportedOptions` (metadata stripping round-trip).
- `npm run coverage` on the server passes (4337 tests), with 100% line coverage on every touched file. Front `prettier-check`, `eslint`, `compare-translations`, `build` and the full Cypress suite pass.
## End-to-end validation
Tested against **two real Matter nodes** built with matter.js and commissioned into Gladys through the Matter integration UI/API:
- a Room Air Conditioner with Thermostat `Heating + Cooling + AutoMode` → Mode feature with 5 supported options (Auto, Cool, Heat, Dry, Fan);
- a second one with `Heating + Cooling` only (no AutoMode) → Mode feature with 4 supported options (no Auto).
The options are persisted in `t_device_feature_supported_option`:
```
matter-1-1-513-mode|0|Auto|0 matter-2-1-513-mode|1|Cool|0
matter-1-1-513-mode|1|Cool|1 matter-2-1-513-mode|2|Heat|1
matter-1-1-513-mode|2|Heat|2 matter-2-1-513-mode|3|Dry|2
matter-1-1-513-mode|3|Dry|3 matter-2-1-513-mode|4|Fan|3
matter-1-1-513-mode|4|Fan|4
```
The dashboard widget follows them — the first device shows 5 buttons, the second only 4 (no Auto), and clicking a mode writes the correct Matter `SystemMode` to each device:
[matter_ac_supported_options_demo.mp4](https://cursor.com/agents/bc-6057d516-266d-490e-8877-6dc49a82fb55/artifacts?path=%2Fopt%2Fcursor%2Fartifacts%2Fmatter_ac_supported_options_demo.mp4)
```
[VIRTUAL-AC] systemMode changed to 1 (Auto)
[VIRTUAL-AC] systemMode changed to 8 (Dry)
[VIRTUAL-AC-NOAUTO] systemMode changed to 3 (Cool)
[VIRTUAL-AC-NOAUTO] systemMode changed to 7 (FanOnly)
```
[Paired Matter AC device card with Mode feature](https://cursor.com/agents/bc-6057d516-266d-490e-8877-6dc49a82fb55/artifacts?path=%2Fopt%2Fcursor%2Fartifacts%2Fmatter_device_card_with_mode_feature.webp)
<sub>To show artifacts inline, <a href="https://cursor.com/dashboard/cloud-agents#my-pull-requests">enable</a> in settings.</sub>
<div><a href="https://cursor.com/agents/bc-6057d516-266d-490e-8877-6dc49a82fb55"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-6057d516-266d-490e-8877-6dc49a82fb55"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>
## Summary by CodeRabbit
* **New Features**
* Added Matter thermostat HVAC operating mode control (Auto/Cooling/Heating/Drying/Fan) with mode availability derived from the device’s supported options and kept in sync.
* Unified AC mode selection so all mode buttons update through the same flow.
* **Documentation**
* Updated Matter thermostat documentation to describe HVAC system modes.
* **Bug Fixes**
* Improved supported-option saving by stripping database metadata from option objects.
* Skip unknown/unmapped thermostat system modes and ignore unsupported app mode values to prevent incorrect updates.
* **Localization**
* Added/extended English, French, and German labels for the new drying and fan modes.
Merci @pierre-gilles
Je voulais tester avec le plugin daikin fait par la factory mais je rencontre un problème depuis la mise à jour 3.10.0 de matterbridge
Je voulais que l’IA repasse dessus mais visiblement il y a un truc de cassé car l’IA n’est pas passé sur le plugin
ouvert 04:03PM - 08 May 26 UTC
ready-for-testing
### Device/Service Name
Daikin_Onecta
### Existing Integrations & Documentatio… n
HomeBridge plugin : https://www.npmjs.com/package/@mp-consulting/homebridge-daikin-cloud (recent update)
Github project that controls this device : https://github.com/Apollon77/daikin-controller-cloud (last update 1 year)
### Device Capabilities
On/Off control
Change thermostat (temperature)
Air Conditioning Mode (Heating, Cooling or Auto)
### Additional Context
Authentication on Homebridge is presented as follows, step by step; therefore, the same process should be replicated with the callback URL:
<img width="775" height="627" alt="Image" src="https://github.com/user-attachments/assets/cab99f57-75fe-4467-8d0a-09f4c765a21e" />
<img width="791" height="762" alt="Image" src="https://github.com/user-attachments/assets/cf000d2d-49f2-4be2-9787-82e18eab16cc" />
<img width="679" height="924" alt="Image" src="https://github.com/user-attachments/assets/03f1dc27-92ff-45da-a34b-d13f84b6c87d" />
<img width="1041" height="677" alt="Image" src="https://github.com/user-attachments/assets/61ee8c27-2c94-446c-b9f6-871fb8e845e8" />
<img width="758" height="677" alt="Image" src="https://github.com/user-attachments/assets/d04ea8d5-6b7e-4bf8-b710-6ac0e76fa7a6" />
<img width="761" height="369" alt="Image" src="https://github.com/user-attachments/assets/e0d4f6d9-150f-4e6d-9d40-5425b14b78c8" />
### Confirmations
- [x] I have provided links to existing integrations in other projects
- [x] I have verified the API documentation is accessible
- [x] I understand this is an automated AI process and results may vary
- [x] I am willing to test the generated plugin and provide feedback
Merci