Continuing Configuration Issues

What’s the error?

Try adding …

logger:
  default: info

after recorder to get some more debug info in the log.

I am going to be out most of the day, so might not have any time to work on this.
There is no logger entry in the current file, so I will try entering that and see if there is any more information in the log.
The initial error which quite correctly Keith suggests should be concentrated on first is that on second and any subsequent start, there is a block displayed stating “Invalid Config” and listing the three issues when the web page is accessed, yet check_config reports no problems.

check_config just checks whether the file is valid yaml, not whether it will actually run homeassistant. When you run homeassistant, if you get invalid config errors, click on the little ‘i’ icon to get the errors and post them here.

I am back at looking at this.
I have added the logger lines, but it doesn’t even write to home-assistant.log.
The last entry pertains to when I totally re-entered the yaml file and first time, ran it with long/lat missing.
I haven’t really done much other than a few attempts to modify the yaml file, i am very temped to go back to NOOBS and reload everything from scratch!

Check for messages in /var/log/syslog
command example: cat /var/log/syslog | grep homeassistant

This should provide you with more info.

That returns 1321 lines, but nothing more recent than 18 Jan, so nothing pertaining to these last few days.

Can you post what you currently have please?

I had a flash of inspiration (or maybe desperation) lying in bed last night. It struck me that the only time I have had the web page without the Invalid Config window was the first time I started HA.
Installing HA, I followed the instructions on https://home-assistant.io/docs/installation/raspberry-pi/ which reached a point where you start HA by entering hass.
Then I did various other things, like following the instructions on https://home-assistant.io/docs/autostart/systemd/ to set up auto start.
So the next time I powered up, it used the auto start and I had the Invalid Config window on the web page.
Other places on the HA pages show the use of “systemctl start/stop/status home-assistant@pi” commands which I have used since then to allow changes to configuration.yaml.
Since I can introduce errors which are displayed in the Invalid Config window, using the systemctl method to start HA, it would appear to be using the file /home/homeassistant/.homeassistant/configuration.yaml, which is the one I think it should be using.
When I use hass to start HA, it runs in the foreground so I need a second ssh window to to do anything. Using systemctl status home-assistant@pi doesn’t suggest HA is active. It is like there are two different versions and whether I get the Invalid Config window depends on which ios running, i.e. which start method I have used.
Can anyone make any sense of that.

Well I would use systemd to start at boot, then edit config files, and restart HA either from within the config web page or use the systemd restart cmd, I never start/restart HA with the hass command. Sometimes it’s necessary to kill HA with sudo kill -9 ha_pid, again restart with the systemd restart cmd.

Keith, many thanks for your efforts to help.
I think we have it solved now. for most things, there are so many descriptions of how to do something, not all consistent with each other and I think I got two incompatible sets of instructions mixed.
My overnight realisation that the only time it worked was when I had entered hass at the command line.
My conclusion is that I was confusing it concerning the user name, and even though I had changed to homeassistant, it was somehow running as user pi. Yet it was still finding the config file in /home/homeassistant/.homeassistant.
Now I think I have it back under control, the Invalid Config window has disappeared.
So thanks also to anyone else who has helped.
So on to the next things, I am sure I will be back with questions!

1 Like

Glad you got it sorted :slight_smile:

1 Like