thanks @DavidFW1960, I havent twiddled with firewall settings, I’ll have a go with it turned off briefly and see. I didnt make any changes to browser settings since the early days of my HA involvement, where the PC worked, to a point later where all of a suden it didn’t. However, who knows the intrigues of windows updates !
Only mentioned it because I had an issue with the shell in Proxmox not working in chrome (worked in Firefox and the new chromium based edge). Turned out being a chrome security setting… and when I deleted all data, it reverted AGAIN and I had to change that setting again…
Ah… computers… can’t live with them, can’t live without them.
Firewall is a pretty good guess I think.
Edited and Removed my earlier post as I re-read that you have problem with your PC only. From other devices you are able to login.
I can only say that it might be that your ad-blockers or any other extension is not allowing you login without proper https certification. As others stated, try creating a different user in HA and try. Strange issue.
It might be stupid, but sometimes simple things like CAPS lock, change in the keyboard settings like sometimes Key @ & " are interchanged. So it is better you type your password in notedpad and then copy paste
I now have a second user setup, and can access that through my android phone. No access from this PC. As you can see, caps etc work on the keyboard I’m currently typing on, and I deliberately set up a simple and basic temporary password to test.
I have a basic chrome install without any third party extensions. The same result occurs in MS Edge.
can share teh configuration.yaml? Please remove all the sensitive info - ssid / password, api keys, chat ids, etc
few more questions (not sure if you have answered them already):
- You are able to connect via SSH from the same PC? If No, then are you on the same network as HA? Also are you able to ping your PC from RPI?
- Are there any browser extensions like httpseverywhere, certain ad-blockers, etc
When the PC that wont connect using a browser is connected to my home network I have connected using PuTTY.
I don’t yet know how to ping the PC from the CLI
I have no third party extensions in Chrome, and have almost never used Edge, so no adaptions of any kind there.
configuration.yaml
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and set
#latitude: 52.3142
#longitude: 0.0579
# Impacts weather/sunrise data (altitude above sea level in meters)
#elevation: 0
# metric for Metric, imperial for Imperial
#unit_system: metric
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
#time_zone: Europe/London
# Customization file
#customize: !include customize.yaml
# take care with auth providers - it can lock all access out !
#auth_providers:
# - type: homeassistant
# - type: trusted_networks
# trusted_networks:
# - 192.168.1.0/24
# 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:
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem
# api_password: !secret http_password
base_url: myURL.duckdns.org:8123
ip_ban_enabled: true
login_attempts_threshold: 5
# Discover some devices automatically
discovery:
weather:
- platform: openweathermap
api_key: XXXX
# track occasions where esp device is unavalable
counter:
unavailable_counter:
initial: 0
step: 1
restart_count:
restore: true
#recorder and database
recorder:
# purge should default to auto every day ?
# purge_keep_days: 3
# purge_interval: 1
# db_url: mysql://haas:MeadHouse68@core-mariadb/homeassistant?charset=utf8
exclude:
entities:
- sensor.heartbeat
- sensor.operating_flasher
- input_boolean.operating
- automation.Running
# logging
notify:
- name: NOTIFIER_NAME
platform: syslog
# Sensors
sensor:
# Weather prediction
- platform: openweathermap
api_key: XXXX
monitored_conditions:
- weather
- platform: yr
- platform: time_date
display_options:
- time
- platform: waze_travel_time
# deleted origin and destination XXX
region: 'EU'
name: Tims travel time
- platform: template
sensors:
gas_water_heating_status:
value_template: '{% if states.switch.gas_water_heating %}
{% if states.switch.gas_water_heating.state == "on" %}
On
{% else %}
Off
{% endif %}
{% else %}
n/a
{% endif %}'
friendly_name: 'Gas Heating'
- platform: template
sensors:
electric_water_heating_status:
value_template: '{% if states.switch.electric_water_heating %}
{% if states.switch.electric_water_heating.state == "on" %}
On
{% else %}
Off
{% endif %}
{% else %}
n/a
{% endif %}'
friendly_name: 'Electric Heating'
- platform: template
sensors:
heartbeat:
friendly_name: "Heartbeat"
unit_of_measurement: "Running"
value_template: >-
{% if is_state('input_boolean.operating', 'on') %}
o
{% else %}
O
{% endif %}
- platform: template
sensors:
available_check:
friendly_name: "Available"
value_template: >-
{% if is_state('sensor.bathroom_humitity_2', 'unavailable') and is_state('sensor.bathroom_humitity_2', 'Unknown') %}
0
{% else %}
1
{% endif %}
#binary_sensor:
# - platform: template
# sensors:
# operating_flasher:
# friendly_name: "Running"
# device_class: light
# value_template: >-
# {% if is_state('input_boolean.operating', 'on') %}
# on
# {% else %}
# off
# {% endif %}
# Text to speech
#tts:
# - platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
input_datetime:
water_morning_on_time:
name: Water morning on time
has_date: false
has_time: true
water_morning_off_time:
name: Water morning off time
has_date: false
has_time: true
water_evening_on_time:
name: Water evening on time
has_date: false
has_time: true
water_evening_off_time:
name: Water evening off time
has_date: false
has_time: true
climate:
- platform: generic_thermostat
name: Heating
heater: switch.gas_water_heating
target_sensor: sensor.bathroom_temperature
min_temp: 5
max_temp: 25
ac_mode: false
keep_alive:
minutes: 30
input_boolean:
heating_timer:
name: Heating timer
icon: mdi:toggle-switch
water_boost:
name: Water boost
icon: mdi:toggle-switch
short_cycle:
name: Short cycle
icon: mdi:toggle-switch
unavailable_test:
name: unavailable test
icon: mdi:toggle-switch
bathroom_unavailable_test:
name: bathroom sensor unavailable
icon: mdi:toggle-switch
on_holiday:
name: On Holiday
icon: mdi:airplane-takeoff
operating:
name: Operating
icon: mdi:running-fast
input_number:
water_temperature:
name: Temperature
min: 5
max: 25
step: 0.5
icon: mdi:thermometer
humidity_limit:
name: Humidity limit
min: 50
max: 100
step: 1
icon: mdi:water-outline
high_speed_humidity:
name: High Speed Humidity
min: 50
max: 100
step: 1
icon: mdi:water-outline
When you try to login and you can’t does HA provide any kind of a notification that an invalid login attempt was made?
I can’t remember if that functionality is built-in to HA or if it comes from a custom component called “authenticated”. If you don’t have it I recommend installing it. It gives additional info on who tries to log in to your HA system. it’s installable thru HACS or manually if you prefer.
And I recommend changing the ip_ban_enabled: to false and just leave it there until you get this figured out. there is no reason to add additional confusion to something when trying to troubleshoot.
And just double check once more that you don’t have the ip_bans.yaml file anywhere in your config directory.
Are there any special characters in your password?? Try typing the password in to notepad and make sure it appears as you would expect. Or the login screen may have a button so you can see what’s typed in the password text box.
OK, thanks for the input ! I’ve tested a few things.
- If I type the password or user incorrectly in an incognito window I get a red warning message in the text in the window, and am invited to try again. If I try the correct password the unable to connect/retry screen is shown. To me, this proves without need for further worry, that the IP address is correct, the user is typed correctly, the password is typed correctly etc.
- The result is the same, whether ip_ban_enabled is set to true or false
- I’m interested in the “authenticated” feature, but cant see it in the add-on store. I have looked at notifications, and receive a notification about each login attempt.
- My log file does show a record of the failed login attempt. (see last item below - all of the other errors etc will be dealt with at another time, probably involving other threads !)
2020-01-23 02:01:45 WARNING (MainThread) [homeassistant.setup] Setup of input_number is taking over 10 seconds.
2020-01-23 02:01:45 WARNING (MainThread) [homeassistant.setup] Setup of input_boolean is taking over 10 seconds.
2020-01-23 02:01:45 WARNING (MainThread) [homeassistant.setup] Setup of group is taking over 10 seconds.
2020-01-23 02:01:46 WARNING (MainThread) [homeassistant.setup] Setup of person is taking over 10 seconds.
2020-01-23 02:01:46 WARNING (MainThread) [homeassistant.setup] Setup of input_datetime is taking over 10 seconds.
2020-01-23 02:01:46 WARNING (MainThread) [homeassistant.setup] Setup of counter is taking over 10 seconds.
2020-01-23 06:48:42 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1860950640] Client exceeded max pending messages [2]: 512
2020-01-23 06:48:42 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1860950640] Client exceeded max pending messages [2]: 512
2020-01-23 07:17:52 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1864312464] Client exceeded max pending messages [2]: 512
2020-01-23 07:17:52 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1864312464] Client exceeded max pending messages [2]: 512
2020-01-23 09:29:06 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 217.XX.XX.XX
- I cant see an ip_bans.yaml, but have read somewhere that it’s hidden and there should be options to show it ?
And here’s some more info that may or may not be useful !
After getting some error messages about storage space I started a fresh install on a larger (32Gb) card. This PC quite happily connected to the new install (http to the local IP address). I restored a snapshot from a few days ago, and the PC now will not log in on https either locally or using duckdns, exactly as before. All other devices such as phones and other windows PCs seems fine !
Sorry for the old topic revival but I now have this same issue but via Nabu Casa. All devices connect fine except one of my 2 work PC’s. Using Chrome browser I get a ‘failed login with invalid auth from localhost’ notification in HA and the PC won’t connect. Login details are correct and are fine on my other work PC…
Any ideas?
Hi SparkyDave, it seems that the access arrangements are either little known, or people are unwilling to share info. (excusable to an extent).
I’ve migrated to a RPi4, by restoring a snapshot. Again, when I first installed a fresh install I could access fine, but after the snapshot restore that implemented security, I could not access.
I’ve accessed from further PCs since, without difficulty. The refusal is only from this PC, so the indication is very clear - this PC is the culprit. I have no idea why or how.
I can’t understand the authorisation process, but given the system works for every other device, and I’m plannign a PC upgrade shortly, I think this issue is closed for me, and I wont be spending any futher time with it !
It’s a strange one. I’ve found that one of my 2 work PC’s will log in fine using Chrome, the other will only log in using Edge, not Chrome. The PC which doesn’t log in using Chrome is brand new with fresh Chrome. I can’t work it out.
I couldn’t login on 1 pc using crome then i sync settings in crome and now the pc running hassio can login with crome ether but it works in firefox but only on the pc with hassio.
pulling my hair out here.
You’re about to give http://192.168.1.191:8123/ access to your Home Assistant instance.
Logging in with Trusted Networks.
Login aborted:
Your computer is not allowed.
I have the similar problem, guess there is something wrong with the latest updates.
I don’t have banning enabled and don’t have ip_bans.yaml in my config folder but HA dosen’t let me log in from a specific IP of my desktop.
Has anyone else experienced similar problem?
Logs;
Logger: homeassistant.components.http.ban
Source: components/http/ban.py:114
Integration: HTTP (documentation, issues)
First occurred: December 4, 2020, 11:17:43 AM (7occurrences)
Works ok for me. Can you show your auth and http section yaml?
Hey David,
I have only these lines on my config;
http:
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem
ip_ban_enabled: false
login_attempts_threshold: 5
When this problem started i didn’t even have “ip_ban_enabled” in my config. I added it to test if any ip_ban.yaml file going to be created or not.
By “auth” you mean the file in /storage/auth ?
no this
# Auth & 2FA
auth_mfa_modules:
- type: notify
- type: totp
auth_providers:
- type: trusted_networks
trusted_networks:
- 127.0.0.1
- ::1
- !secret my_ipv4_network
- fd00::/8
- !secret zerotier_network
- !secret my_ipv6_network
trusted_users:
127.0.0.1: !secret user_id
"::1": !secret user_id
!secret trusted_ipv4: !secret user_id
"fd00::/8": !secret user_id
!secret trusted_ipv6: !secret user_id
!secret zerotier_network: !secret user_id
allow_bypass_login: true
- type: homeassistant
That’s mine for using trusted networks… auto logsin on my network