Enter password="unexpected error"

I am brand new to HASS and I hope it’s OK if I post this extreme noob question for which I am sure there is an easy solution. I just installed python and HASS on my Raspberry Pi 3 running the latest of Rasbpan (apt-get update and upgrade done today) so I imagine everything is up-to-date. Whenever I enter the URL of http://localhost:8123 and it brings up the HASS web interface I’m tasked with entering a password. I’ve checked the configuation.yaml (located in /home/pi/.homeassistant) and the part for a password is commented out.

http:

Uncomment this to add a password (recommended!)

api_password: password

Uncomment this if you are using SSL or running in Docker etc

base_url: example.duckdns.org:8123

No matter what I type I get the message under Password which says “Unexpected error”. I’ve tried enabling a password but that doesn’t work. I’ve rebooted the Pi several times and yet I’ve had no success. Help?

Also, what is the command for starting and stopping the haas service? I’ve googled around and the few I’ve found only go me error messages about something not being loaded.

I’ve just heard about Hassbian and I’m now in the process of downloading and replacing Raspbian with it. Hopefully that will fix things. I’ll post back.

“unexpected error” usually shows when hass is not running.

connect via command line and run directly from command line
just “hass” at command prompt is probably enough depending on install.

this will show errors to you as hass come up

“ctrl c” will stop running command at command line

Another way you could do this is to start HASS normally and go to your Pi via SSH.

Then type in the following:

sudo systemctl status home-assistant.service -l

This should show you the current status of whether it is running or not and the last few entries of the log.

I’m also facing similar kind of issue. But I think it’s something related to duckdns. As the “unexpected error” comes only if I’m using the duckdns address, and it’s working fine if we use the local pi IP address.

It automatically resolve the issue after some time. Once I successfully logged in, I used to get a warning which says something like “invalid login password attempt [from my public IP] at [timestamp]”.

Any thoughts?

You could turn on verbose logging (set it at the lowest level, like info) and then restart and try again. Maybe you’ll see more information on the process.

I just tried by changing the logging level to info

logger:
  default: info
  logs:
    homeassistant.components: info

but i couldn’t find any logs related to the login. :worried:

I just found my SSL certificate is expired. Let me renew it and try.

Ah! Hoping to hear that this was the issue.

Yeah… I’m able to login now.

But… even before expiring the certificate also I used to get this error.

Lets see if the error comes again and we will find out.

Thanks for the help and suggestions as always…:slight_smile:

1 Like

I’ll keep a watch on this thread in case it comes back. Glad you got it working!

1 Like

Have you since experienced this again, or permanently resolved it? I just started using DuckDNS and SSL (let’s encrypt). It was working swimmingly for a little over a day, but now on days 2 and 3 I’m intermittently getting the same problem you described in your first post!

It’s working fine for me with out any issues so far. However occasionally i get that error if there an issue with the internet connectivity.

Thank you. I had rebooted my Pi by ssh’ing in and issuing the sudo reboot command, which did not seem to fix anything. But when I did sudo shutdown and unplugged it for a few minutes, everything was fixed. Not sure if that was actually what did it, but it’s been going smoothly for a few days now… Odd!