# \[NODE-RED\] zwave-js-ui et volets roulants ZMNHCD1

**URL:** <https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589>\
**Category:** Tutoriels\
**Tags:** zwave, mqtt\
**Created:** [Octobre 11, 2021, 1:40 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589 "2021-10-11T13:40:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Octobre 11, 2021, 1:40 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/1 "2021-10-11T13:40:10Z")

</div>

Ce petit flow vous permet de contrôler vos volets roulant via Gladys / Node red

Le module que j’utilise est un Qubino ZMNHCD1

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/2/25c1dd7ff0d181ce5927e640b08b4c81ee9e8e1a.jpeg)

Dans le service MQTT de Gladys j’ai un device Volet

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/7/7c4c483fae5e3feb56663e128f78ac979273171d.png)

**Avec une feature «&nbsp;Switch Dimmer&nbsp;» configuré comme ceci**

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/0/07cd7c7adad5f9dc80432e394b785bda4d05867f.png)

_Attention la valeur maxi est 99_

* * *

Dans **node red** j’ai créer ce flow qui permet donc de controller la position du volet via Gladys et de mettre à jour l’état s’il y’a eu un contrôle extérieur ( bouton physique ou alexa ).

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/9/916b2578eeb8060536340625a701fe3d950a2a5f.png)

Le flow importable

```json
[
    {
        "id": "06167c4aeed2d29e",
        "type": "tab",
        "label": "Zwavejs",
        "disabled": false,
        "info": ""
    },
    {
        "id": "58e23de9eeb04e5c",
        "type": "mqtt in",
        "z": "06167c4aeed2d29e",
        "name": "Gladys value",
        "topic": "gladys/device/mqtt:volet/feature/mqtt:position/state",
        "qos": "2",
        "datatype": "auto",
        "broker": "05eac840560ca08c",
        "nl": false,
        "rap": true,
        "rh": 0,
        "x": 90,
        "y": 80,
        "wires": [
            [
                "29bb8e1ef43b1a15"
            ]
        ]
    },
    {
        "id": "ec1b1f35710ca026",
        "type": "mqtt out",
        "z": "06167c4aeed2d29e",
        "name": "Set value on zwavejs2mqtt",
        "topic": "zwave/Volet/38/0/targetValue/set",
        "qos": "2",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "07a4b31138749fb7",
        "x": 960,
        "y": 80,
        "wires": []
    },
    {
        "id": "29bb8e1ef43b1a15",
        "type": "json",
        "z": "06167c4aeed2d29e",
        "name": "",
        "property": "payload",
        "action": "",
        "pretty": false,
        "x": 550,
        "y": 80,
        "wires": [
            [
                "ec1b1f35710ca026"
            ]
        ]
    },
    {
        "id": "fc72847db40a7ee1",
        "type": "mqtt in",
        "z": "06167c4aeed2d29e",
        "name": "zwavejs topic currentValue",
        "topic": "zwave/Volet/38/0/currentValue",
        "qos": "2",
        "datatype": "auto",
        "broker": "07a4b31138749fb7",
        "nl": false,
        "rap": true,
        "rh": 0,
        "x": 130,
        "y": 140,
        "wires": [
            [
                "6af9ebb2dab5d51a"
            ]
        ]
    },
    {
        "id": "50f432e72d05f875",
        "type": "mqtt out",
        "z": "06167c4aeed2d29e",
        "name": "Update Gladys value",
        "topic": "gladys/master/device/mqtt:volet/feature/mqtt:position/state",
        "qos": "2",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "05eac840560ca08c",
        "x": 940,
        "y": 140,
        "wires": []
    },
    {
        "id": "e04fcc594d63b332",
        "type": "function",
        "z": "06167c4aeed2d29e",
        "name": "Get only the value",
        "func": "msg.payload = msg.payload.value\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 710,
        "y": 140,
        "wires": [
            [
                "50f432e72d05f875"
            ]
        ]
    },
    {
        "id": "0829660626defc53",
        "type": "json",
        "z": "06167c4aeed2d29e",
        "name": "",
        "property": "payload",
        "action": "",
        "pretty": false,
        "x": 550,
        "y": 140,
        "wires": [
            [
                "e04fcc594d63b332"
            ]
        ]
    },
    {
        "id": "6af9ebb2dab5d51a",
        "type": "trigger",
        "z": "06167c4aeed2d29e",
        "name": "Wait for stable value",
        "op1": "",
        "op2": "",
        "op1type": "pay",
        "op2type": "payl",
        "duration": "30000",
        "extend": true,
        "overrideDelay": false,
        "units": "ms",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 360,
        "y": 140,
        "wires": [
            [
                "0829660626defc53"
            ]
        ]
    },
    {
        "id": "05eac840560ca08c",
        "type": "mqtt-broker",
        "name": "GladysMQTT",
        "broker": "192.168.1.42",
        "port": "1883",
        "clientid": "",
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "sessionExpiry": ""
    },
    {
        "id": "07a4b31138749fb7",
        "type": "mqtt-broker",
        "name": "zwavejs2mqtt",
        "broker": "192.168.1.42",
        "port": "1884",
        "clientid": "",
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "sessionExpiry": ""
    }
]

```

