Thank you Sasha for your input, I think you point in the right direction!
I checked /var/lock and it turned out that there were three file in this directory: “Asound.state.lock”, “LCK…ttyAMA0”, “LCK…ttyS0”. I removed both LCK files (with “sudo rm LCK…ttyAMA0” ) and let the Asound file untouched. After stopping (and automatically starting Openhab?) both files were back. So I think it can’t be done manually? Or do I something wrong? As I pointed out, I’m not a Linux guru.
Then I followed your solution:
I made the files, in fact I copied your phrases and changed the filename as you can see. When
it’s working the next question: is it possible to delete both lock files in one clear-locks.sh file? How to?
@Anne have you created onstart.rules?
What do you see in logs?
your bash script has to be:
ttyAMA0file="/var/lock/LCK..ttyAMA0"
if [ -f "$ttyAMA0file" ] ; then
rm "$ttyAMA0file"
fi
ttyS0file="/var/lock/LCK..ttyS0"
if [ -f "$ttyS0file" ] ; then
rm "$ttyS0file"
fi
So it didn’t work. I decided to start a fresh instance with a new memory card but on the same RPI and with the same RFXcom and ZWave stick. Both were recognized by the bindings and I could assign the ports ttyUSB0 to the RFXcom and ttyACM0 to the ZWvave stick. Mind you: this are the same ports as that were used before I broke Openhab (see my first post).
And it works! That is why I decided to put no further effort in fixing the broken installation. I’m very grateful to all of you who were trying to help me out and solve this annoying problem.