Hey there,
I’m getting started witht the programming and homeassistn environment. I’m really noob regarding some terms so I please go easy on me.
Recently I no longer I’m able to acess Homeassisnt (connectec with rpi3) trough my phone or desktop.
The follwing error messages comes true:
Unnable to connect to Home Assistant.
My log file shows the follwing:
019-09-11 22:51:20** WARNING (MainThread) [homeassistant.components.http] Configuring api_password via the http integration has been deprecated. Use the legacy api password auth provider instead. For instructions, see https://www.home-assistant.io/docs/authentication/providers/#legacy-api-password
2019-09-11 22:51:20 WARNING (MainThread) [homeassistant.components.http.auth] legacy_api_password support has been enabled.
2019-09-11 22:51:21 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=190 from 2019-09-11 20:24:58.845861)
2019-09-11 22:51:33 WARNING (MainThread) [homeassistant.components.input_select] Invalid option: (possible options: Web Player (Chrome), SM-G930F, DESKTOP-1BMUATF, Home group)
2019-09-11 22:51:33 ERROR (MainThread) [homeassistant.components.http] Failed to create HTTP server at port 8123: [Errno 98] error while attempting to bind on address (‘0.0.0.0’, 8123): address in use
2019-09-12 04:15:02 ERROR (Thread-4) [pychromecast.socket_client] [Home group:42631] Error reading from socket.
2019-09-12 04:15:02 WARNING (Thread-4) [pychromecast.socket_client] [Home group:42631] Error communicating with socket, resetting connection 2019-09-12 04:15:35 WARNING (Thread-3) [pychromecast.socket_client] [Sala de estar:8009] Heartbeat timeout, resetting connection
The config file is like this:
homeassistant:
packages: !include_dir_named packages/
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
#Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
base_url: ###.duckdns.org:8123
api_password: ###
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem
ip_ban_enabled: False
login_attempts_threshold: 20
# Discover some devices automatically
discovery:
switch:
platform: mqtt
name: "sonoff1"
command_topic: "cmnd/sonoff1/power"
state_topic: "stat/sonoff1/POWER"
#availability_topic: "tele/sonoff002/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
retain: true
frontend: !include frontend.yaml
# Sensors
sensor:
# Weather prediction
- platform: yr
- platform: time_date
display_options:
- 'time'
- 'date'
- 'date_time'
- 'date_time_iso'
- 'time_date'
- 'beat'
#falar
google_assistant:
project_id: home-562d6
#api_key: ###
api_key: ###
exposed_domains:
– switch
– light
- cover
- group
- scene
- media_player
# Text to speech
tts:
- platform: google_translate
#base_url: 192.168.1.74:8123
cache: true
cache_dir: /tmp/tts
time_memory: 300
service_name: google_say
group: !include groups.yaml
#automation: !include automations.yaml
script: !include scripts.yaml
I’ll assume that you have downloaded and are running HASSIO. That is easiest way to run. It will run in a docker container.
The standard setup will ask you to create a userid and password. That is “normal” auth_provider as designated by type: homeassistant. If you have a legacy API, you need to define the password using the legacy_api_password. I still have that around in my config.
Exactly which “last version” do you have? there are around 97 other versions to choose from. the new auth system has been in place for several of those versions.
However I don’t think that is the problem. the error is saying that port 8123 is already in use.
How did you install Home Assistant? HassOS? Docker?
You said your were a noob, and we all forgot to welcome you. So, Welcome! The community as you can see if quite active and vibrant.
I can tell you that getting into HA has been a fun journey, but once you start you might feel a little bit lost. The homeassistant log file will be your friend. So check it regularly.
I would suggest doing checks by SSH into your PI (I use Putty), and once you are at the prompt, you can do a lot of work to check the config. The actuall commands are “hassio homeassistant check”. Here is a screen-dump of the help from the command-line.
This command provides a set of subcommands to control the Home Assistant
instance running on this Hass.io installation.
It provides commands to control Home Assistant (start, stop, restart), but also
allows you to check your Home Assistant configuration. Furthermore, some options
can be set and allows for upgrading/downgrading Home Assistant.
Usage:
hassio homeassistant [command]
Aliases:
homeassistant, home-assistant, ha
Examples:
hassio homeassistant check
hassio homeassistant restart
hassio homeassistant update
hassio homeassistant update --version 0.97.2
Available Commands:
check Validates your Home Assistant configuration
info Provides about Home Assistant
logs View the log output of Home Assistant
options Allow to set options on Home Assistant instance
rebuild Rebuild the Home Assistant instance
restart Restarts Home Assistant
start Manually start Home Assistant
stats Provides system usage stats of Home Assistant
stop Manually stop Home Assistant
update Updates Home Assistant
Flags:
-h, --help help for homeassistant
Global Flags:
--api-token string Hass.io API token
--config string Optional config file (default is $HOME/.homeassistant.yaml)
--endpoint string Endpoint for Hass.io Supervisor ( default is 'hassio' )
--log-level string Log level (defaults to Warn)
--no-progress Disable the progress spinner
--raw-json Output raw JSON from the API
I hope that helps you get going. Ping back with more questions.
Did you just restart the RPi and that is when you lost connection to the frontend?
If so then what prompted you to want to restart the RPi?
How long have you been running HA? Several months? several weeks? several days? is this a brand new install?
I’m not sure if it’s an issue but in the configuration file you posted there are a bunch of indentation errors there. But if it has been running like that for a while then it might just be a copy/paste issue?
and it still doesn’t explain why the log error says that port 8123 is already in use. I don’t think that error can just suddenly appear without a change to something in the code or something similar.
As noted above if you are running hassio and have SSH access then you can get the version information from the “info” command (I think - I don’t use hassio).
You can also try to do a restart of HA from there and then look at the newly created log file to see if it gives you any other specific errors to look at.
I’ve restared the RPi and lost acess yes. It was on week ago when I lost access with the reeboting i could no longer have UI…
I will digger the commands to see what messages it gives me
I’ve cleaned up several errors, but one keeps showing and I don’t know how to resolve it:
“ERROR (MainThread) [homeassistant.components.http] Failed to create HTTP server at port 8123: [Errno 98] error while attempting to bind on address (‘0.0.0.0’, 8123): address in use”
The only thing connected in my network is the philips hue but i’ve tried to disabled them and nothing happens.
What could I 've been doing bad? It’s almost one week and I can’t acess the Home Assistant