Le résulat dans le dashboard Gladys  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/3/335f773800709fe691a2ac9e21096fe8edf60123.png)

Le topic mqtt côté zwave-js-ui correspond au COM CLASS 38

![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/9/96da9ab780f624cf3dd31253773e6fbf0fe60b80.png)

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Octobre 12, 2021, 2:35 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/2 "2021-10-12T02:35:49Z")

</div>

😱 😍

Merci pour le tutoriel @VonOx, ça va aider du monde !

---

<div class="post-metadata">

**Author:** ![mikael](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/m/f04885/32.png) [@mikael](https://community.gladysassistant.com/u/mikael)\
**Post date:** [Octobre 12, 2021, 5:49 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/3 "2021-10-12T17:49:45Z")

</div>

merci @VonOx ! J’avais en tête de domotiser mes volets filaires. çà va peut etre me faire sauter le pas.

question: tu utilises quoi comme clé zwave? tu as acheté ou tes interrupteurs ?  
Je demande pour comparer le prix avec la gamme schneider connecté zigbee

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Octobre 12, 2021, 6:08 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/4 "2021-10-12T18:08:37Z")

</div>

Salut

La clé je l’ai prise sur amazon Aeotec Z Stick Gen 5  
Le module pour interrupteur chez [domotique store](https://www.domotique-store.fr/domotique/modules-domotiques/micromodules/micromodules-domotiques-sans-fil-volets-roulants/mesure-consommation-energie/477-qubino-flush-shutter-v2-zmnhcd1-micromodule-pour-volet-roulant-z-wave-plus-avec-mesure-de-consommation-remplace-le-zmnhca2.html)

L’interrupteur est un bistable legrand classique, ça permet de garder une possibilité de gérer ses volets si pas de domotique.

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Mai 3, 2022, 12:37 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/5 "2022-05-03T12:37:01Z")

</div>

Salut @VonOx , merci pour ce tuto.

Du coup tu as installé zwavejs2mqtt?  
Tu es passé par un container docker pour l’installer?  
Peux- tu me donner plus de détails STP?  
Car je viens de brancher mon dongle zwave sur Gladys et j’ai plusieurs type de module qubino à contrôler.

Merci d’avance

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Mai 3, 2022, 12:45 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/6 "2022-05-03T12:45:16Z")

</div>

Oui rien de particulier, zwavejs2mqtt dans un conteneur.

La conf se fait dans l’interface

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/d/d976293674df7ef571a1627d78d23e826a02d7f0.png)

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Mai 3, 2022, 12:49 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/7 "2022-05-03T12:49:02Z")

</div>

Ok merci.👍  
Et dans Gladys comme tu passes par zwavejs2mqtt tu n’as pas activé l’intégration zwave?

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Mai 3, 2022, 12:49 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/8 "2022-05-03T12:49:38Z")

</div>

Ah non pas de zwave dans Gladys, MQTT uniquement

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Mai 3, 2022, 12:50 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/9 "2022-05-03T12:50:22Z")

</div>

Ok parfait je teste ça ce soir. Merci.

---

<div class="post-metadata">

**Author:** ![spenceur](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/spenceur/32/1961_2.png) [@spenceur](https://community.gladysassistant.com/u/spenceur)\
**Post date:** [Mai 3, 2022, 5:22 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/10 "2022-05-03T17:22:45Z")

</div>

En vrais on ne pourrait pas refaire le «&nbsp;service&nbsp;» zwave pour quil lance le container plus un mqtt comme z2m?

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Mai 3, 2022, 5:35 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/11 "2022-05-03T17:35:58Z")

</div>

La c’est un remplacement de lib, donc y’aura pas de mqtt. Faudra faire une autre intégration à l’image de Zigbee2mqtt

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Mai 3, 2022, 5:42 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/12 "2022-05-03T17:42:19Z")

