Configuration validation, configuration invalid

After playing around with getting custom UI working (and didn’t) I decided to remove all and try some time later. I got an error about loading config ‘packages’ so I decided to roll back a snapshot. Ok, so the snapshot was a bit older than I hoped :frowning: but the worst part is, the error does not go away.

To be complete; I am running hass.io 0.65.0 on a Pi3B, clean install on a new SD card. Have z-wave and RfxTrx installed. When I click on check config in the configuration section I get the following:

Configuration invalid

Testing configuration at /config
Fatal error while loading config: 'packages'
Failed config
  General Errors:
   - 'packages'

Successful config (partial)

Any help in fixing this would be greatly appreciated

You’ll need to post your config…

configuration.yaml

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 51
  longitude: 5
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: -1
  # 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/Amsterdam
  # Customization file
  customize: !include_dir_merge_list customize/

ios:

# 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: my_api
  # 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:
  ignore:
    - apple_tv

# 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:

# Text to speech
tts:
  - platform: google

# Cloud
cloud:

#zha:
#  usb_path: /dev/ttyUSB0
#  database_path: zigbee.db

rfxtrx:
  device: /dev/ttyUSB0

# Z-Wave
zwave:
  usb_path: /dev/ttyACM0

device_tracker:
  - platform: bluetooth_tracker
    new_device_defaults:
      track_new_devices: True
      hide_if_away: False

# MQTT
mqtt:
  broker: core-mosquitto
  birth_message:
    topic: 'hass/status'
    payload: 'online'
  will_message:
    topic: 'hass/status'
    payload: 'offline'

sensor: !include sensors.yaml
switch: !include switches.yaml
group: !include groups.yaml
automation: !include_dir_merge_list automations/
script: !include scripts.yaml

light:
  - platform: rfxtrx
    automatic_add: True
binary_sensor:
  platform: rfxtrx
  automatic_add: True

hassio host hardware:

{
    "result": "ok",
    "data": {
        "serial": [
            "/dev/ttyUSB0",
            "/dev/ttyAMA0",
            "/dev/ttyACM0"
        ],
        "input": [],
        "disk": [],
        "gpio": [
            "gpiochip0",
            "gpiochip100"
        ],
        "audio": {
            "0": {
                "name": "bcm2835 - bcm2835 ALSA",
                "type": "ALSA",
                "devices": {
                    "0": "digital audio playback",
                    "1": "digital audio playback"
                }
            }
        }
    }
}

hassio ha start:

DEBUG [CmdHomeassistant]: action->'start', endpoint='start', serverOverride->'', GET->'false', options->'', rawjson->'false', filter->''
DEBUG [ExecCommand]: basepath->'homeassistant', endpoint->'start', serverOverride->'', get->'false', Options->'', Filter->'', RawJSON->'false'
DEBUG [GenerateURI]: basepath->'homeassistant', endpoint->'start', serverOverride->''
DEBUG [RestCall]: data->'http://hassio/homeassistant/start', GET->'false', payload->''
DEBUG [RestCall]: ResponseBody->'{"result": "error", "message": null}'
ERROR
panic: interface conversion: interface is nil, not string

goroutine 1 [running]:
panic(0x2c5f60, 0x1070b380)
        /home/travis/.gimme/versions/go1.7.6.linux.amd64/src/runtime/panic.go:500 +0x33c
github.com/home-assistant/hassio-cli/command/helpers.DisplayOutput(0x107f0000, 0x24, 0x200, 0x0)
        /home/travis/gopath/src/github.com/home-assistant/hassio-cli/command/helpers/common.go:118 +0x3c8
