'local fulfillment not broadcasting
I've got cloud fulfillment working, now I'm trying to setup local fulfillment (with a local hub). I think I'm close, but I've gotten stuck.
When my server responds to SYNC
, it adds an otherDeviceId
. (Extra credit questions: 1) Can this be the same as the device ID? That's all I need to identify the device locally. 2) Do I use deviceBuilder.addOtherDeviceId(device.id, device.id)
or deviceBuilder.addOtherDeviceId("deviceId", device.id)
?)
I have gone through the "Test device control" docs and see my Google Home at chrome://inspect/#devices
. Clicking Inspect
opens the dev tools with my testing URL, the JS runs without error: the smarthome.App is listening, "Ready" is printed to the console. None of the onIdentify
, onReachableDevices
, or onExecute
functions ever get called though.
I have software on my LAN listening for a UDP datagram on the correct port, though it never receives any. That listening software is on the same network as the Google Home. I have used a mobile app to broadcast and verified the software does receive it, so the router is not blocking broadcasts.
Finally, I tell the Google Home to turn on my device, but it says "the isn't available right now". However, I do see the device in the Home app, and I can control it there (via the cloud). Shouldn't it fallback to using the cloud if local fulfillment fails? If I say "force local", it replies: "OK--Sorry, something went wrong and I'm unable to control your home device." Does this get logged somewhere? All the logs in the Google Cloud Console look good.
I'm expecting the Google Home to broadcast (using 255.255.255.255) on the LAN and for onIdentify
to get called in my JS, but those things don't seem to be happening.
Any ideas where I've gone astray, or how to debug from here?
Edit:
Solution 1:[1]
A local fulfillment path is established when Google matches a locally-controllable device to a device returned in the SYNC response. The “otherDeviceId” is what Google uses to identify your devices, which should be unique.
We do have a Troubleshooting Flow that works for your local devices as well. You can take a look at the error codes, and search them in your logs to find out more about your error. There is also a Local Event Count metric that you can use to debug local events.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Anish Yadav |