Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication ERROR after reboot #11

Open
maymaymay opened this issue Nov 2, 2020 · 19 comments
Open

Authentication ERROR after reboot #11

maymaymay opened this issue Nov 2, 2020 · 19 comments

Comments

@maymaymay
Copy link
Contributor

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
Copy link
Contributor Author

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.

@George-andrew
Copy link

Hi, I have the same issue

@maymaymay
Copy link
Contributor Author

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
Copy link
Contributor Author

maymaymay commented Nov 20, 2020

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

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

@jvitkauskas
Copy link
Contributor

@mrBaas
Copy link

mrBaas commented Dec 30, 2020

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

I tried, did not work .

@jvitkauskas
Copy link
Contributor

jvitkauskas commented Dec 30, 2020

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
Copy link
Contributor

jvitkauskas commented Jan 1, 2021

@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

@maymaymay
Copy link
Contributor Author

maymaymay commented Jan 1, 2021

Already there:
Screenshot_20210101-220838_Smart Home

@mrBaas
Copy link

mrBaas commented Jan 5, 2021

@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

@jvitkauskas
Copy link
Contributor

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.

@mrBaas
Copy link

mrBaas commented Jan 5, 2021

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.

@jvitkauskas
Copy link
Contributor

jvitkauskas commented Jan 10, 2021

@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

@mrBaas
Copy link

mrBaas commented Jan 11, 2021

@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.

@jvitkauskas
Copy link
Contributor

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

@maymaymay
Copy link
Contributor Author

maymaymay commented Mar 11, 2021

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

@jvitkauskas
Copy link
Contributor

@maymaymay
Copy link
Contributor Author

yeah, then i'm blind ;)
THX

@jvitkauskas
Copy link
Contributor

@maymaymay did it help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants