Skip to content

Commit

Permalink
docs(z2m): add information about MQTT plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviml committed Jun 6, 2020
1 parent 9e5b9d9 commit 509491e
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion docs/others/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Integrations is a way to abstract the logic from the event extraction in Control

- **`state`** : Listens for the state of a sensor and the action is fired with the changed event. It does not have any additional arguments.
- **`z2m`** : This integration is for zigbee2mqtt. This integration allows 2 modes of controller pairing: `ha` or `mqtt`. With `ha` you will need to specify the sensor entity from Home Assistant, like the following:

```yaml
example_app:
module: controllerx
Expand All @@ -17,7 +18,9 @@ example_app:
type: ha
light: light.example_light
```

Note that this is the same as:

```yaml
example_app:
module: controllerx
Expand All @@ -26,7 +29,9 @@ example_app:
integration: z2m
light: light.example_light
```

because `state` takes by default `ha`. Then, if you want to use the MQTT integration, then you will need to specify the **friendly name** of the device from Zigbee2MQTT on the `controller` attribute:

```yaml
example_app:
module: controllerx
Expand All @@ -37,7 +42,21 @@ example_app:
state: mqtt
light: light.example_light
```
This example shows the default friendly name of the device, but user might change it. ControllerX listens for `zigbee2mqtt/<controller>/action` topic.

This example shows the default friendly name of the device, but user might change it. ControllerX listens for `zigbee2mqtt/<controller>/action` topic. Last but not least, MQTT needs to be configured on `appdaemon.yaml` by adding the `MQTT` plugin, apart from the `HASS` plugin:

```yaml
plugins:
HASS:
type: hass
MQTT:
type: mqtt
namespace: mqtt
client_host: <Host without indicating the port (e.g. 192.168.1.10)>
client_user: XXXXX
client_password: XXXXX
```

- **`deconz`** : It listens to events and actions gets fired by default with the `event` attribute from the `data` object. However, you can change the attribute to listen to by adding a `type` attribute. This is an example

```yaml
Expand Down

0 comments on commit 509491e

Please sign in to comment.