Apern
Août 9, 2026, 3:22
1
Bonjour,
Afin d’éviter le déclenchement multiple des actions configurées lors de la désactivation d’une alarme, je suggère de modifier alarm.class.php de la manière suivante :
701 + if ($cmd_armed->execCmd() == 0) {
702 + log::add('alarm', 'debug',$eqLogic->getHumanName(). __(' Alarme déjà désactivée', __FILE__));
703 + return;
704 + }
Je me suis simplement inspiré de la logique similaire déjà utilisée lors de l’activation d’une alarme :
if ($cmd_armed->execCmd() == 1) {
log::add('alarm', 'debug',$eqLogic->getHumanName(). __(' Alarme déjà active', __FILE__));
return;
}
Ce changement a été effectué sur la dernière version beta disponible (le repo n’étant pas ouvert). Si vous ouvrez le repo je peux faire le PR sans problème.
Cordialement,
Alexis
Apern
Août 23, 2026, 6:04
2
@Loic désolé de te déranger mais penses-tu qu’il serait possible d’ouvrir le repo pour que je puisse faire le PR ? Merci <3
Aurel
Août 23, 2026, 6:09
3
Salut,
A ma connaissance c’est un plugin payant ou inclus dans un service pack.
Du coup le principe c’est que la repo n’est pas ouvert
Loic
Août 23, 2026, 6:11
4
Salut
Le repo est ouvert depuis des mois voir année GitHub - jeedom/plugin-ajaxSystem · GitHub
Aurel
Août 23, 2026, 6:12
5
1 « J'aime »
Apern
Août 23, 2026, 6:29
6
Dans ce cas @Loic (ou un autre dev) si tu peux faire la modif directement ça serait top
Mips
Août 23, 2026, 7:05
7
Bonjour,
Franchement je comprends pas le problème… j’utilise le plugin et je n’ai jamais été impacté par des exécutions multiples.
Donc avant de proposer une solution, faudrait expliquer pourquoi et comment reproduire
Loic
Août 23, 2026, 7:25
8
À pardon c’est bon il est ouvert mais je suis pas d’accord avec la correction c’est justement fait exprès que lors d’une désactivation même si l’alarme est déjà inactive que ça rejoue les action de désactivation (dans le cas où par exemple y’a eu un soucis et la 1er désactivation n’a pas coupé la sirène). Ça évite de devoir réactiver puis désactiver.
Il faudrait plus comprendre pourquoi chez toi tu as des multiples désactivation.
Apern
Août 23, 2026, 11:15
9
Bonsoir,
Merci pour l’ouverture du repo et pour ta réponse. Je propose de continuer la discussion sur la PR
beta ← alexismdr:beta
ouvert 11:13PM - 23 Aug 26 UTC
## Changes
```php
701 + if ($cmd_armed->execCmd() == 0) { …
702 + log::add('alarm', 'debug',$eqLogic->getHumanName(). __(' Alarme déjà désactivée', __FILE__));
703 + return;
704 + }
```
## Description
Previously, when a user triggered the action to deactivate an alarm multiple times, the plugin would execute the actions associated with deactivation multiple times. As [Loic](https://community.jeedom.com/t/declenchements-multiples-daction-de-desactivation/150312/8) mentioned, this can be useful when a deactivation action has failed. However, in my case, this results in multiple deactivation text messages being sent, which is counterintuitive and can lead to unnecessary text message charges:
<img width="200" alt="Screenshot 2026-08-24 at 00 54 08" src="https://github.com/user-attachments/assets/1f6dd431-6bc8-488f-adde-7118e024fb3f" />
These multiple deactivation attempts can often occur because of services like Gemini or Siri, which sometimes trigger multiple API calls when the initial ones fail to respond for unknown reasons, or when multiple users try to turn off the alarm using different methods at the same time.
I understand that this could be fixed at the source in the Google Smart Home or HomeKit plugins, but from my perspective, **being able to disable an alarm that’s already disabled is counterintuitive**. In the case of the example [Loic](https://community.jeedom.com/t/declenchements-multiples-daction-de-desactivation/150312/8) mentioned—a siren that doesn’t turn off properly—I believe it’s up to the script that turns off the siren to ensure it shuts down correctly. **A perfect system shouldn’t require the user to take multiple actions when a problem arises; instead, it should ECC and fix the issues on its own.**
In addition, the plugin already behaves this way when it comes to activation:
```php
if ($cmd_armed->execCmd() == 1) {
log::add('alarm', 'debug',$eqLogic->getHumanName(). __(' Alarme déjà active', __FILE_₎);
return;
}
```
In fact, it is impossible to activate an alarm that is already active. However, [Loic](https://community.jeedom.com/t/declenchements-multiples-daction-de-desactivation/150312/8)'s example could also be applied here to activation: for example, if a door closes automatically when the alarm is activated and it did not close properly.
**We should standardize how these issues are handled in the plugin. Either we prevent the state from changing when it is already active, or we allow it—but right now, the behavior is inconsistent.**
### Suggested changelog entry
> It is now impossible to disable a security alarm that has already been disabled.
> Therefore, disable actions can now only be triggered once.
### Related issues/external references
Related thread on the Jeedom community forum : https://community.jeedom.com/t/declenchements-multiples-daction-de-desactivation/150312
## Types of changes
- [ ] Bug fix _(non-breaking change which fixes)_
- [ ] New feature _(non-breaking change which adds functionality)_
- [x] Breaking change _(fix or feature that would cause existing functionality to change)_
- [ ] This change is only breaking for integrators, not for external standards or end-users.
- [ ] Documentation improvement
## PR checklist
- [x] I have checked there is no other PR open for the same change.
- [x] I have read the [[La ligne directrice pour contribuer à ce projet / Contribution guidelines for this project](.github/CONTRIBUTING.md)).
- [x] I grant the project the right to include and distribute the code under the GNU.
- [x] I have added tests to cover my changes.
- [x] I have verified that the code complies with the projects coding standards.
- [x] [Required for new sniffs] I have added MD documentation for the sniff.
system
A fermé ce sujet ()
Août 24, 2026, 11:15
10
Ce sujet a été automatiquement fermé après 24 heures suivant le dernier commentaire. Aucune réponse n’est permise dorénavant.