</div>

> [@spenceur](#):
>
> En vrais on ne pourrait pas refaire le « service » zwave pour quil lance le container plus un mqtt comme z2m?

On en avait discuté, et contrairement à Zigbee2mqtt, ZwaveJS2Mqtt apporte peu.

Le choix qui a été fait c’est de migrer vers ZwaveJS (la lib) en gardant l’UI dans Gladys, ça reste plus user-friendly et plus pérenne. On l’a vu avec Zigbee2mqtt, faire tourner un container à côté, ça reste un «&nbsp;risque&nbsp;» et on est beaucoup moins en contrôle côté Gladys.

Une grande partie du travail de migration a déjà été fait par @Romuald_Pochet ici =\>

> <https://github.com/GladysAssistant/Gladys/pull/1342>
>
> \### Pull Request check-list
> 
> To ensure your Pull Request can be accepted as fa…st as possible, make sure to review and check all of these items:
> 
> \- \[\] If your changes affects code, did your write the tests?
> \- \[\] Are tests passing? (\`npm test\` on both front/server)
> \- \[x\] Is the linter passing? (\`npm run eslint\` on both front/server)
> \- \[x\] Did you run prettier? (\`npm run prettier\` on both front/server)
> \- \[x\] If you are adding a new features/services, did you run integration comparator? (\`npm run compare-translations\` on front)
> \- \[x\] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to \[the community\](https://community.gladysassistant.com/) for testing before merging.
> \- \[\] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
> \- \[\] If you are adding a new features/services which needs explanation, did you modify the user documentation? See \[the GitHub repo\](https://github.com/GladysAssistant/v4-website) and the \[website\](https://gladysassistant.com).
> \- \[\] Did you add fake requests data for the demo mode (\`front/src/config/demo.js\`) so that the demo website is working without a backend? (if needed) See \[https://demo.gladysassistant.com\](https://demo.gladysassistant.com).
> 
> NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
> 
> \### Description of change
> 
> Replace openzwave by zwavejs library

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Mai 3, 2022, 11:17 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/13 "2022-05-03T23:17:10Z")

</div>

@VonOx , bon ben pas si facile que ca en faite!  
Pas de souci pour installer zwavejs2mqtt, ajouter mes devices et même les contrôler via l’interface de zwavejs… sauf que la partie MQTT je n’arrive pas à la faire fonctionner 😢  
J’ai toujours une erreur:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/4/4aa5952b32bea5032aebfd635199d2a51846cff8.png)

Je pense que j’aurais besoin de ton aide

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Mai 4, 2022, 7:24 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/14 "2022-05-04T07:24:34Z")

</div>

@VonOx , dans les paramètres MQTT de zwavejs2mqtt tu as mis quoi comme paramètres ?  
J’ai essayé plein de chose mais rien ne fonctionne

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Mai 4, 2022, 7:34 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/15 "2022-05-04T07:34:56Z")

</div>

Met ton ip LAN ( pas 127.0.0.1 )

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/2/2f5f493d89ef3ec977fec15f6f2a812ad96adb64.png)

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Mai 4, 2022, 8:29 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/16 "2022-05-04T08:29:53Z")

</div>

J’ai déjà essayé mais ca ne marche pas!

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Mai 4, 2022, 8:30 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/17 "2022-05-04T08:30:49Z")

</div>

Tu as lancer l’intégration MQTT côté Gladys ?

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Mai 4, 2022, 8:39 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/18 "2022-05-04T08:39:39Z")

</div>

Oui mais du coup c’est peut-être ça le problème.

Dans les paramètres mqtt de zwavejs2mqtt il faut remettre le port mqtt de gladys et indentifiant/password de gladys?

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Mai 4, 2022, 8:41 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/19 "2022-05-04T08:41:06Z")

</div>

Oui sauf si tu veux un autre broker mqtt

Il dit quoi le log du MQTT ?

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Mai 4, 2022, 9:30 UTC](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589/20 "2022-05-04T09:30:12Z")

</div>

J’ai modifié et indiqué l’authentification du broker mqtt gladys dans zwavejs2mqtt.  
Le message d’erreur n’est plus là. Dans node red, j’ai l’icône connecté donc ca a l’air de fonctionner.  
Quand je rentre chez moi tout à l’heure, je fais un essai en réel.  
Merci a toi.

[Page suivante](https://community.gladysassistant.com/t/node-red-zwave-js-ui-et-volet-roulants-zmnhcd1/6589.md?page=2)
