Snapshot version of zwave cannot find serial port after OH restart

Tags: #<Tag:0x00007f433087d9d8> #<Tag:0x00007f433087d910>

In my case, I edit the .thing file from /ttyUSB_ZStick to /ttyACM0. Then the dongle works fine.
After next restart it will fail again, I change the .thing file back to /ttyUSB_ZStick, and it works fine again…

Really odd and quite annoying.

There was a PR to resolve the issue of multiple versions of nrjavaserial being used. This is in the snapshots and does not correct this issue. There is a special nrjavaserial that is built for use with OH which removed liblocdev, but those discussions are tangential to this issue and to the one about multiple versions being used.

I just tested with an older version of the zwave binding and everything started up fine after several OH restarts. Also, the serial port dropdowns continued to display all ports. The issue appears to be related to this PR, which modified the serial transport used by the zwave binding.

Correct - this is what I said previously, although I can’t find the thread. My guess is that there is a startup issue - given that this only seems to be a problem on startup, I think that possibly the provider isn’t available when the binding starts, and therefore it can’t open the port.

That’s a guess though, but given the ESH startup is not well defined, I think it’s a good possibility.

1 Like

In addition, there appears to be some kind of conflict in the USB discovery service after the zwave binding is manually restarted, since the ports listed in the dropdown (for all bindings using serial) disappear except for the one used by zwave (at least that is what I am seeing). Possibly due to using different serial transports? It’s probably time to replace openhab-transport-serial in all bindings with openhab-core-io-transport-serial, since TMK there is no reason for OH to have both.

I’m not an expert. I did have a similar problem on start-up after I delete my tmp and cache directories. I’m on OH 2.4 but am using a zwave 2.5 snapshot, so it might not be the same issue. Anyway I found a suggestion on the forum that worked for me. Go into the console and type; feature:install openhab-transport-serial. Everything came back.

In a separate post I was wondering if there is a OH file I can place this command into because I get a lot of errors until I can get into the console after a start-up and issue the above command.

The issue reported here is different. If you are running a recent snapshot version of the binding, you will find that zwave will not find the serial port after OH restarts and you will need to restart the binding to get it working. The easiest way I have found to do this is to open Habmin and change the name of the controller.

What you are describing is due to binding dependencies not being automatically resolved when the binding is manually installed, so the serial transport also needs to be manually installed. You could automate this by running my script in a startup rule.

@ffr, I change the title of your topic… hopefully this is more accurate. Or are you not using the snapshot version of the zwave binding?

Here is an issue to track…

I would like to move this to the core - this is not a ZWave issue, but is related to the serial provider as seen from the logs below -:

2019-05-02 19:45:43.586 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM0'

2019-05-02 19:45:43.603 [WARN ] [erial.internal.SerialPortManagerImpl] - No SerialPortProvider found for: /dev/ttyACM0

I agree on this…
As I wrote above, I have this issue with my RS485 dongle as well… Infact it´s a nightmare with all my USB devices, No matter what I connect, its pure random which will fail and which will succeed when restarting openhab/rpi. Except for my external SSD drive, my 4 port active USB hub, and my Zigbee hat, which is connected to PIO interface.
My second Zigbee dongle (used for sniffing), Zwave dongle, Wmbus dongle and RS485 dongle is a nightmare. Atm I have disconnected the extra Zigbee dongle and the Wmbus dongle (Wmbus binding doesnt work anyway). Then I “only” have problems with the RS485 and zwave when restarting.

This looks to be resolved in S1585. However, read this comment in the issue, or more importantly the responses, as there may be some limitations to manual installation of the zwave and zigbee bindings. Hopefully, I’m completely wrong!

Edit: I was using my install script and the directories had changed. Manual installs are still possible! Latest Zwave binding missing module?

hi, i’m running in a (i guess) related issue when moving from 1566 to 1587…i have zwave which works fine, but jeelink stops working and the existing port in linux /dev/ttyUSB1 can not be selected anymore from PaperUI/habmin…

Any idea how to fix it? Could/is this related to this discussion , as it only seems to discuss zwave/zigbee sticks?

I don’t have any other binding that uses a serial port. So, Ican’t say for sure, but it is very likely related to this.

@5iver
i guess too, but is there a quickfix that i could do. Is it now related to OH changed or due to distributiuon (linux) changed and OH is not ready for that?

OH has had massive changes. There’s a core dev that’s looking at serial, but I need to submit another issue for this. The only quick fix I can suggest is to not change anything (as in serial ports) and to just restart OH. I have to do this at least once a day to keep zigbee running.

is there a chance to go back…eg 1512, i had a working system on 1566…updating to 1587 which broke serial…now going back to 1566 did not fix it (same problem as in 1587). So i naively hope that a 1512 downgrade may help (?)

I also ran into serial problems and went back to 2.5 M1 (which is very close to 1512). It works stable with 2.5 M1 for me.

1 Like

I made some fixes for the issue of ports disappearing from the drop downs in Paper UI in:

being on openhabian 2.4. stable on the raspi, what version do I need to install to get this issue resolved?

You will need to use a snapshot… or wait for 2.5M2.