Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log file not updating on dev-info page #4308

Closed
tim-devel opened this issue Nov 8, 2016 · 7 comments
Closed

Log file not updating on dev-info page #4308

tim-devel opened this issue Nov 8, 2016 · 7 comments

Comments

@tim-devel
Copy link

tim-devel commented Nov 8, 2016

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version):
0.32.2

Python release (python3 --version):
3.4.2

Component/platform:
dev-info page.

Description of problem:
home-assistant.log is not being displayed on the dev-info page correctly. The contents of the home-assistant.log file is showing the correct content. But after three restarts and full reboot and manually deleting the home-assistant.log file the front end is still displaying log entries from a previous session. The date and time of the log being shown in the front end coincides with the first time I restarted home assistant while running with 32.2.

Expected:
Correct error log should be shown in front end

Problem-relevant configuration.yaml entries and steps to reproduce:

Contents of home-assistant.log

16-11-08 09:03:00 homeassistant.components.climate.generic_thermostat: Unable to update from sensor: could not convert string to float: 'unknown'
16-11-08 09:03:00 homeassistant.components.climate.generic_thermostat: Unable to update from sensor: could not convert string to float: 'unknown'

Error log displayed in front end:

16-11-07 20:01:29 homeassistant.components.climate.generic_thermostat: Unable to update from sensor: could not convert string to float: 'unknown'
16-11-07 20:01:29 homeassistant.components.climate.generic_thermostat: Unable to update from sensor: could not convert string to float: 'unknown'
16-11-07 20:19:01 homeassistant.helpers.entity: Updating state for sensor.back_room_temp_update_timer took 0.547 seconds. Please report platform to the developers at https://goo.gl/Nvioub
16-11-07 22:11:01 homeassistant.helpers.entity: Updating state for sensor.front_room_temp_update_timer took 0.546 seconds. Please report platform to the developers at https://goo.gl/Nvioub
16-11-07 23:23:01 homeassistant.helpers.entity: Updating state for sensor.back_room_temp_update_timer took 0.543 seconds. Please report platform to the developers at https://goo.gl/Nvioub
16-11-07 23:34:01 homeassistant.helpers.entity: Updating state for sensor.weather_icon took 0.550 seconds. Please report platform to the developers at https://goo.gl/Nvioub
16-11-08 01:48:01 homeassistant.helpers.entity: Updating state for sensor.front_room_temp_update_timer took 0.555 seconds. Please report platform to the developers at https://goo.gl/Nvioub
16-11-08 01:54:01 homeassistant.helpers.entity: Updating state for sensor.transmission_status took 0.535 seconds. Please report platform to the developers at https://goo.gl/Nvioub
16-11-08 02:17:22 pychromecast.socket_client: Heartbeat timeout, resetting connection
16-11-08 02:17:23 pychromecast.socket_client: Failed to connect, retrying in 5.000000s
Traceback (most recent call last):
  File "/home/pi/.homeassistant/deps/pychromecast/socket_client.py", line 239, in initialize_connection
    self.socket.connect((self.host, self.port))
  File "/usr/lib/python3.4/ssl.py", line 840, in connect
    self._real_connect(addr, False)
  File "/usr/lib/python3.4/ssl.py", line 827, in _real_connect
    socket.connect(self, addr)
ConnectionRefusedError: [Errno 111] Connection refused
16-11-08 03:02:04 homeassistant.components.switch.orvibo: Error while fetching S20 state
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/switch/orvibo.py", line 91, in update
    self._state = self._s20.on
  File "/home/pi/.homeassistant/deps/orvibo/s20.py", line 154, in on
    return self._subscribe()
  File "/home/pi/.homeassistant/deps/orvibo/s20.py", line 206, in _subscribe
    "No status could be found for {}".format(self.host))
orvibo.s20.S20Exception: No status could be found for 192.168.0.21
16-11-08 03:03:33 homeassistant.components.switch.orvibo: Error while fetching S20 state
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/switch/orvibo.py", line 91, in update
    self._state = self._s20.on
  File "/home/pi/.homeassistant/deps/orvibo/s20.py", line 154, in on
    return self._subscribe()
  File "/home/pi/.homeassistant/deps/orvibo/s20.py", line 206, in _subscribe
    "No status could be found for {}".format(self.host))
orvibo.s20.S20Exception: No status could be found for 192.168.0.21

Traceback (if applicable):

Additional info:

@pvizeli
Copy link
Member

pvizeli commented Nov 8, 2016

Delete the log file and make a reboot.

@lukasmrtvy
Copy link

Deleting and rebooting does not help, at least in docker version

@tim-devel
Copy link
Author

I have also tried deleting and rebooting and it didn't work

@radeonorama
Copy link

radeonorama commented Nov 8, 2016

Same issue here running on windows with Python 3.5.2

Edit: must be some sort of caching issue as switching to a browser that's never loaded HA shows the correct log.

@Molodax
Copy link

Molodax commented Nov 8, 2016

I'd like to confirm the same issue with my HASS running on Windows in different browsers (Chrome desktop and mobile), Edge.

@arraylabs
Copy link
Contributor

Clearing the browser cache will show the same contents as the .log file. Just ran into this issue earlier. With that said I have never had to clear the browser cache with version < .32 in the past.

@Chris-V
Copy link
Contributor

Chris-V commented Nov 11, 2016

As mentioned by @arraylabs, doing a hard refresh (ctrl + shift + r) will show the appropriate content. When inspecting the responses from HASS in chrome, I can see this header:

Cache-Control:public, max-age=2678400

I reconfigured my nginx to strip it away and now everything is fresh when I request it. I don't know where the cache is configured in home assistant, but imo it should not include anything under /api. Or event better, make it Cache-Control: private.

Edit: Found that https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/http.py#L202-L206 which comes from #3914

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants