[NODE-RED] zwave-js-ui et volet roulants ZMNHCD1

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

Le module que j’utilise est un Qubino ZMNHCD1

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

Avec une feature « Switch Dimmer » configuré comme ceci

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 ).

Le flow importable

[
    {
        "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

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

image

6 Likes

:scream: :heart_eyes:

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

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

Salut

La clé je l’ai prise sur amazon Aeotec Z Stick Gen 5
Le module pour interrupteur chez domotique store

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

Hi @VonOx, thanks for this tutorial.

So did you install zwavejs2mqtt?
Did you use a Docker container to install it?
Can you give me more details, please?
Because I just plugged my Z-Wave dongle into Gladys and I have several types of Qubino modules to control.

Thanks in advance

Yes, nothing special, zwavejs2mqtt in a container.

The configuration is done in the interface

1 Like

Ok thanks.:+1:
And in Gladys, since you’re going through zwavejs2mqtt, you haven’t enabled the Z-Wave integration?

Ah no, no Z-Wave in Gladys, MQTT only

2 Likes

Ok perfect I’ll test that tonight. Thanks.

1 Like

Actually, couldn’t we redo the zwave « service » so that it launches the container plus an MQTT like z2m?

This is a library replacement, so there won’t be MQTT. You’ll need to make another integration similar to Zigbee2mqtt.

We discussed it, and unlike Zigbee2mqtt, ZwaveJS2Mqtt brings little.

The choice that was made is to migrate to ZwaveJS (the lib) while keeping the UI in Gladys; it remains more user-friendly and more future-proof. As we saw with Zigbee2mqtt, running a container alongside remains a « risk » and we have much less control on the Gladys side.

A large part of the migration work has already been done by @Romuald_Pochet here =>

1 Like

@VonOx , well, not that easy actually!
No problem installing zwavejs2mqtt, adding my devices and even controlling them via the zwavejs interface… except the MQTT part I can’t get to work :cry:
I always get an error:

I think I could use your help

@VonOx, in the MQTT settings of zwavejs2mqtt what parameters did you set?
I’ve tried a lot of things but nothing works

Set your LAN IP (not 127.0.0.1)

I’ve already tried but it doesn’t work!

Did you launch the MQTT integration on the Gladys side?

Yes, but that might be the problem.

In the MQTT settings of zwavejs2mqtt, should I put back the MQTT port of gladys and the username/password for gladys?

Yes unless you want another MQTT broker

What does the MQTT log say?

I modified and set the authentication for the Gladys MQTT broker in zwavejs2mqtt.
The error message is gone. In Node-RED, I have the connected icon so it seems to be working.
When I get home in a little while, I’ll do a real test.
Thanks to you.

1 Like