Port dev/ttyAMA0 does not exist

Hey,

I hope some of you can help me. I try to use z-wave and therefore I bougt for my Raspberry the Razberry Module. I installed zway and it runs.
But with habmin I get the information:

Port dev/ttyAMA0 does not exist

Here an extract from the logfile:

org.openhab.binding.zwave.internal.protocol.SerialInterfaceException: Port dev/ttyAMA0 does not exist
at org.openhab.binding.zwave.internal.protocol.ZWaveController.connect(ZWaveController.java:430)
at org.openhab.binding.zwave.internal.protocol.ZWaveController.(ZWaveController.java:155)
at org.openhab.binding.zwave.internal.ZWaveActiveBinding.initialise(ZWaveActiveBinding.java:285)
at org.openhab.binding.zwave.internal.ZWaveActiveBinding.updated(ZWaveActiveBinding.java:401)
at org.eclipse.equinox.internal.cm.ManagedServiceTracker$1.run(ManagedServiceTracker.java:183)
at org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(SerializedTaskQueue.java:36)
Caused by: gnu.io.NoSuchPortException
at gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:273)
at org.openhab.binding.zwave.internal.protocol.ZWaveController.connect(ZWaveController.java:409)
… 5 more

I read some topics here in this forum but I couldn’ solve this problem. Something is going wrong but I don’t know what.

I there anyone who had the same problem and could solve it?

Hi,

let’s start with the basics, shall we? Do you actually have a /dev/ttyAMA0 port?

ls -la /dev/ttyAMA0

Do you have a /dev/ttyS0 (first physical serial interface)?

ls -la /dev/ttyS0

And, to be sure, post the loaded kernel modules here:

lsmod

I don’t know about the software, but I guess you can set the device node in the configuration that it should use. If not, you can try symlinking the existing node to the expected node:

ln -s /dev/ttyS0 /dev/ttyAMA0

Cheers,

Pel

It should be…
/dev/ttyAMA0

Well spotted, @chris:blush:

Thanks for all the answers. I did th exerzise from pelnet with the following results:

I am logged in as pi.

pi@raspberrypi ~ $ ls -la /dev/ttyAMA0
crw-rw---- 1 root tty 204, 64 Jan 10 17:26 /dev/ttyAMA0

pi@raspberrypi ~ $ ls -la /dev/ttyS0
ls: cannot access /dev/ttyS0: No such file or directory

pi@raspberrypi ~ $ lsmod
Module Size Used by
cfg80211 419759 0
rfkill 16659 1 cfg80211
snd_bcm2835 19739 0
snd_pcm 74833 1 snd_bcm2835
snd_seq 53470 0
snd_seq_device 3650 1 snd_seq
snd_timer 18164 2 snd_pcm,snd_seq
snd 52116 5 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device
bcm2835_gpiomem 3023 0
uio_pdrv_genirq 2966 0
uio 8228 1 uio_pdrv_genirq

pi@raspberrypi ~ $ ln -s /dev/ttyS0 /dev/ttyAMA0
ln: failed to create symbolic link/dev/ttyAMA0’: File exists`

I hope it helps to find the mistake.

Uh, yes, that error is ‘correct’ - you have a /dev/ttyAMA0.

My guess is, the user that your application is running as is not root or a member of the tty group. I guess the best practice is to add the user to the tty group, but maybe the application is intended to run as root?

Hi pelnet,

sorry, I am a beginner only. How do I add the user “openhab” to the tty group?

Hey, no worries.

Depending on your distro it should be something like this:

usermod -G tty openhab

You will need to kill the process running as the user before any changes take effect as membership is only evaluated at login. Check that your openhab user now has the correct membership:

su openhab -c "id"

and ‘tty’ should be listed among them with the respective gid (5 on Debian).

oho,

I did the
usermod -G tty openhab
It seems to run.

But I have problems with:
su openhab -c "id"
The sytem ask for a password but it don’t run. The password is correct,because I need this passwort for my Samba access, but also after a reboot, when I try to login as user “openhab” I get no access.

Is this the problem?

Well, first of all, congrats, you fixed your problem :grinning:

That you cannot use the su command is odd, but can be caused by many things. You are doing this as root, right?

If your openhab user doesn’t have a proper shell configured, try

su openhab -s /bin/bash -c "id"

I did it with the same result:
logged in as pi.

pi@raspberrypi ~ $ su openhab -s /bin/bash -c "id"
Password:
su: Authentication failure

Judging by your prompt, you’re not doing this as root. As your problem is resolved, it doesn’t really matter, but you should become root (su, sudo su, … ) and then run the command. The command is effectively running id as the openhab user, which you cannot impersonate by default when you’re pi.

Thanx all of you. I’m not really sure but I think it runs. But now I have the next problem. I try ti incluse some z-wave device but unfortunately without any success. Do there exist a kind of logfile or whatever else what can indicate what’s going wrong.

By the way, within the openhab log I see some messages. Are these messages important?

!SESSION 2016-01-11 22:17:20.543 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=arm, WS=gtk, NL=en_US
Command-line arguments: -data /var/lib/openhab/workspace -console 5555

!ENTRY org.eclipse.equinox.ds 4 0 2016-01-11 22:26:26.619
!MESSAGE Could not bind a reference of component org.openhab.core.itemregistry. The reference is: Reference[name = ItemProvider, interface = org.openhab.core.items.ItemProvider, policy = dynamic, cardinality = 0…n, target = null, bind = addItemProvider, unbind = removeItemProvider]

!ENTRY org.eclipse.equinox.ds 4 0 2016-01-11 22:26:26.622
!MESSAGE Could not bind a reference of component org.openhab.core.itemregistry. The reference is: Reference[name = ItemProvider, interface = org.openhab.core.items.ItemProvider, policy = dynamic, cardinality = 0…n, target = null, bind = addItemProvider, unbind = removeItemProvider]

!ENTRY org.eclipse.equinox.ds 4 0 2016-01-11 22:26:26.792
!MESSAGE Could not bind a reference of component org.openhab.core.persistence.extensions. The reference is: Reference[name = PersistenceService, interface = org.openhab.core.persistence.PersistenceService, policy = dynamic, cardinality = 0…n, target = null, bind = addPersistenceService, unbind = removePersistenceService]

!ENTRY org.eclipse.equinox.ds 4 0 2016-01-11 22:26:26.793
!MESSAGE Could not bind a reference of component org.openhab.core.persistence.extensions. The reference is: Reference[name = PersistenceService, interface = org.openhab.core.persistence.PersistenceService, policy = dynamic, cardinality = 0…n, target = null, bind = addPersistenceService, unbind = removePersistenceService]

!ENTRY org.eclipse.equinox.ds 4 0 2016-01-11 22:26:31.647
!MESSAGE Could not bind a reference of component org.openhab.core.persistence.manager. The reference is: Reference[name = PersistenceService, interface = org.openhab.core.persistence.PersistenceService, policy = dynamic, cardinality = 0…n, target = null, bind = addPersistenceService, unbind = removePersistenceService]

!ENTRY org.eclipse.equinox.ds 4 0 2016-01-11 22:26:31.648
!MESSAGE Could not bind a reference of component org.openhab.core.persistence.manager. The reference is: Reference[name = PersistenceService, interface = org.openhab.core.persistence.PersistenceService, policy = dynamic, cardinality = 0…n, target = null, bind = addPersistenceService, unbind = removePersistenceService]

!ENTRY org.eclipse.equinox.ds 4 0 2016-01-11 22:26:47.714
!MESSAGE Could not bind a reference of component org.openhab.ui.chart. The reference is: Reference[name = ChartProvider, interface = org.openhab.ui.chart.ChartProvider, policy = dynamic, cardinality = 0…n, target = null, bind = addChartProvider, unbind = removeChartProvider]

!ENTRY org.eclipse.equinox.ds 4 0 2016-01-11 22:26:47.716
!MESSAGE Could not bind a reference of component org.openhab.ui.chart. The reference is: Reference[name = ChartProvider, interface = org.openhab.ui.chart.ChartProvider, policy = dynamic, cardinality = 0…n, target = null, bind = addChartProvider, unbind = removeChartProvider]

!ENTRY org.eclipse.equinox.ds 4 0 2016-01-11 22:26:47.746
!MESSAGE Could not bind a reference of component org.openhab.ui.chart.defaultprovider. The reference is: Reference[name = PersistenceService, interface = org.openhab.core.persistence.PersistenceService, policy = dynamic, cardinality = 0…n, target = null, bind = addPersistenceService, unbind = removePersistenceService]

!ENTRY org.eclipse.equinox.ds 4 0 2016-01-11 22:26:47.747
!MESSAGE Could not bind a reference of component org.openhab.ui.chart.defaultprovider. The reference is: Reference[name = PersistenceService, interface = org.openhab.core.persistence.PersistenceService, policy = dynamic, cardinality = 0…n, target = null, bind = addPersistenceService, unbind = removePersistenceService]

!ENTRY org.eclipse.equinox.ds 4 0 2016-01-11 22:26:47.874
!MESSAGE Could not bind a reference of component org.openhab.ui.webapp.pagerenderer. The reference is: Reference[name = WidgetRenderer, interface = org.openhab.ui.webapp.render.WidgetRenderer, policy = dynamic, cardinality = 0…n, target = null, bind = addWidgetRenderer, unbind = removeWidgetRenderer]

!ENTRY org.eclipse.equinox.ds 4 0 2016-01-11 22:26:47.875
!MESSAGE Could not bind a reference of component org.openhab.ui.webapp.pagerenderer. The reference is: Reference[name = WidgetRenderer, interface = org.openhab.ui.webapp.render.WidgetRenderer, policy = dynamic, cardinality = 0…n, target = null, bind = addWidgetRenderer, unbind = removeWidgetRenderer]

!ENTRY org.eclipse.equinox.ds 4 0 2016-01-11 22:26:54.228
!MESSAGE Could not bind a reference of component org.openhab.io.habmin.servlet. The reference is: Reference[name = PersistenceService, interface = org.openhab.core.persistence.PersistenceService, policy = dynamic, cardinality = 0…n, target = null, bind = addPersistenceService, unbind = removePersistenceService]

!ENTRY org.eclipse.equinox.ds 4 0 2016-01-11 22:26:54.229
!MESSAGE Could not bind a reference of component org.openhab.io.habmin.servlet. The reference is: Reference[name = PersistenceService, interface = org.openhab.core.persistence.PersistenceService, policy = dynamic, cardinality = 0…n, target = null, bind = addPersistenceService, unbind = removePersistenceService]

!ENTRY org.eclipse.equinox.ds 4 0 2016-01-11 22:26:54.231
!MESSAGE Could not bind a reference of component org.openhab.io.habmin.servlet. The reference is: Reference[name = ConfigurationService, interface = org.openhab.binding.zwave.internal.config.OpenHABConfigurationService, policy = dynamic, cardinality = 0…n, target = null, bind = addConfigurationService, unbind = removeConfigurationService]

!ENTRY org.eclipse.equinox.ds 4 0 2016-01-11 22:26:54.232
!MESSAGE Could not bind a reference of component org.openhab.io.habmin.servlet. The reference is: Reference[name = ConfigurationService, interface = org.openhab.binding.zwave.internal.config.OpenHABConfigurationService, policy = dynamic, cardinality = 0…n, target = null, bind = addConfigurationService, unbind = removeConfigurationService]

Is there someone who can help me? I can do whaterver I want but I can’t include any z-wave device. What can I do to separate the mistake

Hi, well at least you can see your controller… I´m not even that far :-(. I´m also brand new to the zwave stuff and also using the module. With Razberry software it is working and i included my fibaro RGBW module. But in Openhab I can´t even get the controller in.

May the z-wave be with you… I know not a helping post, but at least you know you are not alone :slight_smile:

Greetz

Wizzo

Make sure the Z wave device you’re trying to join has not already been joined to another network.
The Z wave nodes store information about the Z wave controller. If the Z wave controller is reset, the joining is lost and must be unjoined then rejoined.

Does that help?

Hi,

can anyone help me out here? Still facing the issue “Port dev/ttyAMA0 does not exist” with my razberry.
The port seems to exist
ls -la /dev/ttyAMA0
crw-rw-rw- 1 root dialout 204, 64 Apr 3 01:27 /dev/ttyAMA0
These are the members of group dialout:
grep dialout /etc/group
dialout:x:20:pi,openhab

and group tty
grep tty /etc/group
tty:x:5:openhab,pi
What am I still missing here?

Nearly same issue here:

grep dialout /etc/group provides “dialout:x:20:pi,openhab”
but
grep tty /etc/group provides “tty:x:5:”
and > ls /dev/tty* provides “… /dev/ttyAMA0 …”

If you want to add multiple users to the groups, you have to add ‘-a’ parameter as ‘append’. Otherwise a second group change will remove the first user from that group.

sudo usermod -a -G tty openhab
sudo usermod -a -G tty pi
sudo usermod -a -G dialout openhab
sudo usermod -a -G dialout pi

In these commands the ‘-a’ makes the difference whether afterwards you have one or two users in the respective groups.

Setting these groups for both users and doing a reboot solved the issue for me. The device was found by the binding correctly.

Hello all:
I am having this same issue. And think I have tried everything! I am using a PC with Ububtu 16.10 and an AEON Z-Stick Gen 5.

The stick shows as ttyACM0 (different from th pi AMA0) but that seems to be the only difference in the posts I’ve been reading.

So Far:

john@Server:~$ grep tty /etc/group
tty:x:5:openhab,john

And

john@Server:~$ grep dialout /etc/group
dialout:x:20:john,openhab

But:

john@Server:~$  ls -l /dev/ttyA*
crw-rw---- 1 root dialout 166, 0 Mar 13 12:44 /dev/ttyACM0

I aslo did other things I found in other posts. I added a JAVA environment variable to the karaf script and to the start.sh as well. Nothing has worked!

To be fair I did get it to work at one time (a couple weeks ago) but after a power failure and reboot it never came back.
At that point I was reading about others who couldn’t get their dialout setting to “stick”. It does not appear that that is my problem any more.

Thank you for any ideas!