From 8688e09bce78b203d3e9ede59b99706653c924f3 Mon Sep 17 00:00:00 2001 From: Jenkins Date: Thu, 7 Nov 2024 00:04:16 +0000 Subject: [PATCH 01/12] [Jenkins] Updated translation --- docs/de_DE/changelog.md | 2 ++ docs/en_US/changelog.md | 2 ++ docs/es_ES/changelog.md | 2 ++ docs/i18n/de_DE.json | 1 + docs/i18n/en_US.json | 1 + docs/i18n/es_ES.json | 1 + docs/i18n/fr_FR.json | 1 + docs/i18n/pt_PT.json | 1 + docs/pt_PT/changelog.md | 2 ++ 9 files changed, 13 insertions(+) diff --git a/docs/de_DE/changelog.md b/docs/de_DE/changelog.md index 4e67bde..679debf 100644 --- a/docs/de_DE/changelog.md +++ b/docs/de_DE/changelog.md @@ -4,6 +4,8 @@ > >Zur Erinnerung: Wenn keine Informationen zum Update vorhanden sind, bedeutet dies, dass es sich nur um die Aktualisierung von Dokumentation, Übersetzung oder Text handelt +# 11.06.2024 + - Ein Problem mit PHP8 wurde behoben # 23.09.2024 diff --git a/docs/en_US/changelog.md b/docs/en_US/changelog.md index 0f23685..6af9213 100644 --- a/docs/en_US/changelog.md +++ b/docs/en_US/changelog.md @@ -4,6 +4,8 @@ > >As a reminder if there is no information on the update, it means that it only concerns the updating of documentation, translation or text +# 06/11/2024 + - Fixed an issue with PHP8 # 09/23/2024 diff --git a/docs/es_ES/changelog.md b/docs/es_ES/changelog.md index 9d08782..035b22d 100644 --- a/docs/es_ES/changelog.md +++ b/docs/es_ES/changelog.md @@ -4,6 +4,8 @@ > >Como recordatorio si no hay información sobre la actualización, significa que solo se refiere a la actualización de documentación, traducción o texto +# 11/06/2024 + - Se solucionó un problema con PHP8 # 23/09/2024 diff --git a/docs/i18n/de_DE.json b/docs/i18n/de_DE.json index fb58a95..779aa08 100644 --- a/docs/i18n/de_DE.json +++ b/docs/i18n/de_DE.json @@ -2,6 +2,7 @@ "changelog.md": { "Changelog Alexa": "Changelog Alexa", "Pour rappel s'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte": "Zur Erinnerung: Wenn keine Informationen zum Update vorhanden sind, bedeutet dies, dass es sich nur um die Aktualisierung von Dokumentation, Übersetzung oder Text handelt", + "06\/11\/2024": "11.06.2024", "Correction d'un soucis avec PHP8": "Ein Problem mit PHP8 wurde behoben", "23\/09\/2024": "23.09.2024", "Correction d'un bug sur jeedom 4.4": "Ein Fehler in Jeedom 4.4 wurde behoben", diff --git a/docs/i18n/en_US.json b/docs/i18n/en_US.json index 29bc197..0c0a17f 100644 --- a/docs/i18n/en_US.json +++ b/docs/i18n/en_US.json @@ -2,6 +2,7 @@ "changelog.md": { "Changelog Alexa": "Changelog Alexa", "Pour rappel s'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte": "As a reminder if there is no information on the update, it means that it only concerns the updating of documentation, translation or text", + "06\/11\/2024": "06\/11\/2024", "Correction d'un soucis avec PHP8": "Fixed an issue with PHP8", "23\/09\/2024": "09\/23\/2024", "Correction d'un bug sur jeedom 4.4": "Fixed a bug on jeedom 4.4", diff --git a/docs/i18n/es_ES.json b/docs/i18n/es_ES.json index 489690e..b96e88d 100644 --- a/docs/i18n/es_ES.json +++ b/docs/i18n/es_ES.json @@ -2,6 +2,7 @@ "changelog.md": { "Changelog Alexa": "Registro de cambios Alexa", "Pour rappel s'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte": "Como recordatorio si no hay información sobre la actualización, significa que solo se refiere a la actualización de documentación, traducción o texto", + "06\/11\/2024": "11\/06\/2024", "Correction d'un soucis avec PHP8": "Se solucionó un problema con PHP8", "23\/09\/2024": "23\/09\/2024", "Correction d'un bug sur jeedom 4.4": "Se corrigió un error en Jeedom 4.4", diff --git a/docs/i18n/fr_FR.json b/docs/i18n/fr_FR.json index 95daa74..397fe20 100644 --- a/docs/i18n/fr_FR.json +++ b/docs/i18n/fr_FR.json @@ -3,6 +3,7 @@ "Changelog Alexa": "Changelog Alexa", "IMPORTANT": "IMPORTANT", "Pour rappel s'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte": "Pour rappel s'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte", + "06\/11\/2024": "06\/11\/2024", "Correction d'un soucis avec PHP8": "Correction d'un soucis avec PHP8", "23\/09\/2024": "23\/09\/2024", "Correction d'un bug sur jeedom 4.4": "Correction d'un bug sur jeedom 4.4", diff --git a/docs/i18n/pt_PT.json b/docs/i18n/pt_PT.json index d971db8..213b558 100644 --- a/docs/i18n/pt_PT.json +++ b/docs/i18n/pt_PT.json @@ -2,6 +2,7 @@ "changelog.md": { "Changelog Alexa": "Changelog Alexa", "Pour rappel s'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte": "Como lembrete, se não houver informações sobre a atualização, isso significa que se trata apenas da atualização da documentação, tradução ou texto", + "06\/11\/2024": "11\/06\/2024", "Correction d'un soucis avec PHP8": "Corrigido um problema com PHP8", "23\/09\/2024": "23\/09\/2024", "Correction d'un bug sur jeedom 4.4": "Corrigido um bug no Jeedom 4.4", diff --git a/docs/pt_PT/changelog.md b/docs/pt_PT/changelog.md index cbf51a4..05b098a 100644 --- a/docs/pt_PT/changelog.md +++ b/docs/pt_PT/changelog.md @@ -4,6 +4,8 @@ > >Como lembrete, se não houver informações sobre a atualização, isso significa que se trata apenas da atualização da documentação, tradução ou texto +# 11/06/2024 + - Corrigido um problema com PHP8 # 23/09/2024 From f7664a949bb84ddfd34cd8fca3816b1204c42749 Mon Sep 17 00:00:00 2001 From: Richard Perez <4702185+ripleyXLR8@users.noreply.github.com> Date: Mon, 16 Mar 2026 02:19:24 +0100 Subject: [PATCH 02/12] =?UTF-8?q?Fix=20:=20Inversion=20des=20actions=20(Se?= =?UTF-8?q?t)=20inop=C3=A9rante=20sur=20les=20RangeController=20(Volets)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bonjour, Cette PR corrige un bug empêchant l'inversion d'action de fonctionner correctement pour les équipements de type volets/stores utilisant l'interface `Alexa.RangeController`. **Problème rencontré :** Lorsqu'un utilisateur cochait la case "Inverser l'action" dans la configuration avancée du plugin Ash pour un volet, l'inversion de la valeur envoyée par Alexa n'était pas appliquée, ce qui entraînait un comportement inversé (les commandes vocales "Ouvre" et "Ferme" s'exécutaient à l'envers). **Analyse :** Dans la méthode `exec()` de la classe `ash_RangeController`, lors de la réception d'une directive `SetRangeValue` : 1. Le code vérifiait l'option avec la mauvaise clé : `OpenClose::invertSet` au lieu de `RangeController::invertSet` (qui est celle définie dans le frontend via `getHtmlConfiguration`). 2. Le calcul d'inversion était appliqué à une variable `$execution` inexistante dans le scope de la fonction, au lieu de modifier directement le payload de la directive `$_directive`. **Correction apportée :** Modification des lignes 162 à 168 pour cibler la bonne option de configuration et appliquer le calcul sur la bonne variable : ```php if($_device->getOptions('RangeController::invertSet',0) == 1){ $_directive['payload']['rangeValue'] = 100 - $_directive['payload']['rangeValue']; } Testé et validé sur une installation locale avec des volets Velux. Merci pour le travail sur ce plugin ! --- core/class/ash_RangeController.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/class/ash_RangeController.class.php b/core/class/ash_RangeController.class.php index be929ce..74a57d7 100644 --- a/core/class/ash_RangeController.class.php +++ b/core/class/ash_RangeController.class.php @@ -159,8 +159,8 @@ public static function exec($_device, $_directive) { $cmd->execCmd(array('slider' => $cmdState->execCmd() + $value)); } case 'SetRangeValue': - if($_device->getOptions('OpenClose::invertSet',0) == 1){ - $execution['payload']['rangeValue'] = 100 - $execution['payload']['rangeValue']; + if($_device->getOptions('RangeController::invertSet',0) == 1){ + $_directive['payload']['rangeValue'] = 100 - $_directive['payload']['rangeValue']; } if (isset($_directive['endpoint']['cookie']['RangeController_setSlider'])) { $cmd = cmd::byId($_directive['endpoint']['cookie']['RangeController_setSlider']); From bcc32e273c79c93895a84ab6947e0f1a5fed7e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com> Date: Tue, 17 Mar 2026 11:11:14 +0100 Subject: [PATCH 03/12] Update ash_RangeController.class.php --- core/class/ash_RangeController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/class/ash_RangeController.class.php b/core/class/ash_RangeController.class.php index be929ce..c65386f 100644 --- a/core/class/ash_RangeController.class.php +++ b/core/class/ash_RangeController.class.php @@ -160,7 +160,7 @@ public static function exec($_device, $_directive) { } case 'SetRangeValue': if($_device->getOptions('OpenClose::invertSet',0) == 1){ - $execution['payload']['rangeValue'] = 100 - $execution['payload']['rangeValue']; + $_directive['payload']['rangeValue'] = 100 - $_directive['payload']['rangeValue']; } if (isset($_directive['endpoint']['cookie']['RangeController_setSlider'])) { $cmd = cmd::byId($_directive['endpoint']['cookie']['RangeController_setSlider']); From b12be1c2a05708e183d6783bc78341eb88c37c45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com> Date: Tue, 17 Mar 2026 11:11:51 +0100 Subject: [PATCH 04/12] Update changelog.md --- docs/fr_FR/changelog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/fr_FR/changelog.md b/docs/fr_FR/changelog.md index cab62ee..1005f06 100644 --- a/docs/fr_FR/changelog.md +++ b/docs/fr_FR/changelog.md @@ -4,6 +4,8 @@ > >Pour rappel s'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte +- Correction d'un bug sur l'inversion des volets + # 06/11/2024 - Correction d'un soucis avec PHP8 From 20dd2431556d793fa5198b9b31cd2e26cffebb10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com> Date: Tue, 17 Mar 2026 15:03:23 +0100 Subject: [PATCH 05/12] Update ash_RangeController.class.php --- core/class/ash_RangeController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/class/ash_RangeController.class.php b/core/class/ash_RangeController.class.php index c65386f..74a57d7 100644 --- a/core/class/ash_RangeController.class.php +++ b/core/class/ash_RangeController.class.php @@ -159,7 +159,7 @@ public static function exec($_device, $_directive) { $cmd->execCmd(array('slider' => $cmdState->execCmd() + $value)); } case 'SetRangeValue': - if($_device->getOptions('OpenClose::invertSet',0) == 1){ + if($_device->getOptions('RangeController::invertSet',0) == 1){ $_directive['payload']['rangeValue'] = 100 - $_directive['payload']['rangeValue']; } if (isset($_directive['endpoint']['cookie']['RangeController_setSlider'])) { From 12f5486f7a925a9e7826c1ba9ff8cd0c8f45ee15 Mon Sep 17 00:00:00 2001 From: Jenkins Date: Wed, 18 Mar 2026 00:25:51 +0000 Subject: [PATCH 06/12] [Jenkins] Updated translation --- docs/de_DE/changelog.md | 2 ++ docs/en_US/changelog.md | 2 ++ docs/es_ES/changelog.md | 2 ++ docs/i18n/de_DE.json | 1 + docs/i18n/en_US.json | 1 + docs/i18n/es_ES.json | 1 + docs/i18n/fr_FR.json | 1 + docs/i18n/pt_PT.json | 1 + docs/pt_PT/changelog.md | 2 ++ 9 files changed, 13 insertions(+) diff --git a/docs/de_DE/changelog.md b/docs/de_DE/changelog.md index 679debf..b62acab 100644 --- a/docs/de_DE/changelog.md +++ b/docs/de_DE/changelog.md @@ -4,6 +4,8 @@ > >Zur Erinnerung: Wenn keine Informationen zum Update vorhanden sind, bedeutet dies, dass es sich nur um die Aktualisierung von Dokumentation, Übersetzung oder Text handelt +- + # 11.06.2024 - Ein Problem mit PHP8 wurde behoben diff --git a/docs/en_US/changelog.md b/docs/en_US/changelog.md index 6af9213..d45e831 100644 --- a/docs/en_US/changelog.md +++ b/docs/en_US/changelog.md @@ -4,6 +4,8 @@ > >As a reminder if there is no information on the update, it means that it only concerns the updating of documentation, translation or text +- + # 06/11/2024 - Fixed an issue with PHP8 diff --git a/docs/es_ES/changelog.md b/docs/es_ES/changelog.md index 035b22d..d629bf1 100644 --- a/docs/es_ES/changelog.md +++ b/docs/es_ES/changelog.md @@ -4,6 +4,8 @@ > >Como recordatorio si no hay información sobre la actualización, significa que solo se refiere a la actualización de documentación, traducción o texto +- + # 11/06/2024 - Se solucionó un problema con PHP8 diff --git a/docs/i18n/de_DE.json b/docs/i18n/de_DE.json index 779aa08..26ca032 100644 --- a/docs/i18n/de_DE.json +++ b/docs/i18n/de_DE.json @@ -2,6 +2,7 @@ "changelog.md": { "Changelog Alexa": "Changelog Alexa", "Pour rappel s'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte": "Zur Erinnerung: Wenn keine Informationen zum Update vorhanden sind, bedeutet dies, dass es sich nur um die Aktualisierung von Dokumentation, Übersetzung oder Text handelt", + "Correction d'un bug sur l'inversion des volets": "", "06\/11\/2024": "11.06.2024", "Correction d'un soucis avec PHP8": "Ein Problem mit PHP8 wurde behoben", "23\/09\/2024": "23.09.2024", diff --git a/docs/i18n/en_US.json b/docs/i18n/en_US.json index 0c0a17f..be5f538 100644 --- a/docs/i18n/en_US.json +++ b/docs/i18n/en_US.json @@ -2,6 +2,7 @@ "changelog.md": { "Changelog Alexa": "Changelog Alexa", "Pour rappel s'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte": "As a reminder if there is no information on the update, it means that it only concerns the updating of documentation, translation or text", + "Correction d'un bug sur l'inversion des volets": "", "06\/11\/2024": "06\/11\/2024", "Correction d'un soucis avec PHP8": "Fixed an issue with PHP8", "23\/09\/2024": "09\/23\/2024", diff --git a/docs/i18n/es_ES.json b/docs/i18n/es_ES.json index b96e88d..d11ea03 100644 --- a/docs/i18n/es_ES.json +++ b/docs/i18n/es_ES.json @@ -2,6 +2,7 @@ "changelog.md": { "Changelog Alexa": "Registro de cambios Alexa", "Pour rappel s'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte": "Como recordatorio si no hay información sobre la actualización, significa que solo se refiere a la actualización de documentación, traducción o texto", + "Correction d'un bug sur l'inversion des volets": "", "06\/11\/2024": "11\/06\/2024", "Correction d'un soucis avec PHP8": "Se solucionó un problema con PHP8", "23\/09\/2024": "23\/09\/2024", diff --git a/docs/i18n/fr_FR.json b/docs/i18n/fr_FR.json index 397fe20..65e1f77 100644 --- a/docs/i18n/fr_FR.json +++ b/docs/i18n/fr_FR.json @@ -3,6 +3,7 @@ "Changelog Alexa": "Changelog Alexa", "IMPORTANT": "IMPORTANT", "Pour rappel s'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte": "Pour rappel s'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte", + "Correction d'un bug sur l'inversion des volets": "Correction d'un bug sur l'inversion des volets", "06\/11\/2024": "06\/11\/2024", "Correction d'un soucis avec PHP8": "Correction d'un soucis avec PHP8", "23\/09\/2024": "23\/09\/2024", diff --git a/docs/i18n/pt_PT.json b/docs/i18n/pt_PT.json index 213b558..cd50c9b 100644 --- a/docs/i18n/pt_PT.json +++ b/docs/i18n/pt_PT.json @@ -2,6 +2,7 @@ "changelog.md": { "Changelog Alexa": "Changelog Alexa", "Pour rappel s'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte": "Como lembrete, se não houver informações sobre a atualização, isso significa que se trata apenas da atualização da documentação, tradução ou texto", + "Correction d'un bug sur l'inversion des volets": "", "06\/11\/2024": "11\/06\/2024", "Correction d'un soucis avec PHP8": "Corrigido um problema com PHP8", "23\/09\/2024": "23\/09\/2024", diff --git a/docs/pt_PT/changelog.md b/docs/pt_PT/changelog.md index 05b098a..4b99381 100644 --- a/docs/pt_PT/changelog.md +++ b/docs/pt_PT/changelog.md @@ -4,6 +4,8 @@ > >Como lembrete, se não houver informações sobre a atualização, isso significa que se trata apenas da atualização da documentação, tradução ou texto +- + # 11/06/2024 - Corrigido um problema com PHP8 From 26ed041a45f890823d9aadd2942c75147bc9b9db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com> Date: Mon, 13 Apr 2026 11:53:20 +0200 Subject: [PATCH 07/12] Bugfix translation --- .github/workflows/translations.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/translations.yml diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml new file mode 100644 index 0000000..d214266 --- /dev/null +++ b/.github/workflows/translations.yml @@ -0,0 +1,18 @@ +name: translate + +on: + workflow_dispatch: + push: + branches: + - beta + +jobs: + auto-translate: + runs-on: ubuntu-latest + steps: + - uses: jeedom/jeetranslate@main + with: + deepl_api_key: ${{ secrets.DEEPL_API_KEY }} + include_empty_translation: false + target_languages: "en_US,es_ES,de_DE,it_IT,pt_PT" + use_core_translations: true \ No newline at end of file From e44fcbd5a4557e531ddfd83255a2d72fb3130d92 Mon Sep 17 00:00:00 2001 From: Richard Perez <4702185+ripleyXLR8@users.noreply.github.com> Date: Wed, 15 Apr 2026 11:00:42 +0200 Subject: [PATCH 08/12] Create ash_GarageDoorController.class.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implémentation de la classe ash_GarageDoorController pour permettre le contrôle vocal (ouverture et fermeture) des portes de garage (GARAGE_DOOR) via Alexa. Historiquement, la catégorie GARAGE_DOOR ne remontait qu'une interface ContactSensor (état ouvert/fermé), empêchant toute action vocale sans contournement (comme l'utilisation du type Volet). Cette nouvelle classe respecte les spécifications de l'API Amazon Alexa pour les portes de garage en implémentant l'interface Alexa.ModeController (instance GarageDoor.Position) avec les sémantiques d'action Position.Up (Ouverture) et Position.Down (Fermeture). Détails techniques : Types génériques d'ouverture supportés : GB_OPEN, GARAGE_OPEN Types génériques de fermeture supportés : GB_CLOSE, GARAGE_CLOSE Types génériques d'état supportés : GARAGE_STATE, BARRIER_STATE L'interface de contrôle n'est ajoutée que si les deux commandes d'action (ouverture/fermeture) sont détectées. Prise en charge native de l'inversion binaire (invertBinary) sur la commande d'état. --- core/class/ash_GarageDoorController.class.php | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 core/class/ash_GarageDoorController.class.php diff --git a/core/class/ash_GarageDoorController.class.php b/core/class/ash_GarageDoorController.class.php new file mode 100644 index 0000000..1dbadf3 --- /dev/null +++ b/core/class/ash_GarageDoorController.class.php @@ -0,0 +1,129 @@ + 'AlexaInterface', + 'interface' => 'Alexa.ModeController', + 'instance' => 'GarageDoor.Position', + 'version' => '3', + 'properties' => array ( + 'supported' => array(array('name' => 'mode')), + 'proactivelyReported' => false, + 'retrievable' => false, + ), + 'capabilityResources' => array ( + 'friendlyNames' => array( + array('@type' => 'asset', 'value' => array ('assetId' => 'Alexa.Setting.Opening')) + ), + ), + 'configuration' => array ( + 'ordered' => false, + 'supportedModes' => array ( + array( + 'value' => 'Position.Up', + 'modeResources' => array('friendlyNames' => array(array('@type' => 'asset', 'value' => array('assetId' => 'Alexa.Value.Open')))) + ), + array( + 'value' => 'Position.Down', + 'modeResources' => array('friendlyNames' => array(array('@type' => 'asset', 'value' => array('assetId' => 'Alexa.Value.Close')))) + ) + ) + ), + 'semantics' => array ( + 'actionMappings' => array ( + array ( + '@type' => 'ActionsToDirective', + 'actions' => array ('Alexa.Actions.Open', 'Alexa.Actions.Raise'), + 'directive' => array ('name' => 'SetMode', 'payload' => array ('mode' => 'Position.Up')) + ), + array ( + '@type' => 'ActionsToDirective', + 'actions' => array ('Alexa.Actions.Close', 'Alexa.Actions.Lower'), + 'directive' => array ('name' => 'SetMode', 'payload' => array ('mode' => 'Position.Down')) + ), + ), + 'stateMappings' => array ( + array ('@type' => 'StatesToValue', 'states' => array ('Alexa.States.Open'), 'value' => 'Position.Up'), + array ('@type' => 'StatesToValue', 'states' => array ('Alexa.States.Closed'), 'value' => 'Position.Down'), + ), + ), + ); + + foreach ($_eqLogic->getCmd() as $cmd) { + if (in_array($cmd->getGeneric_type(), self::$_OPEN)) { + $return['cookie']['GarageDoorController_setOpen'] = $cmd->getId(); + } + if (in_array($cmd->getGeneric_type(), self::$_CLOSE)) { + $return['cookie']['GarageDoorController_setClose'] = $cmd->getId(); + } + if (in_array($cmd->getGeneric_type(), self::$_STATE)) { + $return['capabilities']['Alexa.GarageDoorController']['properties']['retrievable'] = true; + $return['cookie']['GarageDoorController_getState'] = $cmd->getId(); + } + } + + if (!isset($return['cookie']['GarageDoorController_setOpen']) || !isset($return['cookie']['GarageDoorController_setClose'])) { + return array(); + } + + return $return; + } + + public static function needGenericType(){ + return array( + __('Ouvrir',__FILE__) => self::$_OPEN, + __('Fermer',__FILE__) => self::$_CLOSE, + __('Etat',__FILE__) => self::$_STATE + ); + } + + public static function exec($_device, $_directive) { + if ($_directive['header']['name'] == 'SetMode') { + $mode = $_directive['payload']['mode']; + if ($mode == 'Position.Up' && isset($_directive['endpoint']['cookie']['GarageDoorController_setOpen'])) { + $cmd = cmd::byId($_directive['endpoint']['cookie']['GarageDoorController_setOpen']); + if (is_object($cmd)) $cmd->execCmd(); + } else if ($mode == 'Position.Down' && isset($_directive['endpoint']['cookie']['GarageDoorController_setClose'])) { + $cmd = cmd::byId($_directive['endpoint']['cookie']['GarageDoorController_setClose']); + if (is_object($cmd)) $cmd->execCmd(); + } + } + return self::getState($_device, $_directive); + } + + public static function getState($_device, $_directive) { + $return = array(); + $cmd = null; + if (isset($_directive['endpoint']['cookie']['GarageDoorController_getState'])) { + $cmd = cmd::byId($_directive['endpoint']['cookie']['GarageDoorController_getState']); + } + if (!is_object($cmd)) return $return; + + $value = $cmd->execCmd(); + if ($cmd->getSubtype() == 'binary' && $cmd->getDisplay('invertBinary') == 1) { + $value = ($value) ? 0 : 1; + } + + $modeValue = ($value) ? 'Position.Up' : 'Position.Down'; + + $return[] = array( + 'namespace' => 'Alexa.ModeController', + 'instance' => 'GarageDoor.Position', + 'name' => 'mode', + 'value' => $modeValue, + 'timeOfSample' => date('Y-m-d\TH:i:s\Z', strtotime($cmd->getValueDate())), + 'uncertaintyInMilliseconds' => 0, + ); + return array('properties' => $return); + } +} From 51b38d70f1dc95bf1b3f5ff7b180ec48c90193bf Mon Sep 17 00:00:00 2001 From: Richard Perez <4702185+ripleyXLR8@users.noreply.github.com> Date: Wed, 15 Apr 2026 11:05:53 +0200 Subject: [PATCH 09/12] =?UTF-8?q?Feat:=20D=C3=A9claration=20de=20la=20comp?= =?UTF-8?q?=C3=A9tence=20GarageDoorController=20pour=20les=20portes=20de?= =?UTF-8?q?=20garage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mise à jour de la classe principale ash pour intégrer la nouvelle gestion des portes de garage. Modifications apportées : Inclusion du nouveau fichier de classe ash_GarageDoorController.class.php. Mise à jour du tableau getSupportedType() : la catégorie GARAGE_DOOR implémente désormais la compétence GarageDoorController en complément du ContactSensor préexistant. Cette modification fait le lien indispensable pour que le plugin génère l'interface Alexa.ModeController (Position.Up/Down) lors de la transmission d'un équipement de type porte de garage à Amazon Alexa. --- core/class/ash.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/class/ash.class.php b/core/class/ash.class.php index 7749eaa..6fac14b 100644 --- a/core/class/ash.class.php +++ b/core/class/ash.class.php @@ -36,6 +36,7 @@ include_file('core', 'ash_PowerLevelController', 'class', 'ash'); include_file('core', 'ash_ToggleController', 'class', 'ash'); include_file('core', 'ash_LockController', 'class', 'ash'); +include_file('core', 'ash_GarageDoorController', 'class', 'ash'); class ash extends eqLogic { @@ -68,7 +69,7 @@ public static function getSupportedType() { 'DOOR' => array('name' => __('Porte', __FILE__), 'skills' => array('ContactSensor', 'LockController')), 'EXTERIOR_BLIND' => array('name' => __('Volet', __FILE__), 'skills' => array('RangeController')), 'FAN' => array('name' => __('Ventilateur', __FILE__), 'skills' => array('PowerController', 'RangeController')), - 'GARAGE_DOOR' => array('name' => __('Porte de garage', __FILE__), 'skills' => array('ContactSensor')), + 'GARAGE_DOOR' => array('name' => __('Porte de garage', __FILE__), 'skills' => array('ContactSensor', 'GarageDoorController')), 'MICROWAVE' => array('name' => __('Micro-onde', __FILE__), 'skills' => array('PowerController')), 'NETWORK_HARDWARE' => array('name' => __('Equipement réseaux', __FILE__), 'skills' => array('PowerController')), 'PRINTER' => array('name' => __('Imprimante', __FILE__), 'skills' => array('PowerController')), From 7fa0842d60aa7fbd9df1959cdad7e1d906af73f6 Mon Sep 17 00:00:00 2001 From: jlayec Date: Mon, 11 May 2026 22:47:20 +0200 Subject: [PATCH 10/12] fix alexa with a new messageId and add 5s delay on some answers --- core/class/ash.class.php | 1 + core/class/ash_PowerController.class.php | 1 + 2 files changed, 2 insertions(+) mode change 100644 => 100755 core/class/ash.class.php mode change 100644 => 100755 core/class/ash_PowerController.class.php diff --git a/core/class/ash.class.php b/core/class/ash.class.php old mode 100644 new mode 100755 index 7749eaa..6fad05b --- a/core/class/ash.class.php +++ b/core/class/ash.class.php @@ -204,6 +204,7 @@ public static function exec($_data) { if (isset($return['event']['endpoint']['cookie'])) { unset($return['event']['endpoint']['cookie']); } + $return['event']['header']['messageId'] = vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex(random_bytes(16)), 4)); return $return; } diff --git a/core/class/ash_PowerController.class.php b/core/class/ash_PowerController.class.php old mode 100644 new mode 100755 index ff1e15b..3b3e3bc --- a/core/class/ash_PowerController.class.php +++ b/core/class/ash_PowerController.class.php @@ -117,6 +117,7 @@ public static function exec($_device, $_directive) { } break; } + usleep(500000); return self::getState($_device, $_directive); } From 27e731cdb9461300808dcb02737dcc51c2f51e3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com> Date: Fri, 24 Jul 2026 10:52:52 +0200 Subject: [PATCH 11/12] Update changelog.md --- docs/fr_FR/changelog.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/fr_FR/changelog.md b/docs/fr_FR/changelog.md index 1005f06..97d6c99 100644 --- a/docs/fr_FR/changelog.md +++ b/docs/fr_FR/changelog.md @@ -4,7 +4,10 @@ > >Pour rappel s'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte +# 24/07/2026 + - Correction d'un bug sur l'inversion des volets +- Correction de bugs # 06/11/2024 From 54432fbce17be6064690c62d0cd8cef6011519b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com> Date: Fri, 24 Jul 2026 10:55:31 +0200 Subject: [PATCH 12/12] Update changelog.md --- docs/fr_FR/changelog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/fr_FR/changelog.md b/docs/fr_FR/changelog.md index 97d6c99..8ef786a 100644 --- a/docs/fr_FR/changelog.md +++ b/docs/fr_FR/changelog.md @@ -8,6 +8,8 @@ - Correction d'un bug sur l'inversion des volets - Correction de bugs +- Ajout porte de garage (merci @ripleyXLR8) + # 06/11/2024