# HomeKit + Aqara Bouton + Node-Red : Créer un nœud déclencher par un bouton?

**URL:** <https://forum.hacf.fr/t/homekit-aqara-bouton-node-red-creer-un-noeud-declencher-par-un-bouton/24193>\
**Category:** Contenus Externes\
**Tags:** node-red, aqara\
**Created:** [Mai 24, 2023, 1:28 UTC](https://forum.hacf.fr/t/homekit-aqara-bouton-node-red-creer-un-noeud-declencher-par-un-bouton/24193 "2023-05-24T13:28:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LuffyyffuL](https://forum.hacf.fr/user_avatar/forum.hacf.fr/luffyyfful/32/30693_2.png) [@LuffyyffuL](https://forum.hacf.fr/u/LuffyyffuL)\
**Post date:** [Mai 24, 2023, 1:28 UTC](https://forum.hacf.fr/t/homekit-aqara-bouton-node-red-creer-un-noeud-declencher-par-un-bouton/24193/1 "2023-05-24T13:28:38Z")

</div>

## Mon problème

Bonjour,

Mon installation est la suivante :

- Home Assistant
- Intégration de mon Hub Aqara M2 qui contient mon bouton aqara dans HomeKit
- Node-RED que j’utilise pour créer mes scénarios

Mon souhait :

- Créer un Node dans Node-RED qui sera déclenché pour mon bouton aqara

Ce qui fonctionne :

- Avant mon bouton était déclaré sur ma clé Conbee II et j’utilisais le Node deCONZ afin de déclencher mon scénario. A présent je souhaite utiliser que le Hub Aqara M2

- Avec HomeKit, une automation HA fonctionne bien, comme ceci :

```auto
platform: device
device_id: 614436c57b6f0c8c
domain: homekit_controller
type: button1
subtype: single_press

```

Mais impossible de configurer un Node «&nbsp;events:state&nbsp;» ou «&nbsp;device&nbsp;» afin qu’il soit déclenché par mon bouton 😕

Si quelqu’un a déjà rencontré le souci et/ou a une idée, je suis preneur 🙂

Par avance merci

## Ma configuration

* * *

## System Information

| version | core-2023.5.4 |
| --- | --- |
| installation\_type | Home Assistant OS |
| dev | false |
| hassio | true |
| docker | true |
| user | root |
| virtualenv | false |
| python\_version | 3.10.11 |
| os\_name | Linux |
| os\_version | 6.1.25 |
| arch | x86\_64 |
| timezone | Europe/Paris |
| config\_dir | /config |

> **Home Assistant Community Store**
>
> | GitHub API | ok |
> | --- | --- |
> | GitHub Content | ok |
> | GitHub Web | ok |
> | GitHub API Calls Remaining | 5000 |
> | Installed Version | 1.32.1 |
> | Stage | running |
> | Available Repositories | 1283 |
> | Downloaded Repositories | 2 |

> **Home Assistant Cloud**
>
> | logged\_in | false |
> | --- | --- |
> | can\_reach\_cert\_server | ok |
> | can\_reach\_cloud\_auth | ok |
> | can\_reach\_cloud | ok |

> **Home Assistant Supervisor**
>
> | host\_os | Home Assistant OS 10.1 |
> | --- | --- |
> | update\_channel | stable |
> | supervisor\_version | supervisor-2023.04.1 |
> | agent\_version | 1.5.1 |
> | docker\_version | 23.0.3 |
> | disk\_total | 30.8 GB |
> | disk\_used | 6.9 GB |
> | healthy | true |
> | supported | true |
> | board | ova |
> | supervisor\_api | ok |
> | version\_api | ok |
> | installed\_addons | deCONZ (6.19.0), Studio Code Server (5.6.0), Advanced SSH & Web Terminal (15.0.1), Node-RED (14.2.0), Mosquitto broker (6.2.1), Matter Server (4.5.0) |

> **Dashboards**
>
> | dashboards | 1 |
> | --- | --- |
> | resources | 0 |
> | views | 1 |
> | mode | storage |

> **Recorder**
>
> | oldest\_recorder\_run | 14 mai 2023 à 08:02 |
> | --- | --- |
> | current\_recorder\_run | 24 mai 2023 à 14:02 |
> | estimated\_db\_size | 186.87 MiB |
> | database\_engine | sqlite |
> | database\_version | 3.40.1 |

\_\_\_

---

<div class="post-metadata">

**Author:** ![LuffyyffuL](https://forum.hacf.fr/user_avatar/forum.hacf.fr/luffyyfful/32/30693_2.png) [@LuffyyffuL](https://forum.hacf.fr/u/LuffyyffuL)\
**Post date:** [Mai 27, 2023, 8:16 UTC](https://forum.hacf.fr/t/homekit-aqara-bouton-node-red-creer-un-noeud-declencher-par-un-bouton/24193/2 "2023-05-27T20:16:07Z")

</div>

Bonjour,

J’ai trouvé ma réponse, il fallait installer " Node-RED Companion" en plus.

Pour débuguer mon problème, j’ai suivi cette doc :

> **[Device Trigger for Aqara wireless mini switch ·...](https://github.com/zachowj/node-red-contrib-home-assistant-websocket/discussions/472)**
>
> I've an Aqara wireless mini switch discovered and configured in Home Assistant and using HA automation like this example to execute actions. - id: '1632216955711' alias: Demo Button trigger: - plat...

+

> **[GitHub - zachowj/hass-node-red: Companion Component for...](https://github.com/zachowj/hass-node-red#installation)**
>
> Companion Component for node-red-contrib-home-assistant-websocket to help integrate Node-RED with Home Assistant Core - GitHub - zachowj/hass-node-red: Companion Component for node-red-contrib-home...

Si ça peut servir à quelqu’un un jour 🙂
