zwavejs2mqtt

For Z-Wave related questions in Domoticz

Moderator: leecollings

candrea77
Posts: 32
Joined: Saturday 25 February 2017 18:42
Target OS: Linux
Domoticz version: 2021.1
Location: Milano, Italy
Contact:

Re: zwavejs2mqtt

Post by candrea77 »

Hi Guys,
I've got an issue, a strange behaviour with some devices and I cannot manage how to solve it.

An example is with some FGMS001 : despite they are all the same type (Device ID 271-4097-2048 - 0x010f-0x0800-0x1001) with same firmware version ( See attached image OZW43-105.PNG), some of them are created in domoticz with type SceneId.



Example is Node 43 (registered wrong) and node 105 (registered OK)

The domoticz MQQT log shows :
2021-12-18 06:29:10.333 ZQTT: (ZQTT) registerDevice called with topic: zwave/43/48/0/Any and payload b'{"time":1639805350286,"value":true,"nodeName":"PIR PENSILE CUCINA","nodeLocation":"P2 - CUCINA"}'
2021-12-18 06:29:10.334 ZQTT: (ZQTT) Registering device /43/48/0/Any/True as unit 206 with type sceneId

2021-12-18 07:14:10.528 ZQTT: (ZQTT) registerDevice called with topic: zwave/105/48/0/Any and payload b'{"time":1639808024152,"value":false,"nodeName":"PIR ALARM P2 CUCINA PARETE TV","nodeLocation":"P2 - CUCINA"}'
2021-12-18 07:14:10.528 ZQTT: (ZQTT) Registering device /105/48/0/Any as unit 8 with type Any

2021-12-18 07:53:49.440 ZQTT: (ZQTT) registerDevice called with topic: zwave/43/49/0/Air_temperature and payload b'{"time":1639810429409,"value":21.1,"nodeName":"PIR PENSILE CUCINA","nodeLocation":"P2 - CUCINA"}'
2021-12-18 07:53:49.441 ZQTT: (ZQTT) Registering device /43/49/0/Air_temperature/21.1 as unit 77 with type sceneId



This behaviour prevent me to use the device, because all of the sensor devices type will be wrong ..... (see image OZW43WRONG.PNG)

Someone have encountered same issue ?
How can I solve this issue , that is preventing me from migrate from OZW to ZWAVEJS ?

Any help will be appreciated!!
Attachments
OZW43WRONG.PNG
OZW43WRONG.PNG (37.18 KiB) Viewed 1637 times
OZW43-105.PNG
OZW43-105.PNG (22.38 KiB) Viewed 1637 times
Sorry for any spelling mistake, English is not my native language.

DomoticZ running on Ubuntu 20.04 LTS , dzVents Version: 3.1.7 , Python Version: 3.8.5
hestia
Posts: 357
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

Re: zwavejs2mqtt

Post by hestia »

Hi
I've got one, it's like this
Screenshot 2021-12-18 092234.png
Screenshot 2021-12-18 092234.png (195.69 KiB) Viewed 1632 times
What you could do
1/ look in zwavejs2mqtt if the device seems ok
Screenshot 2021-12-18 092412.png
Screenshot 2021-12-18 092412.png (79.92 KiB) Viewed 1632 times
If not re-interview the node
2/ remove all devices in dz and rediscover the node to re-create the devices
And "use" the device to make it send data
candrea77
Posts: 32
Joined: Saturday 25 February 2017 18:42
Target OS: Linux
Domoticz version: 2021.1
Location: Milano, Italy
Contact:

Re: zwavejs2mqtt

Post by candrea77 »

Hi hestia,
thank you for reply.

In my CP both of the nodes seems the same.

I've compared the json file exported from CP and by my POV seems the same.
Also all functions available in CP are the same

ZWAVEJS Log when (for example) I've got a temperature report are identical :
2021-12-18T07:08:58.174Z DRIVER « [Node 043] [REQ] [ApplicationCommand]
└─[MultilevelSensorCCReport]
type: Air temperature
scale: Celsius
value: 20.9
2021-12-18T07:09:01.108Z SERIAL « 0x010700133f000221f7 (9 bytes)
2021-12-18T07:09:01.108Z SERIAL » [ACK]

2021-12-18T07:03:54.310Z DRIVER « [Node 105] [REQ] [ApplicationCommand]
└─[MultilevelSensorCCReport]
type: Air temperature
scale: Celsius
value: 23
2021-12-18T07:03:54.721Z SERIAL « 0x01070013060102e00e
Sorry for any spelling mistake, English is not my native language.

