homeassistant_salus icon indicating copy to clipboard operation
homeassistant_salus copied to clipboard

Authentication ERROR after reboot

Open maymaymay opened this issue 4 years ago • 19 comments

Hi, since Hassio 0.117.0. i guess i have an authentication(?) problem. After every restart (with one exception*), i get my thermostats offline and log like this:

2020-11-02 07:14:30 ERROR (MainThread) [pyit600] Timeout while connecting to gateway: 2020-11-02 07:14:32 DEBUG (MainThread) [adb_shell.adb_device_async] bulk_write: b'CNXN\x00\x00\x00\x01\x00\x00\x10\x00\x14\x00\x00\x00\xb5\x07\x00\x00\xbc\xb1\xa7\xb1' 2020-11-02 07:14:33 DEBUG (MainThread) [adb_shell.adb_device_async] bulk_write: b'host::homeassistant\x00' 2020-11-02 07:14:35 ERROR (MainThread) [custom_components.salus.climate] Authentication error: check if you have specified gateway's TOKEN correctly. 2020-11-02 07:14:35 ERROR (Thread-2) [homeassistant] Error doing job: Unclosed client session 2020-11-02 07:14:35 ERROR (Thread-2) [homeassistant] Error doing job: Unclosed connector 2020-11-02 07:14:35 WARNING (MainThread) [homeassistant.components.climate] Setup of climate platform salus is taking over 10 seconds.

obraz

Deleting integration and readd integration again and its working fine to the next reboot.

*One exception was rebooting after upgrade of Hassio 0.117.1->0.117.2 After reboot Integration worked fine. Next reboot and problem back again.

Is there any chance to reload Integration with automation, maybe its loading to fast, when the network is not ready yet?

Hassio 0.117.2 on Docker on newest Debian on Dell Wyse

maymaymay avatar Nov 02 '20 08:11 maymaymay

Problem still exist. Every HA restart except restart after upgrade (0.117.2->0117.3->0117.4->0117.5) i have to re add integration.

maymaymay avatar Nov 08 '20 05:11 maymaymay

Hi, I have the same issue

George-andrew avatar Nov 10 '20 07:11 George-andrew

UPDATE: There was an update 0.117.5-0.117.6 Before update the integration was in unavailable/error state. After update/restart with no re add needed, integration went up.

So looks like only simple restart mess it up, and update/restart repairing it.

maymaymay avatar Nov 12 '20 06:11 maymaymay

Maybe its too soon, but i think HA 0.118.0 fixed the problem.

EDIT: no, that was too soon, the problem still exists.

maymaymay avatar Nov 20 '20 10:11 maymaymay

Can you try https://github.com/jvitkauskas/homeassistant_salus ?

jvitkauskas avatar Dec 19 '20 22:12 jvitkauskas

Can you try https://github.com/jvitkauskas/homeassistant_salus ?

I tried, did not work .

mrBaas avatar Dec 30 '20 18:12 mrBaas

Can you try https://github.com/jvitkauskas/homeassistant_salus ?

I tried, did not work .

Which gateway model do you have? I have UG600 from amazon.co.uk, but one person told me that his UGE600 stopped responding to local requests one day and now has no open ports. So IDK, maybe it's Salus sneaking update to disable local functionality.

jvitkauskas avatar Dec 30 '20 20:12 jvitkauskas

@maymaymay @George-andrew @mrBaas check if you have "Local Wifi Mode" enabled:

Open Smart Home app on your phone Sign in Double tap your Gateway to open info screen Press gear icon to enter configuration Scroll down a bit and check if "Disable Local WiFi Mode" is set to "No" Scroll all the way down and save settings Restart Gateway

jvitkauskas avatar Jan 01 '21 21:01 jvitkauskas

Already there: Screenshot_20210101-220838_Smart Home

maymaymay avatar Jan 01 '21 21:01 maymaymay

@maymaymay @George-andrew @mrBaas check if you have "Local Wifi Mode" enabled:

Open Smart Home app on your phone Sign in Double tap your Gateway to open info screen Press gear icon to enter configuration Scroll down a bit and check if "Disable Local WiFi Mode" is set to "No" Scroll all the way down and save settings Restart Gateway

@jvitkauskas I have UGE600 and local wifi mode is enabled - still not working. If I enable just one type of control (e.g Climate) at a time, everything works as it should. If I enable binary sensors in addition, one of the control types stops working. So for me it sounds like first come - first serve. I've tried looking at the source code (I'm not a python guy), but for me it looks like each control class uses each separate instance of gateways and everybody connects (potentially at the same time). Could this be the problem?

I also have (maybe related?) other errors in the background: image

mrBaas avatar Jan 05 '21 16:01 mrBaas

Yes, that's probably it. Poor gateway can't handle many connections. I am working on a solution, but didn't have time to finish.

jvitkauskas avatar Jan 05 '21 16:01 jvitkauskas

Yes, that's probably it. Poor gateway can't handle many connections. I am working on a solution, but didn't have time to finish.

Sweet, I have already forked the code and was going to take a look at it myself, but now I think I'll wait. If I can be of any assistance please let me know. I'm eager to get this up and working.

mrBaas avatar Jan 05 '21 16:01 mrBaas

@mrBaas I've added some simple locking and only one instance of gateway will be used now https://github.com/jvitkauskas/homeassistant_salus try now

jvitkauskas avatar Jan 10 '21 14:01 jvitkauskas

@mrBaas I've added some simple locking and only one instance of gateway will be used now https://github.com/jvitkauskas/homeassistant_salus try now

I think it took a turn for the worse. All my entities are now in state Unavailable, and no errors in the log either.

mrBaas avatar Jan 11 '21 14:01 mrBaas

I've added a simple 3 times retry. Maybe you can try and see if it helps.

jvitkauskas avatar Mar 10 '21 22:03 jvitkauskas

hmm... last change was 17 Oct 2020 or i'm missing something ? Anyway, since about a month, everything is ok here.

maymaymay avatar Mar 11 '21 07:03 maymaymay

https://github.com/jvitkauskas/homeassistant_salus

jvitkauskas avatar Mar 12 '21 08:03 jvitkauskas

yeah, then i'm blind ;) THX

maymaymay avatar Mar 13 '21 05:03 maymaymay

@maymaymay did it help?

jvitkauskas avatar Mar 19 '21 19:03 jvitkauskas