Bad installation experience

I just installed HA for the first time and I keep seeing this question about whether I want to “take control” of Lovelace. Well I really wanted to see that fancy control panel shown in the video here: https://www.home-assistant.io/lovelace/
https://www.youtube.com/watch?v=XY3R0xI45wA

So I finally answered “yes”. And now I can’t even see the dashboard login – all I get is a “404: Not Found” !

The U.I. gave me no warning that “take control” actually means "lock me out of my own platform and there are no instructions on how to get back in."

I did manage to execute a shell command in the configurator, but “shutdown” is not a valid command on this platform (!) so I cant even power down gracefully and save my SD card from potential corruption. THIS is the kind of introduction you want new users to have? So how do I reactivate the primary web interface?

I did manage to execute a shell command in the configurator, but “shutdown” is not a valid command on this platform (!) so I cant even power down gracefully and save my SD card from potential corruption.

ssh in and do a ‘sudo shutdown’

THIS is the kind of introduction you want new users to have?

not sure what you mean?

So how do I reactivate the primary web interface?

Its changed in the web interface.

Are you sure you’re going to the correct address when you try to login. If you’ve logged in already and just switched over to the Lovelace ui you wouldn’t need to login unless you’ve logged out.

1 Like

Basically just the fact that “take control” seems to have disabled the web interface. But now I think I just found a bug: according to my router, the device name is now just an asterisk. I never changed it to that.

Oh yeah. I had a tab open when it was working and when I refreshed it, I got an error. After rebooting, now I dont even get the 404 – the connection simply times out. I think I will have to wipe the card and reinstall. No idea what the heck happened.

Haven’t seen it do that at all.

You have some other error stopping it.

I would look at the log file first to see what it was. Unless your sdcard is corrupt, you shouldn’t need to wipe the card and reinstall.

Is it possible that a web security related extension in the browser could have corrupted some post operation, and the server back end accepted a corrupt value or partial command?

This log?

ERROR (MainThread) [homeassistant.config] Invalid config for [frontend]: expected a dictionary for dictionary value @ data['frontend']['themes']['accent-color']. Got '#E45E65'

(the same error occurs for every item in the theme)

ERROR (MainThread) [homeassistant.setup] Setup failed for frontend: Invalid config.
ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of logbook. Setup failed for dependencies: frontend
ERROR (MainThread) [homeassistant.setup] Setup failed for logbook: Could not set up all dependencies.
ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of panel_iframe. Setup failed for dependencies: frontend
ERROR (MainThread) [homeassistant.setup] Setup failed for panel_iframe: Could not set up all dependencies.
ERROR (MainThread) [homeassistant.components.sensor.yr] Retrying in 16 minutes: Cannot connect to host aa015h6buqvih86i1.api.met.no:443 ssl:None [Try again]
ERROR (MainThread) [homeassistant.components.discovery] Network is unreachable

Seems doubtful.

From the log it looks like your config yaml is bad. Did you modify the config yaml?

do you have themes listed under frontend in your config? if so…
comment out all your theme lines under frontend: so the line in your configuration.yaml just says

frontend: 

then try rebooting

or you may just have a wrong indent somewhere in config possibly above or below the frontend: section…

1 Like

I only modified config yaml to the extent of adding this under frontend

themes: !include themes.yaml

In themes.yaml I did notice that a theme heading was missing. But I removed everything under “frontend:” and still no go. It’s like the server is just not listening on the default ports anymore. Weird.

It won’t start if there is still an error in your configuration

Okay, thats good to know. But I just dont see what else could be wrong. If there is no way to restore the default configuration, I may have to reinstall.

Try to rename your configuration.yaml and restart HA - it will create a new file with that name and then you can start pasting the content from your old configuration in there again - minus the erroneous part, of course :grin:

have you tried '#'ing out that line and restarting HA? If it still won’t start there is surely another error(s) somewhere…

It was not created. Something is seriously wrong. I still think this issue has something to do with the devices network name being changed to * without my knowledge.

Indeed I did.

I have to quit for today, but I appreciate all of the suggestions and did learn a couple of things about how its supposed to behave. However, all of this weirdness is making me wonder what else could be corrupted. At this early stage in the game, it wont hurt to reimage the SD card. But I am a little creeped out by how fragile this is. If a minor typo can prevent it from booting, I feel like the user interface should not allow you to save a config file that will result in the lack of web access.

The frontend GUI doesn’t modify the config.yaml

But you do have to modify it manually if you want a dark theme, is that correct?

I don’t know what the themes require but the frontend doesn’t modify the config.yaml.

There are lots of reasons to use the config.yaml, a lot of components won’t work without modifying the yaml.

Spacing in yaml is crucial. If you screw that up it will fail.

All I’m saying is that you didn’t just “take control” of Lovelace and it crash on you. You had to have had a screwed up config file.

1 Like

If you don’t have much to lose I suggest just starting fresh with a new image. If you go with HassIO, install the Cloud 9 IDE add-on and do your yaml coding with that. It makes it nice and easy to spot errors based on the way the code is displayed. (there are certainly other editors with similar options etc but I like this one).

When you edit yaml pay very close attention to the spacing and use of dashes, follow the docs to the letter. Once you have saved your changes, be sure to run the config checker before you even consider a HA restart because if there is a mistake there is a chance that the GUI will not load. At least if the config checker passes, HA should load fine. I have found that sometimes when I’m trying to get a template to work, it will pass the config check and HA will load, even if my template isn’t quite correct enough to work the way I want. (it does however have to be correct yaml)

My advice is don’t use the GUI based automation builder as it doesn’t write the code the same way the docs tell you to so if you try to make sense of the automations later on, they might confuse you. In my mind it’s a serious flaw with the GUI editor which should be resolved… but has been there since the beginning. Just don’t use it.

EDIT: I just realised I wrote a novel… sorry!

There are Home Assistant T-shirts available.

The back of the shirts should be emblazoned with this:

CHECK CONFIG

I’ll reiterate sparkydave’s advice:

After every change to your configuration files, make it a habit to run Check Config, before restarting, to ensure you didn’t introduce errors. Otherwise, you run the risk of a configuration error preventing Home Assistant from starting (as you’ve already discovered). Fixing errors after a failed restart can be messier.

Configuration > General > Check Config.