DomoticZ running on Ubuntu 20.04 LTS , dzVents Version: 3.1.7 , Python Version: 3.8.5
candrea77
Posts: 32
Joined: Saturday 25 February 2017 18:42
Target OS: Linux
Domoticz version: 2021.1
Location: Milano, Italy
Contact:

Re: zwavejs2mqtt

Post by candrea77 »

Another question (maybe can solve my problem) : Is it possibile to force domoticz to change device type from switch to temperature sensor ?
Sorry for any spelling mistake, English is not my native language.

DomoticZ running on Ubuntu 20.04 LTS , dzVents Version: 3.1.7 , Python Version: 3.8.5
candrea77
Posts: 32
Joined: Saturday 25 February 2017 18:42
Target OS: Linux
Domoticz version: 2021.1
Location: Milano, Italy
Contact:

Re: zwavejs2mqtt

Post by candrea77 »

By my current POV there is a BUG in the "moroen/ZWave-MQTT-plugin"

The problem is that my Node ID is 43 .... very unlucky value :D :D :D

In the python script api/topics-.py , after the script search for command class, there is this specific code (maybe for some tweak) :

Code: Select all

    if scene_activation in topic:
        try:

            if payload is not None:
                keyNum = payload["value"]

                device_id = device_id + "/" + str(keyNum)
                return device_id, scene_activation, "sceneId", payload
            else:
                return device_id, scene_activation, "sceneId", None

Due to the fact that topics in my case is : zwave/43/48/0/Any and scene_activation is /43/ ..... my Device will be proposed with wrong command_class
Sorry for any spelling mistake, English is not my native language.

DomoticZ running on Ubuntu 20.04 LTS , dzVents Version: 3.1.7 , Python Version: 3.8.5
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: zwavejs2mqtt

Post by heggink »

This plugin is depreciated since mqtt autodiscovery. Please switch to the built-in functionality.

Sent from my SM-G980F using Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
candrea77
Posts: 32
Joined: Saturday 25 February 2017 18:42
Target OS: Linux
Domoticz version: 2021.1
Location: Milano, Italy
Contact:

Re: zwavejs2mqtt

Post by candrea77 »

heggink wrote: Sunday 19 December 2021 0:49 This plugin is depreciated since mqtt autodiscovery. Please switch to the built-in functionality.

Sent from my SM-G980F using Tapatalk
Hi heggink, thanks for reply.

Can you point me to the "built-in" functionality ?
Can I find some instructions in this thread or (maybe better) there is some wiki ?
The "built-in" functionality is also available in current stable (the version i'm using) ?
Sorry for any spelling mistake, English is not my native language.

DomoticZ running on Ubuntu 20.04 LTS , dzVents Version: 3.1.7 , Python Version: 3.8.5
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: zwavejs2mqtt

Post by heggink »

https://www.domoticz.com/wiki/MQTT#Auto ... .28Beta.29

Sent from my SM-G980F using Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: zwavejs2mqtt

Post by waltervl »

candrea77 wrote: Sunday 19 December 2021 9:57
heggink wrote: Sunday 19 December 2021 0:49 This plugin is depreciated since mqtt autodiscovery. Please switch to the built-in functionality.

Sent from my SM-G980F using Tapatalk
Hi heggink, thanks for reply.

Can you point me to the "built-in" functionality ?
Can I find some instructions in this thread or (maybe better) there is some wiki ?
The "built-in" functionality is also available in current stable (the version i'm using) ?
See also https://www.domoticz.com/wiki/ZwaveJS2MQTT
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: zwavejs2mqtt

Post by waltervl »

Would be nice if someone writes down the procedure how to step over from Domoticz OpenZwave to Zwavejs2mqtt Autodiscover. A lot of zwave users will try to go this road when the stable version is released.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
lost
Posts: 616
Joined: Thursday 10 November 2016 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: zwavejs2mqtt

Post by lost »

waltervl wrote: Sunday 19 December 2021 11:05 A lot of zwave users will try to go [zwavejs2mqtt] when the stable version is released.
Hello, OZW will remain built-in (at least for a few stables) or will this be a mandatory switch? I presume this'll need rebuilding everything in devices integration: Not a 5mn job... :?
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: zwavejs2mqtt

Post by heggink »

Of course there will be NO mandatory switch. Too many people still using it and, indeed, not a 5m switch.

Sent from my SM-G980F using Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
mgugu
Posts: 208
Joined: Friday 04 November 2016 12:33
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: France
Contact:

Re: zwavejs2mqtt

Post by mgugu »

lost wrote: Monday 20 December 2021 11:04 I presume this'll need rebuilding everything in devices integration: Not a 5mn job... :?
May be not "everything".
When I connected my OZW stick on the zwave2mqtt gateway, all devices (which are stored on the stick) were discovered, meaning that re-pairing devices is not necessary.
You have of course to select and rename your devices and maybe to adapt your code if some classes are interpreted differently
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: zwavejs2mqtt

Post by heggink »

Correct. It will depend on how you have built your system. I largely use dzvents for scripting which uses device names. If you adopt zwavejs2mqtt, you can still have OZW alongside without it accessing the stick. That will allow you to rename devices and retain history. Doable but it clearly means effort, especially if you have a lot of devices.

Sent from my SM-G980F using Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: zwavejs2mqtt

Post by jvdz »

mgugu wrote: Monday 20 December 2021 11:44 You have of course to select and rename your devices and maybe to adapt your code if some classes are interpreted differently
Agree ...That is to me the bulk of the work that needs to be done when migrating. The ZWAVE side should indeed work out of the box.
The biggest challenge is the change of the IDX for a device. Most scripting will hopefully use the DeviceName, so that should be working after the devices are renamed properly, but other scripts/integrations (Nodered eg) that work with the IDX need to be adapted to the new IDX of the discovered devices.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
mgugu
Posts: 208
Joined: Friday 04 November 2016 12:33
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: France
Contact:

Re: zwavejs2mqtt

Post by mgugu »

jvdz wrote: Monday 20 December 2021 12:10 but other scripts/integrations (Nodered eg) that work with the IDX need to be adapted to the new IDX of the discovered devices.
In nodered I created a specific flow to create and maintain a global table idx <-> Name. This provides an abstraction layer allowing to use everywhere name instead of idx. Of course name has to be unique in the whole system
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: zwavejs2mqtt

Post by heggink »

jvdz wrote:
mgugu wrote: Monday 20 December 2021 11:44 You have of course to select and rename your devices and maybe to adapt your code if some classes are interpreted differently
Agree ...That is to me the bulk of the work that needs to be done when migrating. The ZWAVE side should indeed work out of the box.
The biggest challenge is the change of the IDX for a device. Most scripting will hopefully use the DeviceName, so that should be working after the devices are renamed properly, but other scripts/integrations (Nodered eg) that work with the IDX need to be adapted to the new IDX of the discovered devices.

Jos
That's why I moved away from idx's as much as possible. Unfortunately, the http/json interface doesn't have a device name option. That would be really helpful...

Sent from my SM-G980F using Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: zwavejs2mqtt

Post by jvdz »

heggink wrote: Monday 20 December 2021 12:32 That's why I moved away from idx's as much as possible. Unfortunately, the http/json interface doesn't have a device name option. That would be really helpful...
Understand, but the challenge is that the real unique key is the IDX, not the name.
In DTGBOT we just have a function that does a name lookup and translate the Name to IDX, but yes, it does require some extra coding to retrieve the active devices list via JSON and build an array like the otherdevices_idx table in LUA events.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: zwavejs2mqtt

Post by heggink »

True that the name may not be unique so if it isn't, why not just error out? That would be a lot simpler than having to maintain and update idx to name tables.

Sent from my SM-G980F using Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
lost
Posts: 616
Joined: Thursday 10 November 2016 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: zwavejs2mqtt

Post by lost »

jvdz wrote: Monday 20 December 2021 12:55 the challenge is that the real unique key is the IDX, not the name.
Agree, renaming after removing original hardware will not be a problem for internal Lua etc... Only for external stuff. Maybe being able to re-assign IDXes from freed devices at the same time names are re-assigned could ease the move: All changes could be done in a single place, Domoticz harware tab.

Not even sure IDXes for harware that belonged to removed devices are automatically removed: Always had to do this cleanup by hand to avoid hardware tab being full of previous trials/bad devices inclusions that had to be done again etc... Removing them automatically may cause side effects, but at least a flag to easily show/sort devices that do not belong to existing hardware anymore may help avoid mistakes, especially for this kind of heavy migration.

An automatic&reliable migration process does not looks doable to me, but a few (probably) easy changes may IMO help a lot. Those who already did the switch may also have better ideas...
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests