-
Notifications
You must be signed in to change notification settings - Fork 3
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
Scan failed, scheduling token update #21
Comments
I updated the gpsoauth dependency to 0.4.3 which resolved the password login issue, but I'm still getting the same the scan failed message continually. |
Looking a bit deeper, it looks like the error handling is a bit wrong. Adding some debug logs around here: It turns out Is that if statement better off being something like |
Thanks for opening and the debugging so far. Yes you are right, an empty result is no wrong result, that should print an error message. However are you expecting an empty result? Or is there still some problem with bluetooth scanning on your home mini? |
So I thought this scanned for BLE devices, of which I can see a half dozen in range so thought something was definitely broken. To test though I opened Bluetooth pairing on my phone and low and behold it started showing up in the scans (of the nearest few Google Home devices anyway, the ones on the other side of the house can't see it naturally) and of course #12 bit me with the bathroom Google Home writing over the much closer Google Home that is next to me. This was with that if statement changed to a None check. Did Google change it from BLE to just regular BT? Or is it only looking for devices in pairing mode so not showing up the devices I see with a BLE scanner app? |
Well the feature is used in the google home app to pair a speaker. So although the home mini has BLE functionality, it might not pick up every device or expose all result via the API endpoint. (Those get rendered in the google home app after all.) However I never had a problem with smartphones showing up (without any pairing). So I am not sure whats going on. Maybe you can poke around in the api yourself? E.g. check your bluetooth status? https://rithvikvibhu.github.io/GHLocalApi/#operation/Status |
New install, I had to get a master token using the python script and use that due to the issues described in #14
Setup seemed fine, except it can't ever scan. Errors in the log saying "DEBUG (MainThread) [custom_components.googlehome] Scan failed, scheduling token update" pretty constantly.
It seems to successfully be able to update Google Home info for the devices it's detecting however:
Following the instructions at https://rithvikvibhu.github.io/GHLocalApi/#section/Google-Home-Local-API/Authentication I was able to use the access token to successfully get a local token and hit some endpoints on my Google Home Minis, so I'm confident that the master token works since that's how the get_tokens.py script gets the access token that worked. I do note that gpsoauth is a couple of patch versions behind, of which I note simon-weber/gpsoauth@6a52a38 is in 0.4.3 that might be relevant to this issue.
The text was updated successfully, but these errors were encountered: