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

If it is a problem that only exists on specific Linux versions (as you now assume), you might try to seek for some help at and see if others came across similar problems.

Some more specific and detailed log files might also be helpful.

Can anybody else confirm here that he is successfully using Z-Wave with a recent build with /dev/ttyAMA0?

Confirmed with build #710, but using not a Razberry but a USB Zwave stick on /dev/ttyACM0.

2017-01-10 09:32:50.257 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM0'
2017-01-10 09:32:50.406 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized
2017-01-10 09:32:50.526 [INFO ] [mmandclass.ZWaveSecurityCommandClass] - Update networkKey
2017-01-10 09:32:50.575 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller

In this situation the more detail the better to isolate the problem. Which Raspberry Pi are you using and are you running Debian Wheezy or Jessie?
The other difference of course is that the Razberry sits on the RX and TX pins of the gpio and not on the USB bus. This comes down to serial device recognition that was working fine on version 3.9 of nrjavaserial and does not work at all (for me in the situation stated) on version 3.12 of this library.

Thanks Kai. I will pursue this on the github link you provided and am happy to keep testing.
In the meantime I expect it could take a little while to fully shake this one out. Could you please provide a link to an archived version from early December using 3.9 of the library. I have not been able to run my zwave devices for several weeks now.

Did you ask me?

So my answer above is not of any interest and should be ignored.

Yes sorry sihui, I hit the wrong Reply button. Thanks for yr response.

New installation of openhabian on a clean SD card on the rPi2 (installs under Debian Jessie) works with Razberry card :slight_smile: after :
adding" to setenv and
sudo chmod 666 /dev/ttyAMA0
which gives
ls -la /dev/ttyAMA0
crw-rw-rw- 1 root tty 204, 64 Jan 11 18:24 /dev/ttyAMA0
Thanks to all of those involved over at openHABian hassle-free openHAB Setup in putting openhabian together. The installation works very smoothly.

So this may support the case that NrjavaSerial 3.12 does not work under Debian Wheezy - at least on rPi2 devices whereas the previous version 3.9 worked fine. Maybe Wheezy does not support a required dependency of nrjavaserial library.

Hey @robb01 I didn’t get if the new system with openHABian + the two commands helped you in whatever you are trying to do. Please be aware, that these commands are not all that’s needed and that the file setenv is the wrong place for your modifications. There is a menu entry under sudo openhabian-config to do everything for you in the right way:

Thanks @ThomDietrich for this comment and all of your good work. I am happy that the new installation went well and the razberry device is recognised. All is looking good after some weeks struggling with nrjavaserial. I will defintely check out the openhabian-config tool and make sure everything is good there. Should I then remove the line I addded to setenv?

It would be redundant then and would get overwritten with one of the future openHAB updates anyhow. So yes, remove it and execute the openHABian steps. Good luck!

Fresh Openhabian(OH2) on R-pi 3b, using usb to serial cable to my Optoma projector. I was stumped up until yesterday. I was getting the /dev/ttyUSB0 does not exist error until I did this as stated above:

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

The projector fired right up on the first try after that.
Thanks guys!

1 Like

This package is part of openHABian I believe…
Out of the house currently. Will have to check later

Running Raspbian on R-pi 2B and using Razberry.
Installed liblockdev1 and liblockdev1-dev and then upgrading to latest openhab2 (2.0.0~20170112185728-1).

If I add “” Openhab2 just dies on me with this as the last log message:
2017-01-12 23:07:28.231 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port ‘/dev/ttyAMA0’

openhab user is a member of dailout etc etc, it has been working before upgrade late december.

But I guess I am not not alone with this problem, so I have that going for me which is nice.

I had the same problem, i.e. sudden death after a z-wave message .
I gave up and:
Did apt-get purge, and apt-get install of the new single distro
Purge removed the openhab user. So I got the “does not exist” error.
Added user openhab user to dialout and tty groups.
After that I was back at the sudden death problem…

There was a revert of some code in OH relating to those liblockdev around christmas,
but after new year the problems was back, albeit with a bit different symptoms.

( On top of that I realised I was running on wheezy instead of jessie so recent queries of issues seems to be answered with “Upgrade!” )

Edit: I’ve not seen a root cause analysis on this sudden death issue.

1 Like

@da_kurgan @erland_lestander Please check if you followed the instructions documented here:

As for the Raspberry Pi: openHABian has all these settings pre-configured. Might be something for you.

I haven’t set EXTRA_JAVA_OPTS .
On the other hand it worked without this up until the 3rd of January.
I will set it and test.

Maybe the binding can do this in the background?

Changed to this:

pi@homeauto /etc/default $ cat openh*
pi@homeauto /etc/default $

Still doesn’t start at reboot and doesn’t start by issuing

pi@homeauto /etc/default $ sudo ./openhab2 start
So basically no change.

There are multiple things wrong about this command. Sorry to tell you. At this point I’m not sure what might be the problem as you seem to already have changed a lot. Would you consider simply switching over to openHABian? You just have to flash the image onto your SD card and half an hour later you’ll be looking at a working openHAB 2 frontend.

Moving to another OS is one of my options yes.
The copy-paste was from my history so the directory certainly looks a bit odd.

Again, it doesn’t start at reboot.

What I don’t like with starting over from scratch is that multiple others have the same issue, and no one of them is helped by that solution.
I also had a working setup until 1st apt-get upgrade of the year.
So the solution to start from scratch every time the setup stops working is less appealling as it requires a lot of reconfiguration. In my case setting up tellstick all over again and possibly also ther stuff.

Since that breaking upgrade I’ve done purge and taken down the new distro.
And that started fine until I added bindings for tellstick aand zwave.
(I did not reboot at every change. Granted that might have given better fault analysis)

The situation is serious from an OH perspective as there is no possibility to address faults if it chrasches,
as all configuration is done in Paper UI as far as I know.

I see. Okay that’s a valid argument. As only little evidence is there to proceed on, I would try to go as clean as possible, without loosing everything.

  • Make a backup of all files (just copy somewhere): /etc/openhab2, /var/lib/openhab2, /usr/share/openhab2
  • sudo apt-get purge openhab2*
  • delete mentioned folder above (if still available)
  • delete the openhab user
  • sudo apt-get install openhab2
  • restore the important files from the backup (rules, sitemaps, uuid&secret files, jsondb, persistence files, …)
  • start openhab

At this point I would expect your problems to be gone as I did not hear any openHABian users complain about such problems, hence the assumption your installation is buggy (which as you know is to be expected with snapshot builds…)

Good luck! :wink: