Today I added the zwave binding, and installed HABmin to configure the Z-Wave devices.
All was going well until I noticed that none of my rules were firing - the scheduled cron rules were not getting executed, when a state change happened, the rules that should have fired did not.
After a restart everything was working again, so I shrugged it off and started making more changes, and then it happened again.
I was able to figure out that it happens any time that I update my items file, and the refresh triggers, I get this the file that I redirect all the output from starting up openHAB - so not one of the regular log files. I see this:
2015-12-19 21:19:30.753 [INFO ] [c.internal.ModelRepositoryImpl] - Refreshing model ‘default.items’
RXTX fhs_lock() Error: opening lock file: /var/lock/LCK…ttyUSB98: File exists. It is mine
testRead() Lock file failed
ttyUSB98 is an alias created by udev rules for my Aeon Z-Stick Gen5 that I also added today.
The 1.7.1 bindings that I have installed:
- weather
- serial
- myopenhab
I also have installed HABmin 1.7.0, and the 1.8.0 zwave binding - I read somewhere that you need 1.8.0 for Gen5 Aeon Z-Stick, and that was what was also included with HABmin, so I went with it.
The reason that I have the serial binding is for using a MySensors gateway, which is connected at ttyUSB99.
I also have installed a custom action that reads in from a Google calendar, and publishes data from the entries as events - this action does not use the serial ports in any way.
Things that I have tried that have no effect:
- Update the nrjavaserial jar to 3.11.0
- Add the -Dgnu.io.rxtx.SerialPorts param to start.sh
- Downgrade the zwave binding to 1.7.1
- Configure openhab.cfg to use ttyACM0, instead of ttyUSB98
Things that I have tried that make the problem not happen:
- Delete the /var/lock/LCK…ttyUSB98 file manually before touching the items file.
- Don’t ever touch the items file.
Of note is that the LCK…ttyUSB99 file that is created by the serial binding for the MySensors gateway does not cause the same problem.
I do not believe there is a permissions problem, as I am running openhab as root (bad, I know, but I have not been able to make it work properly running as an openhab dedicated service user.)
I noted that the lock file is not re-created after I delete it - maybe this is the best way to fix the problem, just to have a CRON job delete the lock file.
Any suggestions or thoughts are greatly appreciated.