slaesh
slaesh

Reputation: 16917

homegraph.devices.reportStateAndNotification does not trigger google home app to update the state

I am playing around with the nodejs packages googleapis and actions-on-google.

I am stuck reporting the state, which changed without googles note, so that google keeps in sync! Sadly this does not work. I am using this method: homegraph.devices.reportStateAndNotification().

described here: https://developers.google.com/assistant/smarthome/reference/rest/v1/devices/reportStateAndNotification

The call is fine, I am getting a correct answer and everythign seems fine. Except that my google home app does not update the state.

I have another thirdparty-device which has a button to toggle the state, this works fine. So the app has no bug, it must be on my side..

I am wondering if this "feature" does only work in production and not during the test phase?

test suite says its fine too:

enter image description here

Upvotes: 0

Views: 715

Answers (3)

slaesh
slaesh

Reputation: 16917

We found it, see this issue-tracker too:

https://issuetracker.google.com/issues/238499831#comment16

Google Home App does ONLY use the home-graph for devices that are associated with your home "directly".

It is not enough to just have them in the bottom of your app in the section "other devices connected with your account" ..

You NEED to add them properly..

Upvotes: 0

Anukoon Suchinda
Anukoon Suchinda

Reputation: 26

I don't think the status shown by the Google Home app coming from what you have reported to HomeGraph by using the reportStateAndNotification. The QUERY intent must be invoked from Google Home app in order to see the current status of your device.

Ref

When Google Assistant wants to take an action that requires understanding the current state of a device, it can simply look up the state information in the Home Graph instead of issuing a QUERY intent

As an above statement, I think the status that you reported to HomeGraph is beneficial only for the Google Assistant not for your Google Home app.

Upvotes: 1

Siddhant Priyadarshi
Siddhant Priyadarshi

Reputation: 486

Google Home Assistant UI depends on various factors for the state, including query and report state responses. One should make sure that they are invoking the query correctly.

You should also try to verify that your report state implementation is correct by making use of tools provided by Google like Home Graph Viewer (make sure states are updated in the homegraph) and Test Suite (to see if both query and report state implementation pass).

Upvotes: 1

Related Questions