zwavejs2mqtt

For Z-Wave related questions in Domoticz

Moderator: leecollings

AllesVanZelf
Posts: 265
Joined: Monday 05 February 2018 8:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 12467
Location: Netherlands, near Haarlem
Contact:

Re: zwavejs2mqtt

Post by AllesVanZelf »

I'm not sure if this is a specific zwavejs2mqtt problem, a docker problem, or Ubuntu problem.

I'm migrating my installation from different pi's to one Intel Nuc. On this I'm running Ubuntu server 21.04. I use Dockers for zigbee2mqtt, domoticz and zwavejs2mqtt. Zigbee and zwavejs are running well and they do report to Mosquitto.
I'm able to control my lights with Zwavejs2mqtt and from the old Domoticz to Zwavejs2mqtt via the plugin.

The problem is this:
In docker Domoticz Zwavejs2mqtt plugin is installed and configured. But my devices are not accessible. In the log I see errors like:

Code: Select all

 2021-09-13 20:47:52.701 Error: ZwaveJS2MQTT: (ZWave-MQTT) failed to load 'plugin.py', Python Path used was '/opt/domoticz/userdata/plugins/zwavejs2mqtt/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
2021-09-13 20:47:52.701 Error: ZwaveJS2MQTT: (ZwaveJS2MQTT) Module Import failed, exception: 'ModuleNotFoundError'
2021-09-13 20:47:52.701 Error: ZwaveJS2MQTT: (ZwaveJS2MQTT) Module Import failed: ' Name: yaml'
2021-09-13 20:47:52.701 Error: ZwaveJS2MQTT: (ZwaveJS2MQTT) Error Line details not available.
2021-09-13 20:47:52.701 Error: ZwaveJS2MQTT: (ZwaveJS2MQTT) Exception traceback:
2021-09-13 20:47:52.701 Error: ZwaveJS2MQTT: (ZwaveJS2MQTT) ----> Line 58 in '/opt/domoticz/userdata/plugins/zwavejs2mqtt/plugin.py', function <module>
2021-09-13 20:47:52.701 Error: ZwaveJS2MQTT: (ZwaveJS2MQTT) ----> Line 6 in '/opt/domoticz/userdata/plugins/zwavejs2mqtt/api/devices.py', function <module>
2021-09-13 20:47:52.701 Error: ZwaveJS2MQTT: (ZwaveJS2MQTT) ----> Line 5 in '/opt/domoticz/userdata/plugins/zwavejs2mqtt/api/device_types.py', function <module>
2021-09-13 20:47:52.701 Error: ZwaveJS2MQTT: (ZwaveJS2MQTT) ----> Line 1 in '/opt/domoticz/userdata/plugins/zwavejs2mqtt/api/config.py', function <module> ) ----> Line 1 in '/opt/domoticz/userdata/plugins/zwavejs2mqtt/api/config.py', function <module> 
It looks like there is a problem with the python version. Ubuntu has python3.9 installed and Domoticz expects python3.7. Is that the problem?
Is it possible to fix this?
Domoticz 2020.1 (12230) on Raspberry Pi 3B with Raspian Buster. Besides Domoticz, Rpi is running Pi-Hole.
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 »

Try sudo for installing the requirements (like yaml module)

Code: Select all

sudo pip3 install -r requirements.txt
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
AllesVanZelf
Posts: 265
Joined: Monday 05 February 2018 8:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 12467
Location: Netherlands, near Haarlem
Contact:

Re: zwavejs2mqtt

Post by AllesVanZelf »

I tried that.
I removed Domoticz docker and installed direct on the system. Now it is working.
Domoticz 2020.1 (12230) on Raspberry Pi 3B with Raspian Buster. Besides Domoticz, Rpi is running Pi-Hole.
delius
Posts: 11
Joined: Monday 02 January 2017 16:44
Target OS: Linux
Domoticz version: beta
Location: Netherlands
Contact:

Re: zwavejs2mqtt

Post by delius »

I have a strange problem with this plugin. I have enabled logging, I see all sorts off messages, including device-id's and names. Zwave-MQTT is working in Node-Red, however there are no devices created in Domoticz.

I tried two instances of Domoticz. The second one as a docker image without any other hardware or configuration.

What am i doing wrong?

