Home Assistant Hass.io image - Random issues

Hi All,

I’m facing some weird issues and I really don’t know why and how I can fix it.
Currently I’m running a openHAB solution and wanted to test out the Home Assistant because it really looks nice!

So I took a rpi3 and downloaded the image and flashed the sd card with Etcher. No problem.
After 20 minutes (10 minutes maybe) I was up and running.
The autodiscovery finds some of all my components and everything seems to be fine.

So I headed on and changed some few things in the configuration.yaml file trough notepad++.
I outcommented the autodiscovery and added a few things: ihc controller, a few lights and my TV.
I did also change the time_zone and location and that is about it.

Suddenly under the Log Details I start seeing errors.

Log Details (ERROR)
Wed Aug 29 2018 09:32:43 GMT+0200 (Centraleuropæisk sommertid)

Testing configuration at /config
ERROR:homeassistant.scripts.check_config:BURB
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/scripts/check_config.py", line 207, in check
    res['components'] = check_ha_config_file(hass)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/scripts/check_config.py", line 328, in check_ha_config_file
    del core_config[CONF_PACKAGES]
KeyError: 'packages'
Fatal error while loading config: 'packages'
Failed config
  General Errors: 
    - 'packages'
Successful config (partial)

… and I can’t no longer verify my configuration file - it just spins forever.
I also tried to click on the Serveradministrator and Restart the Home Assistant, but nothing happens. The changes I did in the configuration file doesn’t seem to change and I just get the same “Testing configuration” error.

I have already reinstalled 5 times now, since I thought it could have been the flashing or installation that missed something or I edited the conf file too fast… but no luck!

Here is my full configuration file:

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: XX.XXXXX
  longitude: X.XXXXXX
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 0
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Europe/Copenhagen
  # Customization file
  customize: !include customize.yaml
  # Whitelist
  whitelist_external_dirs:
    - /usr/var/dumping-ground
    - /tmp

# Show links to resources in log and frontend
introduction:

# Enables the frontend
frontend:

# Enables configuration UI
config:

http:
  # Secrets are defined in the file secrets.yaml
  # api_password: !secret http_password
  # Uncomment this if you are using SSL/TLS, running in Docker container, etc.
  # base_url: example.duckdns.org:8123

# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
  # Optional, allows Home Assistant developers to focus on popular components.
  # include_used_components: true

# Discover some devices automatically
# discovery:

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time
history:

# View all events in a logbook
logbook:

# Enables a map showing the location of tracked devices
map:

# Track the sun
sun:

# Weather prediction
sensor:
  - platform: yr

# Text to speech
tts:
  - platform: google

# Cloud
cloud:

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

# IHC Controller
ihc:
   url: http://XXX.XXX.XXX.XXX
   username: XXXXX
   password: XXXXXXXXX
   auto_setup: False
   info: True

# WiFi LED
light:
  - platform: flux_led
    devices:
      XXX.XXX.XXX.XXX:
        name: Garden_Back_Terrace
      XXX.XXX.XXXX.XXX:
        name: Garden_Back_Playhouse
  - platform: ihc
    lights:
      - id: 1135197
        name: Driveway_Spot
        dimmable: False
      - id: 711005
        name: Front_Spot
        dimmable: False

# UBNT NVR
camera:
  - platform: uvc
    nvr: XXX.XXX.XXX.XXX
    key: XXXXXXXXXXXXXXXXXXXXXXXXXX
    password: XXXXXXXXXXXXXXX
    
# Samsung TV
media_player:
  - platform: samsungtv
    host: XXX.XXX.XXX.XXX
    timeout: 1000
    mac: XX:XX:XX:XX:XX

# Xiaomi Gateway
xiaomi_aqara:
  discovery_retry: 10
  gateways:
    - key: XXXXXXXXXXXXXXXXX

Heeeeeelp!

Similar error here: Check configuration failing as of 0.71.0 release

What is in your customize.yaml file?

Hi @tom_l,

It’s empty - I haven’t touch it yet?

I do also see this error when I try to reboot the unit:

Log Details (ERROR)
Wed Aug 29 2018 09:57:59 GMT+0200 (Centraleuropæisk sommertid)

Error executing service <ServiceCall homeassistant.reload_core_config (c:a7b763df7c37490f9e91ef35f9017cc1)>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1117, in _event_to_service_call
    await service_handler.func(service_call)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/__init__.py", line 206, in async_handle_reload_config
    hass, conf.get(ha.DOMAIN) or {})
  File "/usr/local/lib/python3.6/site-packages/homeassistant/config.py", line 410, in async_process_ha_core_config
    config = CORE_CONFIG_SCHEMA(config)
  File "/usr/local/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 267, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 589, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 427, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: not a directory @ data['whitelist_external_dirs'][0]

So that might explain why my dashboard is not updating with the added things.
It just continues to show the devices that was auto discovered.

As long as customize.yaml exists (even if it is blank) you’re ok.

Does commenting out the following lines help?

  whitelist_external_dirs:
    - /usr/var/dumping-ground
    - /tmp

I don’t knoe if you have access to them in hassio.

It certainly does :slight_smile:

The below information was actually just something I added, because I was seeing these errors and I saw that it was a part of the “Installation progress”.

   whitelist_external_dirs:
    - /usr/var/dumping-ground
    - /tmp

I removed it from the config file now and saved it.

So funny thing, then I opened the Options and headed to Serveradministration and clicked Reboot.
Now it actually reacts to the reboot.

What the heck!?!?!?
So the trick was to add those whitelist lines and remove it!?

Tom - thanks man - for now :slight_smile:

1 Like

Just another update.
After doing the above and a reboot - the Hass.io option is no longer present.

It seems that it only comes back if I manually add it to the configuration file again.
Strange isn’t it?