Nrjavaserial upgrade causes "Serial Error: Port /dev/ttyACM0 does not exist"

Same issue here :

events.log:2016-12-25 18:39:46.226 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:159363163fa' changed from OFFLINE (BRIDGE                                   _OFFLINE): Controller is offline to OFFLINE (COMMUNICATION_ERROR): Serial Error: Port /dev/ttyACM0 does not exist

Setup: apt-get , online, RPi2, tellstick.

Had working tellstick setup with OH1, moved to OH2 ( no apt-get ) and got that working.
Moved to apt-get to get hold of code progress and to get Habmin to work from zwave support.

Funny thing is, Habmin2 have been able to extract the one node I had discovered before plugging it in and set it up as an item.

<<>Rant>
Now neither tellstick not zwave works. Reading forums to find out small stuff like default sitemap isn’t default, that /etc/group file needs to be edited.
I update files, but paper UI does not …
Almost all is found out by forums and google, very little by the documentation.
OH is making me older fast.
<<>/Rant>

had same issue z-wave (Razberry) ACM0 not working with latest builds. i was using openhabian to update my system. As nolan_garrett was saying something wrong with OS.

After those two steps, i am back in business.

  • Update system sudo apt-get update
  • Install: liblockdev1-dev package sudo apt-get install liblockdev1-dev

All works again.

2 Likes

Thanks,
tried that , with mixed success.
Openhab didin’t start on reboot.
Or rather ,died. And I’m assuming it was unexpectedly.
Nothing in the openhab.log:

2016-12-26 08:02:54.626 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2016-12-26 08:02:55.046 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2016-12-26 08:02:55.669 [INFO ] [ding.astro.internal.job.JobScheduler] - Scheduled a daily job at midnight for astro calculation
2016-12-26 08:03:01.974 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM0'

Nor in the event.log:

2016-12-26 08:03:01.971 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:159363163fa' changed from UNINITIALIZED to INITIALIZING
2016-12-26 08:03:01.977 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:159363163fa' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
2016-12-26 08:03:02.062 [hingStatusInfoChangedEvent] - 'zwave:device:159363163fa:node2' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
2016-12-26 08:03:02.068 [hingStatusInfoChangedEvent] - 'zwave:device:159363163fa:node2' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline

The /var/run/openhab2.pid file was still there though.

Even worse, when I removed liblockdev1 and liblockdev1-dev, I only hade PAPER UI and BASIC UI in the web interface. But it started again.

Edit: When I look in the PAPER IU , the zWave binding is gone.

You did not write anything about the most important step:

adding user openhab to dialout group.

That is the only thing I had to do with the latest build of Raspbian and the latest build of openHAB2:

2016-12-25 10:48:16.317 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM0'
2016-12-25 10:48:16.620 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized
2016-12-25 10:48:16.694 [INFO ] [mmandclass.ZWaveSecurityCommandClass] - Update networkKey
2016-12-25 10:48:16.780 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller
1 Like

Sorry for being unclear, openhab was added to dialout (and tty) early in the fault analysis.

 grep openhab /etc/group
tty:x:5:openhab
dialout:x:20:pi,openhab
openhab:x:110:

I’ve also tried ( and succeeded) by doing
sudo chmod a+rw /dev/ttyACM0
But that doesn’t cut it as a long term solution as the device will be removed if I unplug the stick.

Edit: Allow me to correct myself:
under Addons I can see the zwave is installed, but under configuration->bindings , zwave is gone.

This is interesting.
I had my Z-Wave stick at /dev/ttyACM0’ already working with the apt-get installation of OH2 (the snapshot version maybe 1-2 month old). Yesterday I made and apt-get upgrade and now Z-Wave stops at this line: Connecting to serial port '/dev/ttyACM0'. The controller is offline with reason “Serial Error: Port /dev/ttyACM0 does not exist”.
I didn’t had this option (EXTRA_JAVA_OPTS=-Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0) before but even setting it doesn’t make a difference.

Finding this thread, I installed liblockdev1 and finally it works! So my guess would be that the latest nrjavaserial needs the liblockdev1 as a dependency (at least on raspberry pi 2)?

From the other thread:

I can see this liblockdev1 mentioned several times in github tickets of the nrjavaserial repository, however it is not mentioned there in the readme as a prerequisite.

Anyway to automate this installation in OH2…?

2 Likes

I don’t know if it is of any help for you, but my output is:

grep openhab /etc/group
dialout:x:20:pi,openhab
openhab:x:1001:

I think the groups settings are the same.

I’ve seen both liblockdev1 and liblockdev1-dev being mentioned. Which is correct?
( I think liblockdev1 pulls liblockdev1-dev with it.)