I Think Problem Solved! Important: Use "zwave" as prefix!
watchmyhome
Posts: 8
Joined: Saturday 18 September 2021 21:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: zwavejs2mqtt

Post by watchmyhome »

Version: 2021.1 (build 13499)
What I am doing wrong.
I have installed Mosquitto, zwavejs2Mqtt, Dockers and the plugin for Domoticz.
Zwavejs2Mqtt is running and I have made all interviews and changed the device names, When I am activating the plugin in Domoticz nothing happens. I was expecting that Domoticz is integrating the devices from zwavejs2mqtt. This is not the case and I have no clue what to do next. Attached the Domoticz protocol which looks good for me
protocol.JPG
protocol.JPG (78.86 KiB) Viewed 1800 times
Any help is wellcome
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 »

Homeassistant autodiscovery has just been implemented in the latest beta. That will completely replace the plugin. If you are running the latest beta, you can test it using the mqtt hardware.

My recommendation is to use that, if all your devices are supported and functional, or to wait until it's final as it will replace the plugin.

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 :-)
watchmyhome
Posts: 8
Joined: Saturday 18 September 2021 21:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: zwavejs2mqtt

Post by watchmyhome »

Yes I am running the latest beta. Didn't know that the latest beta already has the implementation. My fault. What do you recommend? Remove the directory under Domoticz plugins? Fact is that the auto discovery is not working. Any ideas what the settings are that the plugin will work? Does the broker address need a port number? I have testet more or less all setting without any result. I have testet the broker as well. Mosquitto is responding as expected.
Attachments
plugin.JPG
plugin.JPG (55.09 KiB) Viewed 1782 times
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 »

Difficult to say as I am on vacation ATM. You do need a broker address an port for the plugin. Have you switched on full debug in the plugin?

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 :-)
watchmyhome
Posts: 8
Joined: Saturday 18 September 2021 21:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: zwavejs2mqtt

Post by watchmyhome »

Even with the latest beta version Domoticz needs the installation of the plugin. I did a fully new installation but no devices are created. Something seems to be wrong. The zwavejs Driver works perfect. The integration into Domoticz not really.
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 »

Ok, so if zwavejs is working (ie you can switch devices and can see updates from devices in the log), next check mqtt. There is a mosquito browser utility that allows you to see what messages are being sent to mqtt. There should be 2 main topics: homeassistant and zwave. Under these topics, all device definitions and device opdates should appear.

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
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 »

http://mqtt-explorer.com/

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 :-)
solarboy
Posts: 300
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: zwavejs2mqtt

Post by solarboy »

heggink wrote: Monday 20 September 2021 22:33 http://mqtt-explorer.com/

Sent from my SM-G980F using Tapatalk
Any idea what to do once we follow that link ? The install options for Rpi are merely an "appimage" which seems to do nothing if I download it , make it executable and click it. However it did create a pretty zero byte file in the Downloads folder. I had a scout on the github page but there isn't much there regarding usage.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
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 »

I could install it fine under both Windows and Ubuntu.

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 :-)
AllesVanZelf
Posts: 265
Joined: Monday 05 February 2018 8:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 12467
Location: Netherlands, near Haarlem
Contact:

Re: zwavejs2mqtt

Post by AllesVanZelf »

watchmyhome wrote: Saturday 18 September 2021 21:23 ... I was expecting that Domoticz is integrating the devices from zwavejs2mqtt. This is not the case and I have no clue what to do next. ...
I'm not sure if that is supposed to happen. I had to go to devices and one by one add them to Domoticz. Is that what you expect?

I switched from OpenZwave to ZwaveJS2Mqtt and named the ZwaveJS devices same as the OPenZwave devices. After some testing I removed OpenZwave.
Domoticz 2020.1 (12230) on Raspberry Pi 3B with Raspian Buster. Besides Domoticz, Rpi is running Pi-Hole.
AllesVanZelf
Posts: 265
Joined: Monday 05 February 2018 8:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 12467
Location: Netherlands, near Haarlem
Contact:

Re: zwavejs2mqtt

Post by AllesVanZelf »

Does anyone know how I get rid of this error message in Domoticz Log? What is the problem with this? I have seen this error log on different places in this thread:

Code: Select all

 2021-09-21 10:46:42.149 Error: ZwaveJS2MQTT: (ZwaveJS2MQTT) 'onMessage' failed 'ValueError':'invalid literal for int() with base 10: 'unknown''.
