Open pax0707 opened 6 years ago
I have the same problem. how can it be solved? please give any solution
As a workaround you can copy contents from one of the other files in the folder
please describe more
I am also having the same problem. On my TV config I have also tried setting the parameter persistState: false however it still appears to be writing the switchState value to disk. The file seems to get corrupted when I disconnect the power to my PI running Homebridge and then reconnect power. The state file then appears to be empty after reboot and must be trying to be read, which is causing the ‘not a valid storage file’ error mentioned above. This error prevents Homebridge from loading.
It would be nice if my home could return to normal state again after a power brown out or such. At the moment this issue will take all my Homebridge connected devices offline, since Homebridge won’t restart. To get Homebridge to restart I then have to terminal into my PI and delete the file which is painful.
I've noticed that if homebridge crashes the file can get corrupted and homebridge fails to start, till I fix this manually.
Any way you can add a check if the file is valid and if it's not create a new one?