diff --git a/docs/scenes/send-a-zigbee2mqtt-message.md b/docs/scenes/send-a-zigbee2mqtt-message.md new file mode 100644 index 00000000..e2b13803 --- /dev/null +++ b/docs/scenes/send-a-zigbee2mqtt-message.md @@ -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 🥳 diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/scenes/send-a-zigbee2mqtt-message.md b/i18n/fr/docusaurus-plugin-content-docs/current/scenes/send-a-zigbee2mqtt-message.md new file mode 100644 index 00000000..0bba697e --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/current/scenes/send-a-zigbee2mqtt-message.md @@ -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 🥳 diff --git a/sidebars.js b/sidebars.js index f0d8c966..ae3623b2 100644 --- a/sidebars.js +++ b/sidebars.js @@ -62,6 +62,7 @@ module.exports = { "scenes/wait-action", "scenes/continue-only-if-action", "scenes/send-a-message-action", + "scenes/send-a-zigbee2mqtt-message-action", "scenes/turn-on-off-the-lights-action", "scenes/http-request", "scenes/user-presence", diff --git a/static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/device-message.png b/static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/device-message.png new file mode 100644 index 00000000..4cc89698 Binary files /dev/null and b/static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/device-message.png differ diff --git a/static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/device-topic.png b/static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/device-topic.png new file mode 100644 index 00000000..7ac3ea46 Binary files /dev/null and b/static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/device-topic.png differ diff --git a/static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/get-device-value.png b/static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/get-device-value.png new file mode 100644 index 00000000..b5e0b238 Binary files /dev/null and b/static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/get-device-value.png differ diff --git a/static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/send-a-zigbee2mqtt-message-with-injected-variable.png b/static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/send-a-zigbee2mqtt-message-with-injected-variable.png new file mode 100644 index 00000000..3ca78cb9 Binary files /dev/null and b/static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/send-a-zigbee2mqtt-message-with-injected-variable.png differ diff --git a/static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/send-a-zigbee2mqtt-message.png b/static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/send-a-zigbee2mqtt-message.png new file mode 100644 index 00000000..861df4c6 Binary files /dev/null and b/static/img/docs/en/scenes/send-a-zigbee2mqtt-message-action/send-a-zigbee2mqtt-message.png differ diff --git a/static/img/docs/fr/scenes/send-a-zigbee2mqtt-message-action/device-message.png b/static/img/docs/fr/scenes/send-a-zigbee2mqtt-message-action/device-message.png new file mode 100644 index 00000000..4cc89698 Binary files /dev/null and b/static/img/docs/fr/scenes/send-a-zigbee2mqtt-message-action/device-message.png differ diff --git a/static/img/docs/fr/scenes/send-a-zigbee2mqtt-message-action/device-topic.png b/static/img/docs/fr/scenes/send-a-zigbee2mqtt-message-action/device-topic.png new file mode 100644 index 00000000..7ac3ea46 Binary files /dev/null and b/static/img/docs/fr/scenes/send-a-zigbee2mqtt-message-action/device-topic.png differ diff --git a/static/img/docs/fr/scenes/send-a-zigbee2mqtt-message-action/get-device-value.png b/static/img/docs/fr/scenes/send-a-zigbee2mqtt-message-action/get-device-value.png new file mode 100644 index 00000000..b5e0b238 Binary files /dev/null and b/static/img/docs/fr/scenes/send-a-zigbee2mqtt-message-action/get-device-value.png differ diff --git a/static/img/docs/fr/scenes/send-a-zigbee2mqtt-message-action/send-a-zigbee2mqtt-message-with-injected-variable.png b/static/img/docs/fr/scenes/send-a-zigbee2mqtt-message-action/send-a-zigbee2mqtt-message-with-injected-variable.png new file mode 100644 index 00000000..3ca78cb9 Binary files /dev/null and b/static/img/docs/fr/scenes/send-a-zigbee2mqtt-message-action/send-a-zigbee2mqtt-message-with-injected-variable.png differ diff --git a/static/img/docs/fr/scenes/send-a-zigbee2mqtt-message-action/send-a-zigbee2mqtt-message.png b/static/img/docs/fr/scenes/send-a-zigbee2mqtt-message-action/send-a-zigbee2mqtt-message.png new file mode 100644 index 00000000..861df4c6 Binary files /dev/null and b/static/img/docs/fr/scenes/send-a-zigbee2mqtt-message-action/send-a-zigbee2mqtt-message.png differ