History and Logbook not updating

It seems my History and Logbook has stopped working. I have tried deleting the db file but that does not work.
I have noticed, that they work right after a reboot, collecting data for something between 1 - 10 minutes, and then they just stop.

Anyone with an idea on how I can resolve this?

Is your disk full?

1 Like

Are there any error messages that approximately correlate to when the recordings stop? This happened to me and I noticed an error about a custom component I had written. I was firing a custom event whose data was not ā€œJSON serializableā€, and that caused the recorder to fail. I changed the event so the data was a string and the problem went away. Your situation is probably different, but there hopefully will be some sort of clue in the log.

Have you reached your maximum number of inodes?

Disk is not full, and I am not quite sure how to check what you are mentioning here with hass.io :confused:

I get an error: Timer got out of sync. Resetting
It seems to be the one triggering the crash of logbook and history

For what itā€™s worth, I see that error from time to time, but it doesnā€™t seem to have any side effects that Iā€™ve noticed. Certainly it doesnā€™t cause the recorder to stop, at least for me.

Would it be of help to set the recorder component in debug mode?

Hmmm. it seems I was to eager to look in the dev log. I actually see that error aswel, just appearing a couple of minutes, after logbook and history die. I have tried removing both custom components, but that did not work. I will try out some different things, and otherwise start looking into debug of recorder. So far, thanks for your input :slight_smile:

I am having this same error.
Also having a component that is not JSON serializableā€¦ but donā€™t know which.
How do I access the dev logs or find out which component?

You can search your homeassistant log file like this which might give you more clues:

grep -C 20 'not JSON serializable' home-assistant.log

I get this:
2018-07-27 00:01:05 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: <Element ā€˜product_airlinkā€™ at 0x6b4e2900> is not JSON serializable
I have no idea what this isā€¦

The -C 20 is meant to output more lines around that exact error message so you can see what happened before and after. Itā€™s probably whatā€™s happening right before that error message that can give you the clue as to what is causing the problem.

FWIW, I searched all my installed python packages and I didnā€™t find anything that has product_airlink in it. Could that be something to do with HomeLink???

Anyway, look at the lines in the log before that error message. Youā€™ll probably see a state change on some component who is the culprit.

Update. Mine fixed itself after updating to 0.75.2

After clean install v0.80.2 I have this kind problemā€¦ difference is just that for me only history is not workingā€¦

This was a bug in 0.80.2 and has been fixed in 0.80.3, which should be out for hassio soon.

Thank youā€¦ Iā€™m pleased to see that I must just wait for update and that nothing is wrong with my settingsā€¦

Hi, Using 0.80.3 after 1 1/2 day having problems with history and logbook.
With error Timer got out of sync. Resetting
Have deleted db.
Now its working again. Will see how long it will last.

I am having the same problem in 80.3. Replaced SD card with new one. No change. If I delete the .db file history will work for a few hours.

The timer got out of sync resetting is the error I get a lot

Iā€™m having this issue. Iā€™m currently on 0.96.4, but I noticed this happening on previous versions in the last few weeks.

Before it used to take a while to show the history, so I could see history from around 12 hours ago and prior, but not after 12 hours ago. Not I donā€™t see any history at all.

What shall I check to diagnose this?