0

I try to build my custom IoT device that will be controlled via Google Home device, and serve people with disabilities.

The device itself is Tiva C Launchpad, that I program from scratch, meaning I will have a full control on it.

In my vision, the user wil say something like: "Ok Google, press play button", and as a result, the Google Home device will send a direct command of press_play_button to the IoT device, preferably via the local network.

I found the Google Action SDK, alongside with the Local SDK extention, but if I understood correctly, I have to be in the app mode first ("OK Google, play {app_name}") before pronouncing the action I want, which is inconvenient.

Is there any way to achieve my requirement? If not, I may give up on the local network control, and use sort of a webhook to send HTTP request to my smart device, and in that case I wonder if MQTT will be more suitable.

Thanks.

barak david
  • 146
  • 8

1 Answers1

1

The Local SDK is an extension to the Smart Home API. If your device matches up with the device types and traits that the Smart Home API supports then you can use that to control your device.

It has support for media players so things like play/stop should be possible.

I have build generic Smart Home control using MQTT to reach the device, but you have to provide a HTTP endpoint for the Google System to interface with. This take a little thought as you have to map MQTT asynchronous approach to HTTP's synchronous nature.

hardillb
  • 54,545
  • 11
  • 67
  • 105
  • if I choose the Home SDK solution, does it mean I need to make my IoT device available from cloud? (port farwarding and ect') or it can operate only in the LAN level? – barak david May 13 '21 at 11:26
  • You are ALWAYS going to need a public HTTP endpoint for the Google System to call for discovery and status requests. This shouldn't be the device but a cloud service. If you implement the Local Control add on then the device it's self doesn't need to be reachable from the internet, but it can always connect out (e.g. MQTT) to the cloud service as a fall back. – hardillb May 13 '21 at 12:33
  • I think I begin to understand...what cloud service do you recommend? – barak david May 13 '21 at 14:11
  • I don't, you have to write your own. Where you hosted is entirely up to you – hardillb May 13 '21 at 14:35