i've implemented the request_sync - however i've only got it triggered from an EXEC and a QUERY. How do you implement it for a user manually refreshing their devices in the app?
Asked
Active
Viewed 95 times
1 Answers
1
REQUEST_SYNC is an ordinary HTTP API that you have full control over calling as the app developer. When it is called, it triggers a new SYNC
event from the HomeGraph, allowing you to return the full list of user's devices again. You can tie it to any sort of app-based event you want, whether it happens when the page reloads, when the user presses a refresh button, or anything else.

Nick Felker
- 11,536
- 1
- 21
- 35
-
yep, thanks - so as i said, i have it running when a user queries a device, or executes a command - but sometimes people will just want to refresh the devices. They use either Google Home, or the Google Assistant - and the refresh (drag down in the app) doesn't do anything, and I dont believe I have any control over that action. What am i missing? – Madgeni Nov 10 '17 at 08:23
-
If the user refreshes in the app, nothing will be changed. You, as the developer, will need to keep track of changes in the linked devices and send the request as needed. – Nick Felker Nov 10 '17 at 18:26
-
ok, that's a shame. I don't have control on the HA system i'm integrating with, so whilst I can kick off the request_sync at the user's point of interaction with my app - I can't enforce the call at the point of state change in the HA system. The Alexa equivalent allows for manual discovery/sync – Madgeni Nov 11 '17 at 19:31
-
A user can unlink and relink and that would cause a resync. But that's the current experience. – Nick Felker Nov 12 '17 at 01:13
-
yes, that's not great, as I believe they lose any Rooms they've set up etc. – Madgeni Nov 12 '17 at 09:46