Tried again,
did /etc/init.d/openhab stop (interesting that there was no trace of that in the logs.)
installed liblockdev1,
rebooted

System started, with opehab, I could get the initial screen up on :8080/start/index
but after the start initialized zwave , openhab died without a trace.

these still remain:

pi@homeauto /run/lock $ ll
total 12
drwxr-xr-x 15 root    root    640 Dec 26 11:15 ..
-rw-rw-rw-  3 openhab openhab  11 Dec 26 11:16 LCK..ttyACM0
-rw-rw-rw-  3 openhab openhab  11 Dec 26 11:16 LCK.C.166.000
-rw-rw-rw-  3 openhab openhab  11 Dec 26 11:16 LCK...2648
drwxrwxrwt  2 root    root    100 Dec 26 11:16 .

Still confused but at least it is repeatable.

On the pine64 it also stopped working with the latest update (apt-get upgrade openhab2-online)

Usual stuff was already in:
My /etc/default/openhab2 file looks like this:
EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0"

openhab in the dailout group (also did a chmod a+rw /dev/ttyACM0)

Unfortunately suggested solution liblockdev1 / liblockdev1-dev is also not solving the issue :slight_smile:(

Note: liblockdev1 is even no longer in the repository… to install it I used :

Any other suggestion to get this working? Is it possible to revert back to the earlier version for the time being?

I have been fighting with this for days. Reading every post about Pine64 and Aeon zwave gen 5 around.
Even done a fresh install of Debian and openhab2 offline. setup everything following this guide. http://docs.openhab.org/installation/linux.html#package-repository-installation
i also just did the liblockdev1 / liblockdev1-dev install with no luck.
Hope someone has an idea.

This is what I get:

2016-12-26 18:03:02.490 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:7d934604’ changed from OFFLINE (COMMUNICATION_ERROR): Serial Error: Port /dev/ttyACM0 does not exist to UNINITIALIZED (HANDLER_MISSING_ERROR)
2016-12-26 18:03:03.541 [ThingRemovedEvent ] - Thing ‘zwave:serial_zstick:7d934604’ has been removed.
2016-12-26 18:04:02.239 [ThingAddedEvent ] - Thing ‘zwave:serial_zstick:7d934604’ has been added.
2016-12-26 18:04:21.898 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:7d934604’ changed from UNINITIALIZED to INITIALIZING
2016-12-26 18:04:21.909 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:7d934604’ changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
2016-12-26 18:04:21.985 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:7d934604’ changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to OFFLINE (COMMUNICATION_ERROR): Serial Error: Port /dev/ttyACM0 does not exist

The title claims this thread is about OH2b5 - but the change https://github.com/openhab/openhab-core/issues/101 isn’t in beta5. Is the discussion title wrong?

Maybe. I’m on the cloudbees build that was available via apt yesterday. I can check exact version when home later today.

I’m running 2.0.0~20161226183012

Here solution for the pine

As indeed it seems to be the recent update that causing havoc on the pine64, and iblockdev1 / liblockdev1-dev solution does not solve it on the Pine64 I rebuild the
org.openhab.io.transport.serial-2.0.0-SNAPSHOT.jar with the earlier nrjavaserial (forum unfortunately does not allow me to attach it)

to get it working again:
bundle:list
(look for the bundle number e.g. 209 | Active | 80 | 2.0.0.201612232333 | openHAB Serial Transport Bundle
bundle:uninstall 209

than copy the org.openhab.io.transport.serial-2.0.0-SNAPSHOT.jar to the /usr/share/openhab2/addons folder (apt install)

You may need to restart openhab

Same issue here. Running a raspberry pi 2, with the online version from about a week back; issue persisted after updating to the latest version as of today. I only noticed the issue today after installing the hue emulation and then restarting openhab, so suspect the restart of openhab after an earlier system update is when it started going wrong.

Palatia’s solution to install liblockdev1-dev fixed it for me.

I manually installed the liblockdev1 and liblockdev1-dev packages (not available via apt-get). The issue persists for me.

Thanks Marcel
I’m really new to openhab. Having a hard time understanding what I have to do.
I need to replace the current nrjavaserial with a older version?
If that is correct where can I get it?

I was able to get mine working. I had to remove the LCK file from /var/run/lock that persisted after stopping OH1 - and also ensure liblockdev1 and liblockdev1-dev were installed.

All, as this serial lib upgrade seems to cause more issues than it solves, I have just reverted the commit again (see here). The next distro build will come with the old lib again, so that the issue here should go away.

2 Likes