Drakulix / googlehome

Google Home Integration for Home-Assistant
Apache License 2.0
29 stars 3 forks source link

Bug: JBL Link 20 blocking integration setup #8

Open roflcoopter opened 3 years ago

roflcoopter commented 3 years ago

I'm trying to setup 0.3.3, but no entities are created by the component. I get lots of these errors in my log, any idea whats causing it?

2020-11-04 13:26:54 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:54 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:54 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:55 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.xx.xx:8443/setup/eureka_info - Cannot connect to host 192.168.xx.xx:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 13:26:59 ERROR (MainThread) [homeassistant.components.device_tracker] Setup of platform googlehome is taking longer than 60 seconds. Startup will proceed without waiting any longer.
2020-11-04 13:27:02 INFO (MainThread) [homeassistant.bootstrap] Home Assistant initialized in 73.15s

Edit: After a closer look it seems that my first-party Google Home and Google Mini is discovered correctly, but the Google home thats causing trouble is a third-party one, a JBL Link 20.

However it seems to be blocking all the other sensors from updating sadly.

Leatherface75 commented 3 years ago

This seems to be a ssl certificate error

Drakulix commented 3 years ago

Edit: After a closer look it seems that my first-party Google Home and Google Mini is discovered correctly, but the Google home thats causing trouble is a third-party one, a JBL Link 20.

However it seems to be blocking all the other sensors from updating sadly.

Oh that is super interesting. I do sadly not have any of those devices to debug this. Did you ever try the official Home-Assistant googlehome integration before google did change the API? Did it work back then? Maybe the JBL Link 20 still uses the old interface?

This integration just uses the googledevices library for communication and sadly does error handling on its own: https://github.com/ludeeus/googledevices/blob/master/googledevices/helpers.py#L88

Can you code and setup a small test project directly using googledevices to debug this? I believe the correct fix would be to figure out how to support the JBL Link 20 upstream.

That said, one device doing this should not block the whole integration, so there is definitely room for improvement here. The truncated log makes it hard to figure out, where the failing call originates from. Could you enable debug output of the googlehome component in home-assistants logger integration?

Something along these lines might be helpful:

logger:
  default: info
  logs:
    custom_components.googlehome: debug

and then post a new log with more context please. Especially whats happening right before all those calls fail would be super interesting.

Drakulix commented 3 years ago

However it seems to be blocking all the other sensors from updating sadly.

Also are you absolutely certain, that the integration is never finishing setup? If the Info-call fails, it should just skip over the device eventually: https://github.com/Drakulix/googlehome/blob/master/custom_components/googlehome/helpers.py#L34

But depending on the amount of setup devices in your home, it might need to try a lot of tokens until it finally fails: https://github.com/Drakulix/googlehome/blob/master/custom_components/googlehome/__init__.py#L89

This might block for some time resulting in the log message Setup of platform googlehome is taking longer than 60 seconds. Startup will proceed without waiting any longer., but that usually does not disable the integration. It might just take some minutes for setup to complete.

roflcoopter commented 3 years ago

Hmm I dont really remember, I used the olde integration but i dont think i ever tried with the JBL Link 20. One way to partially work around this would be to maybe allow an exclusion list of some sort of devices you dont want discovered?

Here is the full log, i removed everything from googledevices since it contains some sensitive information, let me know if you need that aswell and ill try to clean it up.

2020-11-04 16:17:57 INFO (MainThread) [homeassistant.setup] Setting up googlehome
2020-11-04 16:17:57 INFO (MainThread) [homeassistant.setup] Setup of domain googlehome took 0.0 seconds
2020-11-04 16:17:58 INFO (MainThread) [homeassistant.setup] Setup of domain device_tracker took 1.9 seconds
2020-11-04 16:17:58 INFO (MainThread) [homeassistant.setup] Setting up mobile_app
2020-11-04 16:17:58 INFO (MainThread) [homeassistant.setup] Setting up alert
2020-11-04 16:17:58 INFO (MainThread) [homeassistant.setup] Setup of domain alert took 0.0 seconds
2020-11-04 16:18:00 INFO (MainThread) [homeassistant.setup] Setting up ios
2020-11-04 16:18:00 INFO (MainThread) [homeassistant.setup] Setting up proximity
2020-11-04 16:18:00 ERROR (bellows.thread_0) [bellows.uart] CRC error in frame b'112340a1fb54c6107e' (b'c610' != b'8628')
2020-11-04 16:18:00 INFO (MainThread) [homeassistant.setup] Setup of domain mobile_app took 2.2 seconds
2020-11-04 16:18:00 DEBUG (MainThread) [custom_components.googlehome.helpers] Setting up signals
2020-11-04 16:18:00 DEBUG (MainThread) [custom_components.googlehome.helpers] Discovered 192.168.20.10
2020-11-04 16:18:00 DEBUG (MainThread) [custom_components.googlehome] Updating Google Home info for 192.168.20.10
2020-11-04 16:18:00 INFO (MainThread) [homeassistant.setup] Setup of domain ios took 0.0 seconds
2020-11-04 16:18:00 INFO (MainThread) [homeassistant.setup] Setup of domain proximity took 0.1 seconds
2020-11-04 16:18:00 INFO (MainThread) [homeassistant.setup] Setting up vacuum
2020-11-04 16:18:00 INFO (MainThread) [homeassistant.setup] Setup of domain vacuum took 0.0 seconds
2020-11-04 16:18:00 INFO (MainThread) [homeassistant.setup] Setting up script
2020-11-04 16:18:00 INFO (MainThread) [homeassistant.setup] Setup of domain script took 0.0 seconds
2020-11-04 16:18:00 INFO (MainThread) [homeassistant.setup] Setting up default_config
2020-11-04 16:18:00 INFO (MainThread) [homeassistant.setup] Setup of domain default_config took 0.0 seconds
2020-11-04 16:18:00 ERROR (MainThread) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-11-04 16:18:00 INFO (MainThread) [homeassistant.setup] Setup of domain volvooncall took 9.1 seconds
2020-11-04 16:18:02 INFO (MainThread) [homeassistant.setup] Setting up zha_map
2020-11-04 16:18:02 INFO (MainThread) [homeassistant.setup] Setup of domain zha_map took 0.0 seconds
2020-11-04 16:18:10 DEBUG (MainThread) [custom_components.googlehome.helpers] Discovered 192.168.20.14
2020-11-04 16:18:10 DEBUG (MainThread) [custom_components.googlehome] Updating Google Home info for 192.168.20.14
2020-11-04 16:18:20 DEBUG (MainThread) [custom_components.googlehome.helpers] Discovered 192.168.20.21
2020-11-04 16:18:20 DEBUG (MainThread) [custom_components.googlehome] Updating Google Home info for 192.168.20.21
2020-11-04 16:18:21 ERROR (bellows.thread_0) [bellows.uart] CRC error in frame b'11351ea1ad06067e' (b'0606' != b'3dc1')
2020-11-04 16:18:30 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:30 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:30 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:30 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:30 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:30 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:30 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:30 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:30 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:30 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:30 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:30 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:30 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:30 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:30 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:30 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:30 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:30 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:30 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:30 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:30 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:30 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 ERROR (MainThread) [googledevices] ClientError contacting https://192.168.20.21:8443/setup/eureka_info - Cannot connect to host 192.168.20.21:8443 ssl:False [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)]
2020-11-04 16:18:31 DEBUG (MainThread) [googledevices] None
2020-11-04 16:18:31 DEBUG (MainThread) [custom_components.googlehome.helpers] Discovered 192.168.20.21
2020-11-04 16:18:31 DEBUG (MainThread) [custom_components.googlehome.helpers] Discovered 192.168.20.21
2020-11-04 16:18:31 DEBUG (MainThread) [custom_components.googlehome.helpers] Discovered 192.168.20.50
2020-11-04 16:18:31 DEBUG (MainThread) [custom_components.googlehome] Updating Google Home info for 192.168.20.50
2020-11-04 16:18:41 DEBUG (MainThread) [custom_components.googlehome.helpers] Discovered 192.168.20.13
2020-11-04 16:18:41 DEBUG (MainThread) [custom_components.googlehome] Updating Google Home info for 192.168.20.13
2020-11-04 16:18:51 DEBUG (MainThread) [custom_components.googlehome.helpers] Discovered 192.168.20.11
2020-11-04 16:18:51 DEBUG (MainThread) [custom_components.googlehome] Updating Google Home info for 192.168.20.11
2020-11-04 16:18:51 DEBUG (MainThread) [custom_components.googlehome] Updating Google Home alarm for 192.168.20.13
2020-11-04 16:18:51 DEBUG (MainThread) [custom_components.googlehome] Updating Google Home alarm for 192.168.20.13
2020-11-04 16:18:51 DEBUG (MainThread) [googledevices] {'alarm': [], 'timer': []}
2020-11-04 16:18:51 DEBUG (MainThread) [custom_components.googlehome] {'alarm': [], 'timer': []}
2020-11-04 16:18:51 DEBUG (MainThread) [googledevices] {'alarm': [], 'timer': []}
2020-11-04 16:18:51 DEBUG (MainThread) [custom_components.googlehome] {'alarm': [], 'timer': []}
2020-11-04 16:19:00 ERROR (MainThread) [homeassistant.components.sensor] Setup of platform googlehome is taking longer than 60 seconds. Startup will proceed without waiting any longer.
2020-11-04 16:19:00 INFO (MainThread) [homeassistant.bootstrap] Home Assistant initialized in 70.38s
2020-11-04 16:19:01 DEBUG (MainThread) [custom_components.googlehome] Updating Google Home alarm for 192.168.20.13
2020-11-04 16:19:01 DEBUG (MainThread) [custom_components.googlehome] Updating Google Home alarm for 192.168.20.13
2020-11-04 16:19:02 DEBUG (MainThread) [googledevices] {'alarm': [], 'timer': []}
2020-11-04 16:19:02 DEBUG (MainThread) [custom_components.googlehome] {'alarm': [], 'timer': []}
2020-11-04 16:19:02 DEBUG (MainThread) [googledevices] {'alarm': [], 'timer': []}
2020-11-04 16:19:02 DEBUG (MainThread) [custom_components.googlehome] {'alarm': [], 'timer': []}
2020-11-04 16:19:02 DEBUG (MainThread) [custom_components.googlehome] Updating Google Home alarm for 192.168.20.11
2020-11-04 16:19:02 DEBUG (MainThread) [custom_components.googlehome] Updating Google Home alarm for 192.168.20.11
2020-11-04 16:19:02 DEBUG (MainThread) [googledevices] {'alarm': [], 'timer': []}
2020-11-04 16:19:02 DEBUG (MainThread) [custom_components.googlehome] {'alarm': [], 'timer': []}
2020-11-04 16:19:02 DEBUG (MainThread) [googledevices] {'alarm': [], 'timer': []}
2020-11-04 16:19:02 DEBUG (MainThread) [custom_components.googlehome] {'alarm': [], 'timer': []}
2020-11-04 16:19:04 ERROR (MainThread) [custom_components.hacs.factory] maykar/custom-header - Repository is archived.
2020-11-04 16:19:11 DEBUG (MainThread) [custom_components.googlehome] Updating Google Home alarm for 192.168.20.13
2020-11-04 16:19:11 DEBUG (MainThread) [custom_components.googlehome] Updating Google Home alarm for 192.168.20.13
2020-11-04 16:19:11 DEBUG (MainThread) [custom_components.googlehome] Updating Google Home alarm for 192.168.20.11
2020-11-04 16:19:11 DEBUG (MainThread) [custom_components.googlehome] Updating Google Home alarm for 192.168.20.11
2020-11-04 16:19:11 DEBUG (MainThread) [googledevices] {'alarm': [], 'timer': []}
2020-11-04 16:19:11 DEBUG (MainThread) [custom_components.googlehome] {'alarm': [], 'timer': []}
2020-11-04 16:19:11 DEBUG (MainThread) [googledevices] {'alarm': [], 'timer': []}
2020-11-04 16:19:11 DEBUG (MainThread) [custom_components.googlehome] {'alarm': [], 'timer': []}
2020-11-04 16:19:11 DEBUG (MainThread) [googledevices] {'alarm': [], 'timer': []}
2020-11-04 16:19:11 DEBUG (MainThread) [custom_components.googlehome] {'alarm': [], 'timer': []}
2020-11-04 16:19:11 DEBUG (MainThread) [googledevices] {'alarm': [], 'timer': []}
2020-11-04 16:19:11 DEBUG (MainThread) [custom_components.googlehome] {'alarm': [], 'timer': []}

