-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation: Add new action "send a zigbee2mqtt message" (#273)
- Loading branch information
1 parent
943a232
commit d8ea4d5
Showing
13 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
id: send-a-zigbee2mqtt-message-action | ||
title: Send a Zigbee2Mqtt message | ||
sidebar_label: Send a Zigbee2Mqtt message | ||
--- | ||
|
||
In scenes, it is sometimes useful to send an order to control zigbee2mqtt devices that are not managed by Gladys Assistant. | ||
|
||
## Send a Zigbee2Mqtt message in a scene | ||
|
||
To send a Zigbee2Mqtt message, it's very simple, create a "send a Zigbee2Mqtt message" action in a scene. | ||
|
||
![Send Zigbee2Mqtt message](../../static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/send-a-zigbee2mqtt-message.png) | ||
|
||
## Concrete example: Trigger a siren [Woox R7051](https://www.zigbee2mqtt.io/devices/R7051.html) from a Gladys Assistant scene | ||
|
||
### In Gladys, create a scene | ||
|
||
Create a new scene in Gladys, then add an "send a Zigbee2Mqtt message" action to it. | ||
|
||
Specify the topic of your device. | ||
|
||
![Device topic](../../static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/device-topic.png) | ||
|
||
Specify the command to control your device. You can find your device's information on the [Zigbee2mqtt](https://www.zigbee2mqtt.io/devices/R7051.html#warning-composite) website. | ||
|
||
![Device message](../../static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/device-message.png) | ||
|
||
Save the scene and launch it. | ||
|
||
## Inject a variable into a message | ||
|
||
You want to inject the duration value into the message, in order to know the current duration value. | ||
|
||
To do this, you must add a "retrieve the last state" action to your scene and select the device you want to request. | ||
|
||
![Get device value](../../static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/get-device-value.png) | ||
|
||
Then, further in the scene, you can add a "send a Zigbee2Mqtt message" action, and in the message you type `{{` and select the previously defined variable. | ||
|
||
![Send message with injected variable](../../static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/send-a-zigbee2mqtt-message-with-injected-variable.png) | ||
|
||
When the scene runs, you should get the value in your message 🥳 |
43 changes: 43 additions & 0 deletions
43
.../fr/docusaurus-plugin-content-docs/current/scenes/send-a-zigbee2mqtt-message.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
id: send-a-zigbee2mqtt-message-action | ||
title: Envoyer un message Zigbee2Mqtt | ||
sidebar_label: Envoyer un message Zigbee2Mqtt | ||
--- | ||
|
||
Dans les scènes, il est parfois utile d'envoyer une commande pour contrôler des appareils Zigbee2Mqtt qui ne sont pas gérés par Gladys Assistant. | ||
|
||
## Envoyer un message Zigbee2Mqtt dans une scène | ||
|
||
Pour envoyer un message Zigbee2Mqtt, c'est très simple : créez une action "envoyer un message Zigbee2Mqtt" dans une scène. | ||
|
||
![Envoyer un message Zigbee2Mqtt](../../../../../static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/send-a-zigbee2mqtt-message.png) | ||
|
||
## Exemple concret : Déclencher une sirène [Woox R7051](https://www.zigbee2mqtt.io/devices/R7051.html) depuis une scène Gladys Assistant | ||
|
||
### Dans Gladys, créer une scène | ||
|
||
Créez une nouvelle scène dans Gladys, puis ajoutez une action "envoyer un message Zigbee2Mqtt". | ||
|
||
Spécifiez le topic de votre appareil. | ||
|
||
![Topic de l'appareil](../../../../../static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/device-topic.png) | ||
|
||
Spécifiez la commande pour contrôler votre appareil. Vous pouvez trouver les informations de votre appareil sur le site [Zigbee2mqtt](https://www.zigbee2mqtt.io/devices/R7051.html#warning-composite). | ||
|
||
![Message de l'appareil](../../../../../static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/device-message.png) | ||
|
||
Enregistrez la scène et lancez-la. | ||
|
||
## Injecter une variable dans un message | ||
|
||
Vous voulez injecter la valeur de durée actuelle dans le message, afin de savoir la valeur de durée actuelle. | ||
|
||
Pour cela, vous devez dans votre scène ajouter une action "Récupérer le dernier état" puis vous sélectionnez l'appareil que vous voulez requêter. | ||
|
||
![Récupérer valeur capteur](../../../../../static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/get-device-value.png) | ||
|
||
Ensuite, plus loin dans la scène, vous pouvez ajouter une action "Envoyer un message" et dans le message vous tapez `{{ ` puis vous sélectionnez la variable précédemment définie. | ||
|
||
![Envoyer un message avec variable injectée](../../../../../static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/send-a-zigbee2mqtt-message-with-injected-variable.png) | ||
|
||
Lorsque la scène est lancée, vous devriez obtenir la valeur dans votre message 🥳 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+13.8 KB
static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/device-message.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.03 KB
static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/device-topic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+20.8 KB
static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/get-device-value.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28 KB
...igbee2mqtt-message-action/send-a-zigbee2mqtt-message-with-injected-variable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.4 KB
...docs/en/scenes/send-a-zigbee2mqtt-message-action/send-a-zigbee2mqtt-message.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13.8 KB
static/img/docs/fr/scenes/send-a-zigbee2mqtt-message-action/device-message.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.03 KB
static/img/docs/fr/scenes/send-a-zigbee2mqtt-message-action/device-topic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+20.8 KB
static/img/docs/fr/scenes/send-a-zigbee2mqtt-message-action/get-device-value.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28 KB
...igbee2mqtt-message-action/send-a-zigbee2mqtt-message-with-injected-variable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.4 KB
...docs/fr/scenes/send-a-zigbee2mqtt-message-action/send-a-zigbee2mqtt-message.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.