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


I am using a Aeon Gen 5 Z-Stick successfully with OH1. I am working to migrate to OH2 (online build, installed via apt-get), and continuously receive this error in the logs:

2016-12-25 17:39:36.548 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:159387b2735' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
2016-12-25 17:39:36.645 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:159387b2735' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to OFFLINE (COMMUNICATION_ERROR): Serial Error: Port /dev/ttyACM0 does not exist

My /etc/default/openhab2 file looks like this:

I have also tried injecting export into various places in the karaf and many other startup files, with no luck.

OH2 is running as openhab, and is a member of the dialout group, which has rw privileges on /dev/ttyACM0.

Any ideas on how to make this port available to OH2?

Additional details, I can confirm Java is getting the ttyACM0 port passed through (output from ps -fp):

openhab 365 32658 99 17:46 ? 00:07:14 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/lib/openhab2 -Dopenhab.logdir=/var/log/openhab2 -Dorg.osgi.service.http.port=8080 -Djava.awt.headless=true -XX:+UseG1GC -Djava.endorsed.dirs=/usr/lib/jvm/java-8-oracle/jre/jre/lib/endorsed:/usr/lib/jvm/java-8-oracle/jre/lib/endorsed:/usr/share/openhab2/runtime/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/java-8-oracle/jre/jre/lib/ext:/usr/lib/jvm/java-8-oracle/jre/lib/ext:/usr/share/openhab2/runtime/lib/ext -Dkaraf.instances=/usr/share/openhab2/runtime/instances -Dkaraf.home=/usr/share/openhab2/runtime -Dkaraf.base=/var/lib/openhab2 -Dkaraf.etc=/var/lib/openhab2/etc -Dkaraf.restart.jvm.supported=true -Djava.util.logging.config.file=/var/lib/openhab2/etc/ -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /usr/share/openhab2/runtime/lib/boot/org.apache.karaf.diagnostic.boot-4.0.8.jar:/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.jaas.boot-4.0.8.jar:/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.main-4.0.8.jar:/usr/share/openhab2/runtime/lib/boot/org.osgi.core-6.0.0.jar org.apache.karaf.main.Main

That’s odd. Normally, the only place you need to put the serial port is in the config of the Z-Wave Serial Controller thing.

This could be completely unrelated, but in case it’s not, this commit updated nrjavaserial from 3.9.3 to 3.12.1 three days ago.

I am using the snapshot version of OH2 via apt-get. If I installed today l, I should have this latest build right? How can I check?

You can find the build number by logging into the karaf console.

According to Cloudbees, the latest build is 674.

I was having a similar issue with an existing install. Did two things in parallel and one of them fixed it:

Installed this library: RFXCom issue on RP3

And did an apt-get update/upgrade and am now back online.

Hope one or both help your install (I’d start with an upgrade).

I’m on the latest snapshot via apt-get. There is not a liblockdev1 package of my Ubuntu build (16.04)… I’ll spend more time troubleshooting tomorrow.

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.

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.

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.


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

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 ( 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…?


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

grep openhab /etc/group

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,

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:

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.
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 isn’t in beta5. Is the discussion title wrong?