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

Google Home sensor stopped working last night #24815

Closed
OleksandrBerchenko opened this issue Jun 28, 2019 · 58 comments · Fixed by #26035
Closed

Google Home sensor stopped working last night #24815

OleksandrBerchenko opened this issue Jun 28, 2019 · 58 comments · Fixed by #26035

Comments

@OleksandrBerchenko
Copy link
Contributor

Home Assistant release with the issue:

0.95.1

Last working Home Assistant release:

0.95.1

Operating environment:

Virtualenv on Raspberry Pi

Component/platform:

https://www.home-assistant.io/components/googlehome/

Description of problem:

It looks like Google Home either closed or changed their local API. Any local URI like /setup/assistant/alarms or /setup/bluetooth/scan_results now returns just an empty page.

Problem-relevant configuration.yaml entries:

googlehome:
  devices:
    - host: 192.168.1.90
      track_alarms: true

Traceback (if applicable):

2019-06-28 13:08:04 ERROR (MainThread) [googledevices] ClientError contacting http://192.168.1.90:8008/setup/assistant/alarms - 0, message='Attempt to decode JSON with unexpected mimetype: '
2019-06-28 13:08:04 ERROR (MainThread) [homeassistant.components.sensor] googlehome: Error on device update!
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 261, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 375, in async_device_update
    await self.async_update()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/googlehome/sensor.py", line 62, in async_update
    alarms = data.get('alarms')[self._condition]
TypeError: 'NoneType' object is not subscriptable

2019-06-28 13:08:06 ERROR (MainThread) [googledevices] ClientError contacting http://192.168.1.55:8008/setup/bluetooth/scan_results - 0, message='Attempt to decode JSON with unexpected mimetype: '

Additional information:

N/A

@ludeeus
Copy link
Member

ludeeus commented Jun 28, 2019

If you open your browser to http://192.168.1.90:8008/setup/assistant/alarms do you see anything there?

@OleksandrBerchenko
Copy link
Contributor Author

Nope. Just an empty page for any URI (as I mentioned). Even if you type a non-existent URI (like /setup/assistant/testtest), it still returns an empty page.

@ludeeus
Copy link
Member

ludeeus commented Jun 28, 2019

Are you sure that IP address is correct?
If it is try rebooting that device

@OleksandrBerchenko
Copy link
Contributor Author

IP is correct. In fact, I have two Google Homes Mini - both APIs stopped working. That happened around 2.42 AM (European Time). Rebooting doesn't help.

@ludeeus
Copy link
Member

ludeeus commented Jun 28, 2019

Can you check the firmware version?

@OleksandrBerchenko
Copy link
Contributor Author

156414 on both of them. Google Home application on my phone (the latest version from June 20) is still able to manage alarms.

@ludeeus
Copy link
Member

ludeeus commented Jun 28, 2019

That is the same FW I have..
navigating to /setup/assistant/testtest give me a 404.
/setup/assistant/alarms gives me {"alarm": [],"timer": []}

@OleksandrBerchenko
Copy link
Contributor Author

Strange... Yes, this is the behavior that I expect and actually had before 2.42 AM today. Beside HA component introduced recently, I also curl this API manually from a shell script, so I'm aware of the output format.

@OleksandrBerchenko
Copy link
Contributor Author

Do you use the same port (8008)?

@ludeeus
Copy link
Member

ludeeus commented Jun 28, 2019

Yes, that is the port for that API.
I'll try to reset one of my devices later today.
Maybe I have done something on mine that is not default.

@OleksandrBerchenko
Copy link
Contributor Author

Thanks!

@seangreen2
Copy link

seangreen2 commented Jun 28, 2019

Exact same problem here as well. Correct IPs, tried rebooting, etc.

I think the Homes were updated and that broke something. Perfect timing too - just got Room Presence working with them again.

@ludeeus
Copy link
Member

ludeeus commented Jun 28, 2019

That is probably what happened, but I'm on the same FW version and have that API endpoint working.
From /setup/eureka_info?options=detail

    "build_version": "156414",
    "cast_build_revision": "1.40.156414",

@OleksandrBerchenko
Copy link
Contributor Author

My cast firmware version is also the same.

@ludeeus
Copy link
Member

ludeeus commented Jun 28, 2019

After 3 reboots of the device, I also have this issue, that makes it easier to debug.
Will post here if I find something.
http://192.168.2.247:8008/setup/eureka_info looks like it's still working, any other endpoint returns a 403.

@OleksandrBerchenko
Copy link
Contributor Author

Yes, /setup/eureka_info works for me too.

@ludeeus
Copy link
Member

ludeeus commented Jun 28, 2019

Yeah.. they now require some form of authentication for all other api calls...

@davefrooney
Copy link

I am getting the same error too. Same fw and cast version as @ludeeus

Currently running Hassio 95

@ludeeus
Copy link
Member

ludeeus commented Jun 28, 2019

Yeah, they have started a full rollout of this "feature"...

@davefrooney
Copy link

The beginning of the end

@davericher
Copy link

To be fair, we should be equally upset google had a bunch of Iot devices in our house with open routes that expose things like device information and connection strengths lol, that or they realize if they do this the only legit way to get this information on a display is their new 'nest hub' screen ecosystem

@dasb00ter
Copy link

Ha first time I'm trying this after struggling with the monitor script by andrewjfreyer. Should I not be optimistic about the great minds here getting it working with authorization similar to the manual setup of google assistant?

@Lefuneste83
Copy link

