Problem
When fulfilling SYNC requests, QUERY requests and ReportState calls, I'm reporting all devices as "online": true
. I can see this value being correctly read by Google, in that the values appear set on the ReportState Dashboard test tool. Android works fine, showing the device online ("Linked to you") after a brief query ("Connecting..."). Converesly, when using the iOS mobile client, as the user goes into the page for a device, it queries only to then report the device as being offline. Both the dashboard and JSON responses to calls all show "online": true
. If the user tries interacting with the device, for example turning it on, it works.
QUERY Response
{
"requestId": "ARequestId",
"payload": {
"devices": [{
"id": "ADeviceId",
"online": true,
"status": "SUCCESS"
}]
}
}
Notes
This could be a bug in the iOS client, but it seems much more likely it's a bug in my code or misunderstanding on my part as this is my first Smart Home Action.
I've tried including "online": true
all over the place, e.g. in SYNC, QUERY and ReportState calls. This has at least given the dashboard awareness of the initial online state, but not helped the iOS client.
In general, ReportState seems to work fine, in that my changes are reflected in the dashboard.
Screenshots
Note the contradiction between the test tool's state and the iOS client's indication.