Invalid configuration on hassio



  • HASSIO 0.62.1 on RPI with serial gateway attached
    I get "invalid configuration" when running "hassio homeassistant check"

    When running configuration validation in the UI I get "valid configuration"

    What am I missing?

    Error on homeassistant/check: starting version 3.2.4
    Testing configuration at /config
    2018-02-09 16:40:18 ERROR (MainThread) [homeassistant.bootstrap] Unable to setup error log /config/home-assistant.log (access denied)
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setting up logger
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setting up introduction
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setting up recorder
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setting up http
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setup of domain logger took 0.0 seconds.
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setup of domain introduction took 0.0 seconds.
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 0.0 seconds.
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setup of domain http took 0.0 seconds.
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setting up history
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setting up system_log
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setting up websocket_api
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setting up api
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setup of domain history took 0.0 seconds.
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setup of domain system_log took 0.0 seconds.
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setup of domain websocket_api took 0.0 seconds.
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setup of domain api took 0.0 seconds.
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setting up frontend
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setup of domain frontend took 0.0 seconds.
    2018-02-09 16:40:19 ERROR (MainThread) [homeassistant.config] Invalid config for [mysensors]: /config directory does not exist or is not writetable for dictionary value @ data['mysensors']['gateways'][0]['persistence_file']. Got 'mysensors.json'
    not a valid value for dictionary value @ data['mysensors']['gateways'][0]['device']. Got '/dev/ttyUSB0'. (See /config/configuration.yaml, line 52). Please check the docs at https://home-assistant.io/components/mysensors/
    2018-02-09 16:40:19 ERROR (MainThread) [homeassistant.setup] Setup failed for mysensors: Invalid config.
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setting up sun
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setting up group
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setting up map
    2018-02-09 16:40:19 INFO (MainThread) [homeassistant.setup] Setting up discovery
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setting up thethingsnetwork
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setting up updater
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setting up sensor
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setup of domain sun took 0.3 seconds.
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setup of domain group took 0.3 seconds.
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setup of domain map took 0.3 seconds.
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setup of domain discovery took 0.2 seconds.
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setup of domain thethingsnetwork took 0.2 seconds.
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setup of domain updater took 0.1 seconds.
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setup of domain sensor took 0.1 seconds.
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setting up history_graph
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setting up logbook
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setting up config
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setting up cloud
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setting up conversation
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setting up automation
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setting up script
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setup of domain history_graph took 0.0 seconds.
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setup of domain logbook took 0.0 seconds.
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setup of domain config took 0.0 seconds.
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setup of domain cloud took 0.0 seconds.
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setup of domain conversation took 0.0 seconds.
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setup of domain automation took 0.0 seconds.
    2018-02-09 16:40:20 INFO (MainThread) [homeassistant.setup] Setup of domain script took 0.0 seconds.
    Failed config
      mysensors:
        gateways: [source /config/configuration.yaml:53]
          - baud_rate: 115200
            device: /dev/ttyUSB0
            persistence_file: mysensors.json
        optimistic: False
        persistence: True
        retain: True
        version: 2.0
      General Errors:
        - Setup failed for mysensors: Invalid config.
    Successful config (partial)
      mysensors:
    core-ssh:~#
    
    

  • Plugin Developer

    I think you need to specify the absolute path to the persistence file. It should be in a directory where home assistant has write permission. Usually the configuration directory is good.



  • The mysensors.json is in the same directory as the configuration.yaml.

    The first ERROR line in the log above says " unable to setup error log. But in my config directory is also a "home-assistant.log".

    Despite the errors in the config check the system seems to works as far as I can see.



  • I am having the same issue with Hass.io. I have tried defining the persistence file location as '/core/config/mysensors1.json', '/config/mysensors1.json', 'congif/mysensors1.json', ... I have tried having it within quotes, double quotes, and without.

    Any thoughts would be appreciated.



  • I'm getting similar errors:

    core-ssh:/config# hassio ha check
    ERROR
    starting version 3.2.4
    Testing configuration at /config
    ERROR:homeassistant.config:Invalid config for [mysensors]: /config directory does not exist or is not writeable for dictionary value @ data['mysensors']['gateways'][0]['persistence_file']. Got '/config/mysensors3.json'
    not a valid value for dictionary value @ data['mysensors']['gateways'][0]['device']. Got '/dev/ttyUSB0'. (See /config/configuration.yaml, line 112). Please check the docs at https://home-assistant.io/components/mysensors/
    ERROR:homeassistant.setup:Setup failed for mysensors: Invalid config.
    Failed config
    mysensors:
    gateways: [source /config/configuration.yaml:113]
    - device: /dev/ttyUSB0
    persistence_file: /config/mysensors3.json
    optimistic: False
    persistence: True
    retain: True
    version: 2.1
    General Errors:
    - Setup failed for mysensors: Invalid config.
    Successful config (partial)
    mysensors:

      gateways:
        - device: '/dev/ttyUSB0'
          persistence_file: '/config/mysensors3.json'
          
      optimistic: false
      persistence: true
      retain: true
      version: '2.1'


  • On the latest HASSIO release now and still not solved Can someone help with this problem?

    core-ssh:~# hassio ha check
    ERROR
    starting version 3.2.4
    Testing configuration at /config
    Failed config
      mysensors:
        - Invalid config for [mysensors]: /config directory does not exist or is not writeable        
    for dictionary value @ data
    ['mysensors']
    ['gateways'][0]
    ['persistence_file']. Got '/config/mysensors.json'not a valid value for dictionary value @ data
    ['mysensors']
    ['gateways']
    [0]
    ['device']. Got '/dev/ttyUSB0'. 
    (See /config/configuration.yaml, line 85). 
    Please check the docs at https://home-assistant.io/components/mysensors/
    

    The mysensors.json and configuration.yaml are in the same config directory.
    Despite the above problem the system seems to work fine.

    Is this a fake error?



  • I’m experiencing the same error and issues.



  • Make new dir in config dir. Then add by hand mysensors.json.



  • @mredone said in Invalid configuration on hassio:

    Make new dir in config dir. Then add by hand mysensors.json.

    Thank you for the suggestion. That does not resolve the issue. It appears it is only an issue with the config checker. The file exists and is written to just fine so there is no real effect on operation. However, it prevents using the built-in HA restart function since that won't execute fully when the checker throws an error.



  • I'm having the same problem as well, very frustrating not getting it to work!



  • @iteafreely When I make a configuration change, this change is not gone thru after a restart. I have to power off/on the RPi to activate the configuration change.
    So, you think this is also because of this configuration error



  • I am now at 0.69.1 HASS on Rpi and still having configuration check problem.

    This is my configuration:

    mysensors:
      gateways:
        - device: '/dev/ttyUSB0'
          persistence_file: '/config/mysensors.json'
          baud_rate: 115200
      optimistic: false
      persistence: true
      retain: true
      version: '2.0'
    
    

    And this is the configuration check ERROR:

    core-ssh:~# hassio ha check
    ERROR
    starting version 3.2.4
    Testing configuration at /config
    Failed config
      mysensors:
        - Invalid config for [mysensors]: /config directory does not exist or is not writeable for dictionary value @ data['mysensors']['gateways'][0]['persistence_ file']. Got /config/mysensors.json'
    not a valid value for dictionary value @ data['mysensors']['gateways'][0]['device'].
    Got '/dev/ttyUSB0'. (See /config/configuration.yaml, line 85). Please check the docs at https://home-assistant.io/components/mysensors/
    

    A secondary result of this error is the restarting the Rpi does NOT load a new configuration!
    The only way to load a new configuration file is to power off/on the Rpi.

    However all the rest seems to funtion well !?

    Really need help with this.



  • HASSIO 0.70 on RPi with serial gateway attached still having configuration check problem with mysensors when executing

    hassio ha check
    

    This is what I did to try to solve:

    • Deleted the configuration.yaml and the mysensors.json

    • Restarted the RPi and hassio installed the default configuration.yaml

    • Added the following mysensors configuration to the default configuration.yaml

    mysensors:
      gateways:
        - device: '/dev/ttyUSB0'
          persistence_file: 'mysensors.json'
      persistence: true
      retain: true
      version: '2.2'
    
    • Restarted the Rpi and checked that hassio had installed the mysensors.json in the /config directory
      All my sensors were added to the mysensors.json

    • The whole system seems to work OK!

    • However when I run "hassio ha check" on the RPi I get the following error:

    core-ssh:~# hassio ha check
    ERROR
    Testing configuration at /config
    Failed config
      mysensors:
        - Invalid config for [mysensors]: /config directory does not exist or is not                                   writeable for dictionary value @ data['mysensors']['gateways'][0]['persistence_                                  file']. Got 'mysensors.json'
    not a valid value for dictionary value @ data['mysensors']['gateways'][0]['devic                                  e']. Got '/dev/ttyUSB0'. (See /config/configuration.yaml, line 59). Please check                                   the docs at https://home-assistant.io/components/mysensors/
        - config: ?
          frontend: ?
            javascript_version: auto
          group: ?
          history: ?
            exclude: ?
            include: ?
            use_include_order: False
          http: ?
          introduction: ?
          logbook: ?
          logger: [source /config/configuration.yaml:52]
            default: info
            logs: [source /config/configuration.yaml:54]
              homeassistant.components.mysensors: debug
              mysensors: debug
          mysensors: [source /config/configuration.yaml:59]
            gateways: [source /config/configuration.yaml:60]
              - device: /dev/ttyUSB0
                persistence_file: mysensors.json
            persistence: True
            retain: True
            version: 2.2
          script: ?
          updater: ?
            include_used_components: False
            reporting: True
    Successful config (partial)
      mysensors
    
    • There are no errors in the system log! According to the log the system is reading and writing fine to and from the mysensors.json

    • The secondary annoyance from this problem is the fact that I cannot reload the configuration file after a change. The only way to reload the configuration file is by powering off/on the RPi

    • I added an issue on github: https://github.com/home-assistant/hassio/issues/478

    Any help appreciated


Log in to reply
 

Suggested Topics

  • 1
  • 17
  • 3
  • 1
  • 8
  • 5

67
Online

11.4k
Users

11.1k
Topics

112.7k
Posts