Same issue since yesterday here with googlehome. It does not track BT device anymore.

@sgoudsme
Copy link

I also have the same problem. I get a 403. Google did a silent update again...

@gekomax
Copy link

gekomax commented Jun 29, 2019

Same problem here.

@ludeeus
Copy link
Member

ludeeus commented Jun 29, 2019

#24815 (comment)
Will be the same problem everywhere...

This is one of the drawbacks of using an unofficial API :(

@directman66
Copy link

what a pity, I just wanted to configure my system to use this feature

@ludeeus
Copy link
Member

ludeeus commented Jul 7, 2019

It certainly looks like it @OleksandrBerchenko
What's weird it that it's the same FW as earlier...

@ludeeus
Copy link
Member

ludeeus commented Jul 7, 2019

Have tested all endpoints used by the googlehome integration on two separate units.
They all now return the expected result.

I'm closing down this issue until Google push this again.

@ludeeus ludeeus closed this as completed Jul 7, 2019
@gekomax
Copy link

gekomax commented Jul 8, 2019

Hi, glad to see this issue is closed now but I still got a 403 error with this:

http://192.168.1.16:8008/setup/assistant/alarms

I rebooted the device and HA.

@rithvikvibhu
Copy link

Hey @gekomax. Some people are still getting 403. Someone on rithvikvibhu/GHLocalApi#39 got it working again on the 3rd reboot. You could try rebooting a few times.

@gxgani

This comment has been minimized.

@gekomax
Copy link

gekomax commented Jul 9, 2019

Hey @gekomax. Some people are still getting 403. Someone on rithvikvibhu/GHLocalApi#39 got it working again on the 3rd reboot. You could try rebooting a few times.

Hi, thanks!
I rebooted al my device one more time and now they're working!

@seangreen2
Copy link

Looks like Google pushed another update out, getting a 403 when trying to look at the scan results and it stopped reporting to Home Assistant.

@OleksandrBerchenko
Copy link
Contributor Author

Yes, it stopped working again for me too.

@sgoudsme
Copy link

It is also broken again since last night.

@ludeeus ludeeus reopened this Jul 13, 2019
@klaasnicolaas
Copy link
Member

It also doesn't work here since last night. Use fw: 156414

@patatman
Copy link

It's working for my existing devices (Google home, and Home Hub)
But when trying to add 2 Home mini's I get this error.

@ludeeus
Copy link
Member

ludeeus commented Jul 13, 2019

currently, it's "random" will happen to everyone.

@naverone
Copy link

Mine stopped working again - access denied. I restarted a couple of times and access returned.

@directman66
Copy link

in the end now works for you?

@OleksandrBerchenko
Copy link
Contributor Author

@naverone
Copy link

in the end now works for you?

Yes it works now with nothing more than restarting a couple of times.

@jokerigno
Copy link

I have last firmare on many minis. The fun fact is that tracking is working only on one device.

@jurgenweber
Copy link

jurgenweber commented Aug 1, 2019

I have this on all my devices (all 2 of them), I am on 0.96.5...

@sverleysen
Copy link

My google home hub is working, 2 google home mini's aren't working. I have the same error.

@rafaelbiriba
Copy link

SAme error here! access denied!

@dpackham
Copy link

dpackham commented Aug 7, 2019

some info over here.

rithvikvibhu/GHLocalApi#39 (comment)

and

https://gist.github.com/rithvikvibhu/1a0f4937af957ef6a78453e3be482c1f

The Fix
Lots happened over at #39. Finally, the only changes required are:

Change port from 8008 to 8443
Change protocol from http to https
Add a new header (for all requests) cast-local-authorization-token
Note: Since this is https, the CA will likely not be trusted by your device. "Enable Insecure Requests" or "Allow Self Signed Certificates" when making requests. For example, pass the -k/--insecure flag with curl and verify=False with python's requests.

@gavinwoolley
Copy link

I have the same issue, is this being worked on ?

@jurgenweber
Copy link

some info over here.

rithvikvibhu/GHLocalApi#39 (comment)

and

https://gist.github.com/rithvikvibhu/1a0f4937af957ef6a78453e3be482c1f

The Fix
Lots happened over at #39. Finally, the only changes required are:

Change port from 8008 to 8443
Change protocol from http to https
Add a new header (for all requests) cast-local-authorization-token
Note: Since this is https, the CA will likely not be trusted by your device. "Enable Insecure Requests" or "Allow Self Signed Certificates" when making requests. For example, pass the -k/--insecure flag with curl and verify=False with python's requests.

it looks good but we need a way to get the token where you don't need root on your phone.

@nicoolaro
Copy link

same here my logs are flooded with google home errors for weeks now

@gekomax
Copy link

gekomax commented Aug 14, 2019

some info over here.

rithvikvibhu/GHLocalApi#39 (comment)

and

https://gist.github.com/rithvikvibhu/1a0f4937af957ef6a78453e3be482c1f

The Fix
Lots happened over at #39. Finally, the only changes required are:

Change port from 8008 to 8443
Change protocol from http to https
Add a new header (for all requests) cast-local-authorization-token
Note: Since this is https, the CA will likely not be trusted by your device. "Enable Insecure Requests" or "Allow Self Signed Certificates" when making requests. For example, pass the -k/--insecure flag with curl and verify=False with python's requests.

Thanks, I don't know hot to use the header and its token.
Could you describe it in your how-to?
Thanks again

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

Successfully merging a pull request may close this issue.