With openHAB 2.5.1 or higher I get the follow error from the ZWave binding:
Serial Error: Port /dev/ttyZWave does not exist
I run openHAB on a Synology NAS inside a Docker container. Because I use more than one USB-Stick and the port assignment changes after a reboot, I created a rules file in /lib/udev/rules.d/ with the following content:
The container then uses the symlink /dev/ttyZWave instead of /dev/ttyACM0 or /dev/ttyACM1. This has been working perfectly with older versions (and still works) but not with the update to 2.5.1. When I edit the configuration to use the real port (/dev/ttyACM…) openHAB works as expected. I tested this with 2.5.1, 2.5.2 and 2.5.3.
Any help is greatly appreciated as this problem breaks my current setup with multiple USB sticks.
@rlkoshak I am not able to add tags to my topic. When I originally created the topic I got some internal server error and now everytime I try to add tags to my topic I get “Error 500”.
What “older versions” exactly? It helps to know what works - not just what doesn’t.
Sorry for not being more specific. The latest working version for me is 2.5.0 and that is what I have been using since it was released. I’m not sure if I already had this setup with 2.4 but I tested some milestone builds during the 2.5 development and never had any issues.
I assume when you upgraded that you retained any command line parameters to set the ports when starting openHAB?
Yes, I even created new containers for all version from 2.5.0 onward to see if the problem is specific to one version. For further testing I also did setup all containers in privileged mode so I can rule out any errors passing devices.
So 2.5.0 works and all later stable versions do not work.
Thanks. I just checked, and there have been no changes to the binding since 2.5.0. Well, there were 2 - one to change the license headers to 2020 and one to add a new channel. Neither of these would impact the serial port.
If I’m following the release notes there were some other changes to the binding:
Another thing which comes to my mind is that I somehow remember reading about a change in the underlying Serial Port implementation (a different one) being used but I’m not sure if remember that correctly and if that applies to the new releases. I was a passive follower of openHAB for a long time
Maybe there were changes elsewhere that could impact this - maybe Docker or Syno repos?
Sadly no. I created all containers again from scratch yesterday without restarting or changing versions of Docker or DSM. So I can create a new 2.5.0 container now and it works, whereas 2.5.1 etc. do not work.
Below is the full list of changes since 2.5.0. Many of these were not merged and some were merged into a branch not related to 2.5. In any case I don’t see any that should impact the serial port, and in general, the serial port is not managed by the binding anyway.
Please feel free to try and debug the issue then - I didn’t work on this code and there have been no other reports of such issues in the past 4 months, but you’re welcome to try and work through the issue of course.
I took me a while but I tested some more configurations. I created a new container with empty folders except for the zwave.things file which contains only the controller.
2.5.0 with ZWave binding from Paper UI -> everything works
2.5.1 with ZWave binding from Paper UI -> Serial Error: Port /dev/ttyZWave does not exist
2.5.1 with “org.openhab.binding.zwave-2.5.0-SNAPSHOT.jar” -> everything works
So it seems the problem lies within the binding and the only changes related to serial ports is the merge request I mentioned earlier. As far as I can see these changes might even be the only real code changes since 2.5.0.
Please feel free to try and debug the issue then
I’m no Java developer and I have no experience with the openHAB source code at all, but if that’s what you think is best, I will gladly try to resolve the issue myself. But before I do that I want to be sure to not waste time debugging this code if you think it is not related to my problem.
As mentioned, the binding doesn’t directly link to the serial port - it’s all done externally.
I’m not sure I understand you. Could you please explain to me what you mean by that? Just from looking at the code I got the impression that the shown part is directly responsible for generating the error message I’m seeing and the way to identify the serial port after initialization, which leads to that error, was changed in 2.5.1 in that merge request. Again, I might be wrong and please do not feel offended by my questions
Yes. What I meant is that the communication with the serial port is done through the openhab serial port classes. The binding doesn’t have a lot to do with this - it just passes the data to the driver.
I dont have any time to look at this at the moment - sorry.
Sorry - I just don’t have the time to look at minor issues like this (I know it’s not minor to you, but one person with such an issue in 4 months is still minor and I’ve a lot of other things to work in - sorry).