How can I make the Google Home block broadcast and read UDP datagrams?

I would say "Ok Google, turn off the TV."

The smart TV that I have can be found on the network by transmitting a UDP datagram. Then the TV will send back the UDP datagram with her name, etc. The IP address of the datagram source is the IP address of the TV. (Once the IP address has been detected, the TV can be turned off with a simple HTTP request, but this time ignore this step.)

There are currently no APIs for broadcasting UDP and receiving from a Google Home device. Did I miss something?

Edit: I think I need to wait for https://developers.google.com/actions/develop/direct

+4
source share
1 answer

This is not yet possible. Perhaps you can redirect this request to a local server running on the same network.

As a basic idea (I have not tested whether this is really possible):

  • Register your own callback using our own web service
  • User authentication
    • If you already know the user, you can send a push message to the "controller" in the local network where your TV is located.
    • If you do not know that the user will ask the user to configure a "push receiver" on your local network. For instance. Android app for your device. When done, complete step 1.
  • Make your magic from your local network, where you have access to your TV.
  • Profit!
0
source

Source: https://habr.com/ru/post/1663387/


All Articles