192.168.20.21 is the Link 20

Also are you absolutely certain, that the integration is never finishing setup? If the Info-call fails, it should just skip over the device eventually: https://github.com/Drakulix/googlehome/blob/master/custom_components/googlehome/helpers.py#L34

But depending on the amount of setup devices in your home, it might need to try a lot of tokens until it finally fails: https://github.com/Drakulix/googlehome/blob/master/custom_components/googlehome/__init__.py#L89

This might block for some time resulting in the log message Setup of platform googlehome is taking longer than 60 seconds. Startup will proceed without waiting any longer., but that usually does not disable the integration. It might just take some minutes for setup to complete.

I think it might actually set up properly after a while, but all the entities in Home Assistant are marked as unavailable

Drakulix commented 3 years ago

I think it might actually set up properly after a while, but all the entities in Home Assistant are marked as unavailable

Confusingly this is normal and just how the old integration did work. If there is no alarm or timer set, the entity just becomes unavailable. I am open to changing this, but I have not figured out a good way to handle this case. Any automation dealing with parsing the date string would also need to be able to handle any other value used to indicate, that no alarm is set. But that is a different issue.

You can confirm this, by setting any alarm/timer and checking HA again.

roflcoopter commented 3 years ago

Ahh i see, i will test in a bit when i get home.

