I have 1.8 installed on my ubuntu machine. This morning something happened and openhab just quit. I checked the openhab logs, the system, dmesg, all over. Nothing looked out of the ordinary. It just quit. I restarted it and all was happy again. Very odd, but this poses the question for me. How can I have openhab just restart? It looks like upstart has a respawn option, but installing from the deb (which I love) uses init.d.
Anyone have any suggestions? Hoping there is a clean easy way without having to install more complicated systems on top of it just to restart.
I have also implemented a watchdog, to restart openHAB if there are no new updates comming via z-wave. However this watchdog does not help, when openhab freezes with /dev/ttyACM0: No such file or directory in a log. On my machine it requires reboot.
I will check if usb reset would help, but it is not easy to test, as the error condition (luckily) appears really rarely.
Below is C code to reset usb bus given as an command line argument by sending USBDEVFS_RESET to the special file. I use it to clear stalled UPS monitoring connection.
Usage usbreset /dev/bus/usb/001/003 where parameters after usb denote bus and device obtained from lsusb.