Page 9 of 23

Re: zwavejs2mqtt

Posted: Monday 13 September 2021 20:58
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?

Re: zwavejs2mqtt

Posted: Monday 13 September 2021 21:29
by waltervl
Try sudo for installing the requirements (like yaml module)

Code: Select all

sudo pip3 install -r requirements.txt

Re: zwavejs2mqtt

Posted: Monday 13 September 2021 22:34
by AllesVanZelf
I tried that.
I removed Domoticz docker and installed direct on the system. Now it is working.

Re: zwavejs2mqtt

Posted: Wednesday 15 September 2021 13:48
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!

Re: zwavejs2mqtt

Posted: Saturday 18 September 2021 21:23
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 1796 times
Any help is wellcome

Re: zwavejs2mqtt

Posted: Saturday 18 September 2021 21:29
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


Re: zwavejs2mqtt

Posted: Sunday 19 September 2021 10:40
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.

Re: zwavejs2mqtt

Posted: Sunday 19 September 2021 12:11
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


Re: zwavejs2mqtt

Posted: Monday 20 September 2021 21:04
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.

Re: zwavejs2mqtt

Posted: Monday 20 September 2021 22:32
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


Re: zwavejs2mqtt

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

Sent from my SM-G980F using Tapatalk


Re: zwavejs2mqtt

Posted: Tuesday 21 September 2021 1:02
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.

Re: zwavejs2mqtt

Posted: Tuesday 21 September 2021 7:18
by heggink
I could install it fine under both Windows and Ubuntu.

Sent from my SM-G980F using Tapatalk


Re: zwavejs2mqtt

Posted: Tuesday 21 September 2021 12:47
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.

Re: zwavejs2mqtt

Posted: Tuesday 21 September 2021 12:59
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' 

Re: zwavejs2mqtt

Posted: Tuesday 21 September 2021 16:14
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

Re: zwavejs2mqtt

Posted: Tuesday 21 September 2021 16:46
by waltervl
Better open a separate topic for ZwaveJS2MQTT Autodiscovery
Even better to report this in slack

Re: zwavejs2mqtt

Posted: Tuesday 21 September 2021 17:11
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

Re: zwavejs2mqtt

Posted: Tuesday 21 September 2021 17:14
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

Re: zwavejs2mqtt

Posted: Tuesday 21 September 2021 17:15
by heggink
Sent you a pm for slack.

Sent from my SM-G980F using Tapatalk