2021-09-21 10:46:42.149 Error: ZwaveJS2MQTT: (ZwaveJS2MQTT) ----> Line 238 in '/home/pi/domoticz/plugins/zwavejs2mqtt/plugin.py'
2021-09-21 10:46:42.149 Error: ZwaveJS2MQTT: (ZwaveJS2MQTT) ----> Line 161 in '/home/pi/domoticz/plugins/zwavejs2mqtt/plugin.py'
2021-09-21 10:46:42.149 Error: ZwaveJS2MQTT: (ZwaveJS2MQTT) ----> Line 63 in '/home/pi/domoticz/plugins/zwavejs2mqtt/api/devices.py'
2021-09-21 10:46:42.149 Error: ZwaveJS2MQTT: (ZwaveJS2MQTT) ----> Line 336 in '/home/pi/domoticz/plugins/zwavejs2mqtt/api/devices.py' 
Domoticz 2020.1 (12230) on Raspberry Pi 3B with Raspian Buster. Besides Domoticz, Rpi is running Pi-Hole.
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: Saturday 18 September 2021 21:29 Homeassistant autodiscovery has just been implemented in the latest beta. That will completely replace the plugin. If you are running the latest beta, you can test it using the mqtt hardware.

My recommendation is to use that, if all your devices are supported and functional, or to wait until it's final as it will replace the plugin.

Sent from my SM-G980F using Tapatalk
Is there a seperate place for discussing the AutoDiscover and issues encountered?
I've setup ZWAVEJS2MQTT in a test environment and using the latest Domoticz development version 2021.1 (build 13501) and all populated pretty nicely 8-) but I have encountered an issue with and FIBARO Roller Shutter FGRM222:
When clicking on the Slide it works fine and move to the position but when clicking the Close or Open part of the Device I get this in ZWAVEJS2MQTT:

Code: Select all

2021-09-21 14:09:34.101 INFO MQTT: Message received on zwave/nodeID_16/38/0/targetValue/set: 'OPEN'
2021-09-21 14:09:34.105 INFO ZWAVE: Writing 'OPEN' to 16-38-0-targetValue
2021-09-21 14:09:34.109 ERROR ZWAVE: Error while writing 'OPEN' on 16-38-0-targetValue: Command not valid for Multilevel Switch
2021-09-21 14:09:34.112 ERROR ZWAVE: Unable to write 'OPEN' on 16-38-0-targetValue
2021-09-21 14:09:35.757 INFO MQTT: Message received on zwave/nodeID_16/38/0/targetValue/set: 'CLOSE'
2021-09-21 14:09:35.761 INFO ZWAVE: Writing 'CLOSE' to 16-38-0-targetValue
2021-09-21 14:09:35.764 ERROR ZWAVE: Error while writing 'CLOSE' on 16-38-0-targetValue: Command not valid for Multilevel Switch
2021-09-21 14:09:35.767 ERROR ZWAVE: Unable to write 'CLOSE' on 16-38-0-targetValue
The received message in MQTT is:

Code: Select all

zwave/nodeID_16/38/0/targetValue/set    OPEN (or CLOSE)
Any idea what to check next?
Thanks
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
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 »

Better open a separate topic for ZwaveJS2MQTT Autodiscovery
Even better to report this in slack
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
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 »

waltervl wrote: Tuesday 21 September 2021 16:46 Better open a separate topic for ZwaveJS2MQTT Autodiscovery
Even better to report this in slack
Would be happy to either way ...hence the opening question. :)
I don't use slack at the moment and guess I need to receive an invite for that?

In the mean time I have tested with publishing using MQTT Explorer the following:
  • 99 (MaxDimLevel-1) in stead of CLOSE
  • 0 in stead of OPEN
... and that works fine.
So maybe that is needed for this?

@MOD: Please feel free to split these posts off into a new topic when that is "better".

Jos
Last edited by jvdz on Tuesday 21 September 2021 17:19, edited 1 time in total.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
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 »

jvdz wrote: Tuesday 21 September 2021 17:11
I don't use slack at the moment and guess I need to receive an invite for that?
See https://github.com/domoticz/domoticz/is ... -922952566
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
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 »

Sent you a pm for slack.

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 :-)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest