Search code examples
google-smart-home

How local fulfillment app gets run in the Google Nest device


I'm trying to voice control my smart TV via Google Nest device. I have made a local fulfillment app and uploaded two bundles both node and web to the action console. When I tried to debug through the chrome://inspect, the web version failed to connect to the TV after a successful discovery. When I tried to run node bundle-node.js in terminal, it threw ReferenceError: smarthome is not defined.

So I am wondering how Google Nest device utilize those two bundles? Which version gets to serve in the Google Nest device? I assume the node version gets to serve, while the web version is for debugging. If my assumption holds, how does the dependency to smarthome get resolved in the node env? thanks for any help.


Solution

  • Check out the test and debug section of the Local Fulfillment Guide as a starting point. A couple highlights based on your question:

    • You need to upload your bundles to submit for production, but during testing you should self-host your local fulfillment and enter that value in the Enter your testing URL field.
    • The Local Home SDK is only present on Home/Nest devices, so you cannot currently test or debug on your local machine. You have to load the code onto the device as described in the guide and use chrome://inspect.
    • Use the web bundle when testing your integration today. This is the version that will be run on Home speakers and Nest displays.