Every now and then it seems HASS is running fine but detailed information isn’t updated. When I check the “States” screen all data is up to date, but when you click any of the sensors the graph hasn’t been updated for a while and same for the history or logbook pages.
Tried to check the error logs but nothing weird there. Only thing which helps is restarting the service.
Would anyone have ideas? I am running HASS on a Raspberry Pi.
Been having the same problem for a while now, no logs or history to speak of.
Restarting the service does not solve this for me, nor does restarting the device (also running on a Pi).
I tried deleting the home-assistant.db & home-assistant.log files to force recreation in case they are relevant, but no luck.
I think it broke during the last update a couple of weeks ago, but i’m not entirely sure. It was definitely working with earlier builds, but it could be something completely different.
Not much. It loads for a bit before saying no entries found.
Stopping and restarting does not affect these at all - they remain empty completely.
Apart from that everything is going perfectly fine, all values update, automations run etc, so it’s definitely something to do with the record keeping.
Do both history and logbook depend on a single function, or are they separate?
In case anyone else is having this issue, it resolved itself following a big overhaul of my config structure over the weekend.
I don’t know exactly what fixed it, but i replaced my config file with a much more modular set of files using !include calls.
Somewhere in the process of building the new files, history and logbook came back online.
Interestingly, all my older history and logs are accessible, only the days where the problem was in effect are missing.
I didn’t touch the logbook & history entries in the config file, so i have no idea what fixed it - clearly something in the config file was tripping it up.
I’ve been having the same problem, but even with a fresh install of HA on a new copy of raspbian it’s happening. I’ve just got the default config in place, and while it initially showed log entries now I get none and the history graph shows the error “Invalid data at row #0: start(Wed Apr 27 2016 00:56:00 GMT-0400 (Eastern Daylight Time)) > end(Tue Apr 26 2016 20:33:34 GMT-0400 (Eastern Daylight Time)).”
This seems like some sort of sqllite issue but I’m not sure how to debug it.
I did an integrity check on the sqlite db, it looks fine and I can confirm that there’s data in there.
It’s worth mentioning that last time it worked, it was before midnight GMT. Now it’s a bit after. I wonder if there’s something off with how the date query is run… maybe it’s legitimately not picking anything up?
I’ve turned on debug logging, but unfortunately recorder.py just logs the queries, not the data that’s sent with them. I did a fairly crude modification of recorder.py to log the data along with it, will let you know if I find anything.
Edit: I’m pretty sure this is it. Here’s the date object sent:
datetime.datetime(2016, 4, 27, 4, 56, tzinfo=)
Except it’s only 2:10 AM UTC right now. Between midnight and 5am UTC the log won’t pull anything up.
It would probably make sense for the graphs to show the last 24 hours, rather than go by the calendar date.
the reporter of that issue is ahead of UTC, which would explain why they need to pass in yesterday’s date to see anything.
edit: as expected, logbook and history are working again this morning (~noon UTC). Still working on getting a dev environment set up but I’m wondering if there’s some mistranslation of local time to UTC happening. I’m UTC-5, and conspicuously all the times called are a few minutes shy of 5am UTC. I’m wondering if the logbook and history are attempting to come up with midnight local time, but due to the fact that I’m behind UTC it’s coming up with midnight tomorrow during the 5 hours where it’s “yesterday” here.
I sat down to try to work on this today, but unfortunately the frontend stuff is a little out of my wheelhouse. I’m reading up on it but I’m guessing someone else will have it patched long before I get up to speed, since it’s a pretty simple bug.
Same issue in my HA. Log:
17-01-05 15:19:44 aiohttp.server: Error handling request
Traceback (most recent call last):
File “/home/hass/.homeassistant/deps/aiohttp/web_server.py”, line 61, in handle_request
resp = yield from self._handler(request)
File “/home/hass/.homeassistant/deps/aiohttp/web.py”, line 249, in _handle
resp = yield from handler(request)
File “/usr/lib/python3.4/asyncio/coroutines.py”, line 143, in coro
res = yield from res
File “/usr/lib/python3.4/asyncio/coroutines.py”, line 143, in coro
res = yield from res
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/http/init.py”, line 427, in handle
result = yield from result
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/history.py”, line 240, in get
self.filters)
File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/history.py”, line 70, in get_significant_states
states = recorder.get_model(‘States’)
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/recorder/init.py”, line 129, in get_model
from homeassistant.components.recorder import models
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/recorder/models.py”, line 7, in
from sqlalchemy import (Boolean, Column, DateTime, ForeignKey, Index, Integer,
ImportError: cannot import name ‘Boolean’