github.com/home-assistant/hassio-cli/command/helpers.ExecCommand(0x2f5e63, 0xd, 0x7efcde51, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/travis/gopath/src/github.com/home-assistant/hassio-cli/command/helpers/common.go:155 +0x308
github.com/home-assistant/hassio-cli/command.CmdHomeassistant(0x10778420)
        /home/travis/gopath/src/github.com/home-assistant/hassio-cli/command/homeassistant.go:48 +0x540
github.com/urfave/cli.HandleAction(0x2ae6d8, 0x323754, 0x10778420, 0x0, 0x0)
        /home/travis/gopath/src/github.com/urfave/cli/app.go:503 +0xf0
github.com/urfave/cli.Command.Run(0x2f5e63, 0xd, 0x0, 0x0, 0x409d10, 0x1, 0x1, 0x300cfa, 0x2f, 0x0, ...)
        /home/travis/gopath/src/github.com/urfave/cli/command.go:165 +0x6b8
github.com/urfave/cli.(*App).Run(0x107668c0, 0x1070a140, 0x4, 0x4, 0x0, 0x0)
        /home/travis/gopath/src/github.com/urfave/cli/app.go:259 +0x8b0
main.main()
        /home/travis/gopath/src/github.com/home-assistant/hassio-cli/main.go:22 +0x108

There is another user who posted a few hours ago who seems to have the same problem:

I have managed to restore the initial config files (the complete config directory) and the error message about ‘packages’ went away (I could reproduce it by calling
hassio -d ha check

Unfortunately that did not mean it is now solved. When I run
hassio -d ha start
I get the following output:

DEBUG [CmdHomeassistant]: action->'start', endpoint='start', serverOverride->'', GET->'false', options->'', rawjson->'false', filter->''
DEBUG [ExecCommand]: basepath->'homeassistant', endpoint->'start', serverOverride->'', get->'false', Options->'', Filter->'', RawJSON->'false'
DEBUG [GenerateURI]: basepath->'homeassistant', endpoint->'start', serverOverride->''
DEBUG [RestCall]: data->'http://hassio/homeassistant/start', GET->'false', payload->''
DEBUG [RestCall]: ResponseBody->'{"result": "error", "message": null}'
ERROR
panic: interface conversion: interface is nil, not string

goroutine 1 [running]:
panic(0x2c5f60, 0x107ac460)
        /home/travis/.gimme/versions/go1.7.6.linux.amd64/src/runtime/panic.go:500 +0x33c
github.com/home-assistant/hassio-cli/command/helpers.DisplayOutput(0x107b8200, 0x24, 0x200, 0x0)
        /home/travis/gopath/src/github.com/home-assistant/hassio-cli/command/helpers/common.go:118 +0x3c8
github.com/home-assistant/hassio-cli/command/helpers.ExecCommand(0x2f5e63, 0xd, 0x7ead5e3b, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/travis/gopath/src/github.com/home-assistant/hassio-cli/command/helpers/common.go:155 +0x308
github.com/home-assistant/hassio-cli/command.CmdHomeassistant(0x107784d0)
        /home/travis/gopath/src/github.com/home-assistant/hassio-cli/command/homeassistant.go:48 +0x540
github.com/urfave/cli.HandleAction(0x2ae6d8, 0x323754, 0x107784d0, 0x0, 0x0)
        /home/travis/gopath/src/github.com/urfave/cli/app.go:503 +0xf0
github.com/urfave/cli.Command.Run(0x2f5e63, 0xd, 0x0, 0x0, 0x409d10, 0x1, 0x1, 0x300cfa, 0x2f, 0x0, ...)
        /home/travis/gopath/src/github.com/urfave/cli/command.go:165 +0x6b8
github.com/urfave/cli.(*App).Run(0x107668c0, 0x1070a180, 0x4, 0x4, 0x0, 0x0)
        /home/travis/gopath/src/github.com/urfave/cli/app.go:259 +0x8b0
main.main()
        /home/travis/gopath/src/github.com/home-assistant/hassio-cli/main.go:22 +0x108

I rebooted the RPI and the problem is now gone (so using the initial config). I will slowly migrate back my old config and see where it fails again.

It seems that the errors have gone away. It took forever because it kept popping back up. In the end I think it had something to do with my customizations and even though I am not 100% confident, I think it was in an icon. If you do run into the same problem, I would start by commenting out your customizations and see if that resolves the problem.

Hi. Same here. I try to hide some devices in the customizations with wild cards, but that fails the Configuration. My customizations file is really simple;

customize_glob:
# Customize entities matching a pattern
“Alarm*”:
hidden: true
homebridge_hidden: true
“FIBARO System FGD212*”:
hidden: true
homebridge_hidden: true

Any idea’s?

mmmh, my bad was in the assumption I had to place global in the separate file. Have it in main config file now with;

customize_glob:
“sensor.fibaro_system_fgd212_dimmer_2*”:
hidden: true

and this works

If someone is interested in a solution.

Today I ran into the same error message and found a solution to my problem. In my costumize.yaml file was a missing space between a colon and a value.

For example:

binary_sensor.mystrom_single:
  hidden:true

instead of:

binary_sensor.mystrom_single:
  hidden: true

maybe this can help someone in the future. :grimacing:

1 Like

For what it is worth, I recently also ran into this error, which wasn’t as easy to debug as things usually are, given that the error message given by hass --script check_config wasn’t as helpful as usual, not pointing to where the error actually lied. The error message was the one mentioned above:

General errors:
  - packages

For me, also, the problem was in customize:, specifically I had forgotten a line, leaving it as something akin to

customize:
    entity.id:

instead of, for instance

customize: 
  entity.id:
    friendly_name: Myname

Adding friendly_name: Myname or removing both entity_id and friendly_name fixed the error.

Same issue here… was painfull looking for error on file with 3k lines… :rage:

The command “hass --script check_config” - does not show the error :thinking: , but when try to start has the error is raised on syslog or default output if start manually :grinning:.

Check this example


(homeassistant) homeassistant@rpi-model3:~ $ hass --script check_config
Testing configuration at /home/homeassistant/.homeassistant
Fatal error while loading config: 'packages'
Failed config
  General Errors:
    - 'packages'

Successful config (partial)


journalctl -f -u [email protected]
-- Logs begin at Sat 2018-04-14 20:03:05 -03. --
Apr 14 20:03:09 rpi-model3 systemd[1]: Started Home Assistant.
Apr 14 20:03:37 rpi-model3 hass[495]: 2018-04-14 20:03:37 ERROR (MainThread) [homeassistant.config] Invalid config for [homeassistant]: string value is None for dictionary value @ data['customize']['script.net_canal_']['friendly_name']. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 2).

Hope help others with same issue.

You are a lifesaver! I had made a few changes and tried to restart and was getting this error message. I reverted back all of my files EXCEPT for customize.yaml where I had made a seemingly small change.

Fixed it right up after I saw your comment.

If you still have this issue, you can try with to comment “whitelist_external_dirs”. It was the solution in my case.

1 Like