Upgrade from 0.63.2 to 0.63.3 fails repeatedly in Hass.io

I am attaching the message in the log file. I made four attempts today with the same failed status. It indicates a sqlite3.DatabaseError database disk image is malformed and seems to indicate it is in data concerning sun.sun.

After the failure to update, 0.63.2 still works fine.

Any ideas? My attempt to upload a text file failed. So it is shown below inserted into this message. Thanks, Doug

2018-02-19 15:28:53 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-02-19 15:44:30 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: ‘INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (?, ?, ?, ?, ?)’] [parameters: (‘state_changed’, ‘{“entity_id”: “sun.sun”, “old_state”: {“entity_id”: “sun.sun”, “state”: “above_horizon”, “attributes”: {“next_dawn”: “2018-02-20T11:55:50+00:00”, "ne … (744 characters truncated) … “azimuth”: 228.06, “friendly_name”: “Sun”}, “last_changed”: “2018-02-19T20:28:08.511571+00:00”, “last_updated”: “2018-02-19T20:44:30.822838+00:00”}}’, ‘LOCAL’, ‘2018-02-19 20:44:30.822973’, ‘2018-02-19 20:44:30.840824’)] (Background on this error at: http://sqlalche.me/e/4xp6)

Not sure if this will help you but there is a file in the config directory called home-assistant_v2.db you can stop HA and delete this database if required, a new database will be created when re-started however this will lose all of your history.

Thanks, it is nice to know you can do that without killing hassio all together. I have decided to start with a fresh Sandisk 64 Gb class 10 SD card and load it with 0.63.3 and start fresh with what I have learned so far.

I am still having problems with the template language. Using ‘>’ to compare an input numeric and a sensor is not playing nice. I guess more study is called for.

Sounds like a good plan. I often save a snapshot of my installation before doing an upgrade just in case.
The documentation for some of Home Assistant’s features can be a bit confusing at times but the forums are a great source of help.

Try a larger power supply. There are extended writes to flash that can drag down the power supply if it’s a bit weak. I tried swapping flash cards to no avail. Changing out the power supply did the trick after months of struggling with update issues.

1 Like

The supply claims 2.5 amps, so I have not tested it. You have made me curious. I will put a 2.0 amp load on the supply while watching on an oscilloscope. As long as I am at it, I should run the test on all my Pi supplies. I appreciate the advise. :sunglasses: