Home assistant failing to start after 0.85.1 (docker) - point?

I moved over to a docker setup for home assistant over a month ago after using HASSIO for over a year. Things have been running ok, but I restarted the container earlier after trying to add my google cast devices, and now home assistant wont start.

First thing I did was obviously to remove my changes, but still no luck.
Other things I have tried;

  • Commenting out all sensors, device_tracker, other items I have added recently
  • deleting the 0.85.1 container and forcing to 0.85.0
  • Took down / back up all my containers (using docker-compose)
  • Rebooted my ubuntu server
  • deleted by home-assistant_v2.db

In the logs it says about point (I have two points), but i have removed those from the config and even switched them off, but still get the same.

Logs as follows:

2019-01-18 18:34:30 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 350, in _async_add_entity
    await entity.async_added_to_hass()
  File "/usr/src/app/homeassistant/components/point/__init__.py", line 240, in async_added_to_hass
    self._update_callback()
  File "/usr/src/app/homeassistant/components/sensor/point.py", line 58, in _update_callback
    self._value = self.device.sensor(self.device_class)
  File "/usr/local/lib/python3.6/site-packages/pypoint/__init__.py", line 217, in sensor
    return self._session.read_sensor(self.device_id, sensor_type)
  File "/usr/local/lib/python3.6/site-packages/pypoint/__init__.py", line 114, in read_sensor
    return res.get('values')[-1].get('value')
IndexError: list index out of range
2019-01-18 18:34:30 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 350, in _async_add_entity
    await entity.async_added_to_hass()
  File "/usr/src/app/homeassistant/components/point/__init__.py", line 240, in async_added_to_hass
    self._update_callback()
  File "/usr/src/app/homeassistant/components/sensor/point.py", line 58, in _update_callback
    self._value = self.device.sensor(self.device_class)
  File "/usr/local/lib/python3.6/site-packages/pypoint/__init__.py", line 217, in sensor
    return self._session.read_sensor(self.device_id, sensor_type)
  File "/usr/local/lib/python3.6/site-packages/pypoint/__init__.py", line 114, in read_sensor
    return res.get('values')[-1].get('value')
IndexError: list index out of range
2019-01-18 18:34:30 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 350, in _async_add_entity
    await entity.async_added_to_hass()
  File "/usr/src/app/homeassistant/components/point/__init__.py", line 240, in async_added_to_hass
    self._update_callback()
  File "/usr/src/app/homeassistant/components/sensor/point.py", line 58, in _update_callback
    self._value = self.device.sensor(self.device_class)
  File "/usr/local/lib/python3.6/site-packages/pypoint/__init__.py", line 217, in sensor
    return self._session.read_sensor(self.device_id, sensor_type)
  File "/usr/local/lib/python3.6/site-packages/pypoint/__init__.py", line 114, in read_sensor
    return res.get('values')[-1].get('value')
IndexError: list index out of range
2019-01-18 18:34:30 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 350, in _async_add_entity
    await entity.async_added_to_hass()
  File "/usr/src/app/homeassistant/components/point/__init__.py", line 240, in async_added_to_hass
    self._update_callback()
  File "/usr/src/app/homeassistant/components/sensor/point.py", line 58, in _update_callback
    self._value = self.device.sensor(self.device_class)
  File "/usr/local/lib/python3.6/site-packages/pypoint/__init__.py", line 217, in sensor
    return self._session.read_sensor(self.device_id, sensor_type)
  File "/usr/local/lib/python3.6/site-packages/pypoint/__init__.py", line 114, in read_sensor
    return res.get('values')[-1].get('value')
IndexError: list index out of range
2019-01-18 18:34:30 ERROR (SyncWorker_0) [concurrent.futures] exception calling callback for <Future at 0x7f13f9702048 state=finished returned NoneType>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/_base.py", line 324, in _invoke_callbacks
    callback(self)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 417, in _call_set_state
    dest_loop.call_soon_threadsafe(_set_state, destination, source)
  File "uvloop/loop.pyx", line 1256, in uvloop.loop.Loop.call_soon_threadsafe
  File "uvloop/loop.pyx", line 601, in uvloop.loop.Loop._call_soon
  File "uvloop/loop.pyx", line 605, in uvloop.loop.Loop._call_soon_handle
  File "uvloop/loop.pyx", line 634, in uvloop.loop.Loop._check_closed
RuntimeError: Event loop is closed
2019-01-18 18:34:30 ERROR (SyncWorker_6) [concurrent.futures] exception calling callback for <Future at 0x7f13bed44d30 state=finished raised RuntimeError>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/hive.py", line 83, in setup
    load_platform(hass, ha_type, DOMAIN, hivedevice, config)
  File "/usr/src/app/homeassistant/helpers/discovery.py", line 130, in load_platform
    hass_config))
  File "/usr/src/app/homeassistant/core.py", line 245, in add_job
    self.loop.call_soon_threadsafe(self.async_add_job, target, *args)
  File "uvloop/loop.pyx", line 1256, in uvloop.loop.Loop.call_soon_threadsafe
  File "uvloop/loop.pyx", line 601, in uvloop.loop.Loop._call_soon
  File "uvloop/loop.pyx", line 605, in uvloop.loop.Loop._call_soon_handle
  File "uvloop/loop.pyx", line 634, in uvloop.loop.Loop._check_closed
RuntimeError: Event loop is closed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/_base.py", line 324, in _invoke_callbacks
    callback(self)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 417, in _call_set_state
    dest_loop.call_soon_threadsafe(_set_state, destination, source)
  File "uvloop/loop.pyx", line 1256, in uvloop.loop.Loop.call_soon_threadsafe
  File "uvloop/loop.pyx", line 601, in uvloop.loop.Loop._call_soon
  File "uvloop/loop.pyx", line 605, in uvloop.loop.Loop._call_soon_handle
  File "uvloop/loop.pyx", line 634, in uvloop.loop.Loop._check_closed
RuntimeError: Event loop is closed
2019-01-18 18:34:30 ERROR (SyncWorker_2) [concurrent.futures] exception calling callback for <Future at 0x7f13bd358358 state=finished returned NoneType>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/_base.py", line 324, in _invoke_callbacks
    callback(self)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 417, in _call_set_state
    dest_loop.call_soon_threadsafe(_set_state, destination, source)
  File "uvloop/loop.pyx", line 1256, in uvloop.loop.Loop.call_soon_threadsafe
  File "uvloop/loop.pyx", line 601, in uvloop.loop.Loop._call_soon
  File "uvloop/loop.pyx", line 605, in uvloop.loop.Loop._call_soon_handle
  File "uvloop/loop.pyx", line 634, in uvloop.loop.Loop._check_closed
RuntimeError: Event loop is closed

Any ideas? If it is a point issue, can I prevent it from trying to load it?

I’m not sure if it will work but I think if you rename your old configuration.yaml file to something else (I would use configuration.yaml.old) then restart the HA container it should recreate a default configuration.yaml file and it will, hopefully, reload and you will get a frontend to display.

Then if that works you can start copying stuff from your “.old” file one section at a time and see where it fails. then at least you have a starting point to troubleshoot from.

Thanks finity; tried that but still no luck. Same error. Really scratching my head on this one…

so you renamed your old configuration yaml and restarted? and then the container created a new, almost empty, default configuration.yaml file? and you are still getting the exact same errors as above?

If that’s the case then I would copy the contents of your old configuration directory to a backup location, remove the old container, completely delete the contents of your old config directory and recreate the container with a completely default config. then start adding stuff back from there.

Ok, moved the folder, deleted the HA docker image and started again and it seems to start ok. Guess I’ll just keep adding my old config and see what sticks. Thanks finity

1 Like

Have exactly the same issue and also own 3 minut points…
Any news on what might be causing it and how to make sure HA doesn’t load point (temporarily)?

It looks like, even with a completely empty config file, HA is still loading components which are configured via the ‘integrations’ tab. Any clue how to ‘forget’ these?

As mentioned, I just wiped everything and started fresh, but after doing a bit of research I believe its down to the contents of your .storage folder within you config folder. If you find the points in one of the “core.X” files in there and remove it might work again? I have left my points all off for now because I don’t have time to work through the problem right now, but I plan on powering them back up soon and doing more investigation.

Hope you manage to fix it

Thanks, that indeed fixed it!
Keeping my points off HA for a while as well.

It looks like you have an issue connection to the point-cloud and therefore are res.get('values') empty in pypoint/__init__.py", line 114. It should of course be a test for the length of that, so I’ll try to update the pypoint library.

There have been some fixes for point that reached the 0.86 release. It would be interesting to see if they fixes the issues you have.

Just for reference, these are the errors I got:

2019-02-07 06:11:24 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 350, in _async_add_entity
    await entity.async_added_to_hass()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/point/__init__.py", line 240, in async_added_to_hass
    self._update_callback()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/point.py", line 58, in _update_callback
    self._value = self.device.sensor(self.device_class)
  File "/usr/local/lib/python3.6/site-packages/pypoint/__init__.py", line 217, in sensor
    return self._session.read_sensor(self.device_id, sensor_type)
  File "/usr/local/lib/python3.6/site-packages/pypoint/__init__.py", line 114, in read_sensor
    return res.get('values')[-1].get('value')
IndexError: list index out of range
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 350, in _async_add_entity
    await entity.async_added_to_hass()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/point/__init__.py", line 240, in async_added_to_hass
    self._update_callback()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/point.py", line 58, in _update_callback
    self._value = self.device.sensor(self.device_class)
  File "/usr/local/lib/python3.6/site-packages/pypoint/__init__.py", line 217, in sensor
    return self._session.read_sensor(self.device_id, sensor_type)
  File "/usr/local/lib/python3.6/site-packages/pypoint/__init__.py", line 114, in read_sensor
    return res.get('values')[-1].get('value')
IndexError: list index out of range
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 350, in _async_add_entity
    await entity.async_added_to_hass()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/point/__init__.py", line 240, in async_added_to_hass
    self._update_callback()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/point.py", line 58, in _update_callback
    self._value = self.device.sensor(self.device_class)
  File "/usr/local/lib/python3.6/site-packages/pypoint/__init__.py", line 217, in sensor
    return self._session.read_sensor(self.device_id, sensor_type)
  File "/usr/local/lib/python3.6/site-packages/pypoint/__init__.py", line 114, in read_sensor
    return res.get('values')[-1].get('value')
IndexError: list index out of range
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 350, in _async_add_entity
    await entity.async_added_to_hass()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/point/__init__.py", line 240, in async_added_to_hass
    self._update_callback()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/point.py", line 58, in _update_callback
    self._value = self.device.sensor(self.device_class)
  File "/usr/local/lib/python3.6/site-packages/pypoint/__init__.py", line 217, in sensor
    return self._session.read_sensor(self.device_id, sensor_type)
  File "/usr/local/lib/python3.6/site-packages/pypoint/__init__.py", line 114, in read_sensor
    return res.get('values')[-1].get('value')
IndexError: list index out of range
2019-02-07 06:11:24 ERROR (SyncWorker_5) [concurrent.futures] exception calling callback for <Future at 0x7f9092cdedd8 state=finished returned NoneType>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/_base.py", line 324, in _invoke_callbacks
    callback(self)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 417, in _call_set_state
    dest_loop.call_soon_threadsafe(_set_state, destination, source)
  File "uvloop/loop.pyx", line 1256, in uvloop.loop.Loop.call_soon_threadsafe
  File "uvloop/loop.pyx", line 601, in uvloop.loop.Loop._call_soon
  File "uvloop/loop.pyx", line 605, in uvloop.loop.Loop._call_soon_handle
  File "uvloop/loop.pyx", line 634, in uvloop.loop.Loop._check_closed
RuntimeError: Event loop is closed
1 Like

As I said, it is due to the sensor values is empty, for some reason. Can you see the historygraph in the app? It would be interesting to know the reason Minut returns an empty list as value (when this occurs).

According to the documentation https://api.minut.com/draft1/docs/#operation--devices--device_id--temperature-get should it return a list like this hence res.get('values')[-1].get('value')
should return the last value in the list.

{
  "unit": "string",
  "values": [
    {
      "value": "number",
      "datetime": "string (date-time)"
    }
  ]
}

@Sam_Van_Herzele please feel free to raise the issue with [email protected], perhaps they can investigate why your Point doesn’t have any sensor readings.

Thanks @fredrike !
Turned out one of my points with an empty battery was causing the issue.

1 Like

Ah, I noticed after wiping out my HA and using the point app to check the points, the battery had gone on one of them, so I guess it just needs a graceful way to handle offline devices?

1 Like

Thank you for troubleshooting this. I really need an extra point to test all the corner cases.

Will look into this…

Edit: I’ve submitted a PR that fixes this issue: https://github.com/home-assistant/home-assistant/pull/20937