Remote home assistant authorization error
following upgrade on both master and slave to 3.5 I was getting an instance id does not match every 10 seconds, data was ok. I deleted the instance on the master and reloaded. I no longer get the instance id does not match, however I now get an invalidAuth every 10 seconds however data is still coming through as shown below. I set up the remote instance using an ip address, port 8123, access token, and unchecked both of the SSL options.
2021-10-27 09:34:27 ERROR (MainThread) [custom_components.remote_homeassistant] failed to fetch instance info Traceback (most recent call last): File "/config/custom_components/remote_homeassistant/init.py", line 364, in _async_instance_get_info return await async_get_discovery_info( File "/config/custom_components/remote_homeassistant/rest_api.py", line 51, in async_get_discovery_info raise InvalidAuth() custom_components.remote_homeassistant.rest_api.InvalidAuth 2021-10-27 09:34:37 ERROR (MainThread) [custom_components.remote_homeassistant] failed to fetch instance info Traceback (most recent call last): File "/config/custom_components/remote_homeassistant/init.py", line 364, in _async_instance_get_info return await async_get_discovery_info( File "/config/custom_components/remote_homeassistant/rest_api.py", line 51, in async_get_discovery_info raise InvalidAuth() custom_components.remote_homeassistant.rest_api.InvalidAuth 2021-10-27 09:34:48 ERROR (MainThread) [custom_components.remote_homeassistant] failed to fetch instance info Traceback (most recent call last): File "/config/custom_components/remote_homeassistant/init.py", line 364, in _async_instance_get_info return await async_get_discovery_info( File "/config/custom_components/remote_homeassistant/rest_api.py", line 51, in async_get_discovery_info raise InvalidAuth() custom_components.remote_homeassistant.rest_api.InvalidAuth
I see the same thing. Remote access works, but I get this error message every 10 seconds (and restarting Home Assistant takes forever - i.e. about 5 minutes until the Setup timed out for bootstrap - moving forward message appears and restarting ends):
2021-10-28 08:58:40 ERROR (MainThread) [custom_components.remote_homeassistant] failed to fetch instance info
Traceback (most recent call last):
File "/config/custom_components/remote_homeassistant/__init__.py", line 364, in _async_instance_get_info
return await async_get_discovery_info(
File "/config/custom_components/remote_homeassistant/rest_api.py", line 51, in async_get_discovery_info
raise InvalidAuth()
custom_components.remote_homeassistant.rest_api.InvalidAuth
On the remote instance I get this warning every 10 seconds:
2021-10-28 09:01:55 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from localhost (127.0.0.1). (HomeAssistant/2021.10.6 aiohttp/3.7.4.post0 Python/3.9)
EDIT: Added information about the remote instance warning.
Huh, very strange, but I fixed the problem by doing this:
- Removed Remote Home-Assistant integration on local HA instance
- De-installed Remote Home-Assistant from remote HA instance AND local HA instance and restarted them both
- Installed Remote Home-Assistant on remote HA instance
- Removed long access token on remote HA instance and created a new one. Copied the token to the
configuration.yamlon local HA instance. - Rebooted remote machine
- Installed Remote Home-Assistant on local HA instance and restarted HA (
remote_homeassistantsetup is inconfiguration.yaml) - Voila! No error messages and the connection works. 🎉
Huh, very strange, but I fixed the problem by doing this: 4. Removed long access token on remote HA instance and created a new one. Copied the token to the
configuration.yamlon local HA instance.
How exactly did you copy the access token in configuration.zaml_
- Installed Remote Home-Assistant on local HA instance and restarted HA (
remote_homeassistantsetup is inconfiguration.yaml)
Is this not supposed to be inside configuration.yaml on the remote instance and not the local one?
Is this not supposed to be inside configuration.yaml on the remote instance and not the local one?
As per the documentation (README.md), the remote instance only needs these two lines in configuration.yaml:
remote_homeassistant:
instances:
The actual configuration of the link (between the two HA instances) is in configuration.yaml on the local instance.
Thanks. Your comment just sounded like you had put that directive inside configuration.yaml on the local instance, sorry for the misunderstanding. Thanks for confirming though.
Huh, very strange, but I fixed the problem by doing this:
- Removed Remote Home-Assistant integration on local HA instance
- De-installed Remote Home-Assistant from remote HA instance AND local HA instance and restarted them both
- Installed Remote Home-Assistant on remote HA instance
- Removed long access token on remote HA instance and created a new one. Copied the token to the
configuration.yamlon local HA instance.- Rebooted remote machine
- Installed Remote Home-Assistant on local HA instance and restarted HA (
remote_homeassistantsetup is inconfiguration.yaml)- Voila! No error messages and the connection works. tada
I am not sure how you ended up with this voodoo magic but this is the only procedure that worked for connecting the server and the client. Thanks.
Huh, very strange, but I fixed the problem by doing this:
- Removed Remote Home-Assistant integration on local HA instance
- De-installed Remote Home-Assistant from remote HA instance AND local HA instance and restarted them both
- Installed Remote Home-Assistant on remote HA instance
- Removed long access token on remote HA instance and created a new one. Copied the token to the
configuration.yamlon local HA instance.- Rebooted remote machine
- Installed Remote Home-Assistant on local HA instance and restarted HA (
remote_homeassistantsetup is inconfiguration.yaml)- Voila! No error messages and the connection works. 🎉
What do you mean by "remove" in step one? is it the same as de-installed in step two?
@jmsblah Remove/delete the integration - as opposed to the component, which is installed in HACS and de-installed in step 2. See arrow in picture below.