Closed attzonko closed 7 years ago
I've never lost devices from rebooting. Just have to restart the service.
Thanks for the comment @notanatheist that helps me understand my issue better. So my guess is that it stores the devices on the hard disk somewhere. And because I am using this on my NAS which uses a ram disk for the OS that file is getting lost on a reboot. Any ideas what file or where it is being stored, and if it is possible to provide a custom path?
Ok I figured it out. The elasticsearch data store was being created straight of of '/' as /data/elasticsearch. This was because I was executing the jar in a separate screen session with:
/opt/sbin/screen -d -m -S amazon_bridge java -jar /share/MD0_DATA/custom/amazon-echo-ha-bridge/amazon-echo-bridge-0.2.1.jar --upnp.config.address=10.0.1.192 --server.port=8083
The fix for me was to first change the working directory and then execute the jar:
/opt/sbin/screen -d -m -S amazon_bridge -- sh -c "cd /share/MD0_DATA/custom/amazon-echo-ha-bridge && java -jar /share/MD0_DATA/custom/amazon-echo-ha-bridge/amazon-echo-bridge-0.2.1.jar --upnp.config.address=10.0.1.192 --server.port=8083"
It seems that the device list gets lost when the machine running the bridge is rebooted.
Is there any way to preserve the device list across a reboot? Is there a directory which has the device data?