I actually made my own implementation of this using an android VM, but in that version i set the state to active/inactive and kept all the timers and alarms in attributes so i forgot how it used to work

Drakulix commented 3 years ago

Ahh i see, i will test in a bit when i get home.

I actually made my own implementation of this using an android VM, but in that version i set the state to active/inactive and kept all the timers and alarms in attributes so i forgot how it used to work

Also not a bad idea. We should probably open another issue about this. I would appreciate, if you could link the source code of your solution there as well, then we can discuss how to expose these values (and multiple alarms) best in home assistant.

So if it really is working on your end, remaining is mostly an upstream issue with the JBL Link 20 then?

roflcoopter commented 3 years ago

Also not a bad idea. We should probably open another issue about this. I would appreciate, if you could link the source code of your solution there as well, then we can discuss how to expose these values (and multiple alarms) best in home assistant.

So if it really is working on your end, remaining is mostly an upstream issue with the JBL Link 20 then?

Just tested, works fine, but i would really need an option to ignore the Link 20, as it takes Home Assistant 70 seconds to start up. Any idea how i could do this? Dont really understand the discovery process.

I could try and make a pull request if you would be open to changing the logic to active/inactive and keep timers and alarms in attributes so we have something to discuss around

Drakulix commented 3 years ago

Just tested, works fine, but i would really need an option to ignore the Link 20, as it takes Home Assistant 70 seconds to start up. Any idea how i could do this? Dont really understand the discovery process.

I just hijack the discover process of the cast-integration, as every google home device is also a google cast and then check, if they respond to the local api (which all of them including chromecasts do) and check their capabilities to figure out, if they have bluetooth and support alarms/timers.

I am honestly quite surprised, that the JBL Link is an exception to this.

I have some ideas to speed up discovery, so this is not so painful anymore.

Other then that, explicitly ignoring devices could be done via IPs (assuming those can be static/reserved in your setup). However this integration does all its config via the UI and I do not know, if there is a nice way to let the user specify an IP list. But I guess a text field could be added to the OptionsFlow that may contain a list of IPs to ignore in the discovery function.

I could try and make a pull request if you would be open to changing the logic to active/inactive and keep timers and alarms in attributes so we have something to discuss around

That would be really nice. Much appreciated.