Alexa Skill V3 search devices -> openHAB Error

Hello,

I’m running Openhabian 2.5.2-1 with myopenHAB and Alexa Skill V3. Worked fine for over a year.

Lately when I start a new device search on my Alexa, openHAB log shows following error and doens’t find any newly added devices. Old devices are still listed though.

[ERROR] [.service.ConfigurableServiceResource] - Cannot get configuration for service org.eclipse.smarthome.core.i18nprovider:

java.io.IOException: Permission denied

at java.io.UnixFileSystem.createFileExclusively(Native Method) ~[?:1.8.0_222]
at java.io.File.createTempFile(File.java:2024) ~[?:1.8.0_222]
at org.apache.felix.cm.file.FilePersistenceManager._store(FilePersistenceManager.java:733) ~[?:?]
at org.apache.felix.cm.file.FilePersistenceManager.store(FilePersistenceManager.java:691) ~[?:?]
at org.apache.felix.cm.impl.persistence.CachingPersistenceManagerProxy.store(CachingPersistenceManagerProxy.java:291) ~[?:?]
at org.apache.felix.cm.impl.ConfigurationImpl.storeNewConfiguration(ConfigurationImpl.java:539) ~[?:?]
at org.apache.felix.cm.impl.ConfigurationImpl.<init>(ConfigurationImpl.java:231) ~[?:?`

What version of Alexa binding are you using and please post your configuration for the items with issue.

Thanks for your answer.

I’m not using a binding.
I’m using this skill on my alexa, that connects Alexa with openhab through the myopenHAB.org:
https://www.openhab.org/docs/ecosystem/alexa/

I don’t think this error is caused by a specific item or at least I can’t identify it by this error.
Even if I restore an older .items file, it doesn’t work anymore, so it might be caused by an update.

My items are defined like this:
Switch Garten_Power_Brunnen “Brunnen” (Garten_Power) {knx=“2/0/3”, alexa=“Switchable” }
Switch Garten_Light_All “Gartenbeleuchtung” (Garten_Lights, gLights) {knx=“0/0/5”, alexa=“Lighting”}

V3 skill will also work with V2 syntax so maybe try using V2 and see if they are discovered?

I’ve finally fixed it. It had nothing to do with the skill itself, by with a permission issue of openhab.

I used “Fix Permissions” in the openhabian config-menu to fix this issue. Now it’s working again!

The option “Fix Permissions” runs following commands:

$ adduser openhab audio
$ adduser openhabian audio
$ adduser openhab bluetooth
$ adduser openhabian bluetooth
$ adduser openhab dialout
$ adduser openhabian dialout
$ adduser openhab gpio
$ adduser openhabian gpio
$ adduser openhab tty
$ adduser openhabian tty
$ adduser openhabian openhab
$ chown openhab:openhab /srv /srv/README.txt /opt
$ chmod ugo+w /srv /srv/README.txt
$ chown -R openhab:openhab /etc/openhab2 /var/lib/openhab2 /var/log/openhab2 /usr/share/openhab2
$ chmod -R ug+wX /opt /etc/openhab2 /var/lib/openhab2 /var/log/openhab2 /usr/share/openhab2
$ chown -R openhabian:openhabian /home/openhabian
$ setfacl -R --remove-all /etc/openhab2 /var/lib/openhab2 /var/log/openhab2 /usr/share/openhab2
$ setfacl -R -m g::rwX /etc/openhab2 /var/lib/openhab2 /var/log/openhab2 /usr/share/openhab2
$ setfacl -R -m d:g::rwX /etc/openhab2 /var/lib/openhab2 /var/log/openhab2 /usr/share/openhab2

1 Like