-1

I want to control my raspberry pi with my Google Home at college, but everything I find involves a server and opening a port which I can not do on my schools network.

Is there another way I can do this?

Prisoner
  • 49,922
  • 7
  • 53
  • 105
Porkr27
  • 7
  • 1
  • 2
  • 1
    Could you not create an application similar to the google home app to connect to it? Might be a lot of work, but it’s a possibility. – George Willcox Dec 27 '18 at 23:39

3 Answers3

0

The Google Home has no way to directly control other devices on the same network or through other wireless protocols. Everything goes through an Internet-based service and expects to communicate with devices via a server-based proxy. How that server communicates with the device is up to the developer.

Depending on your needs and capabilities, you do have a few options.

One option, for example, is to use a tool like ngrok to create a tunnel between the device itself and a service run by ngrok on the public Internet. Calls to the public https address are sent to a service running locally on your device, and you can handle it accordingly.

Another is to have your device connect to a server and listen for command changes, and then execute those changes. If you don't want to run a server, you can even use something like Firebase - have your device listen for changes on the real-time database (which can use the HTTPS port to communicate as a client, so you don't open anything) and have something like a Firebase Cloud Function act as the webhook for your Action.

Prisoner
  • 49,922
  • 7
  • 53
  • 105
0

Go through this blog post: http://nilhcem.com/android-things/google-assistant-smart-home

You will have to set up a OAuth server but as @Prisoner said you can use ngrok to tunnel the device to internet, BUT I would recommend using "localtunnel" as it provides a free static url and the set-up is also easy. NO Port Forwarding is required with this method.

More info on localtunnel setup:- How to generate fixed url with ngrok

Moreover you need to activate the OAuth server only once for account linking & than you can close it.

Electric_90
  • 161
  • 1
  • 11
0

The simplest way I can think of is to expose your Pi to the internet (using port forwarding, ngrok, or whatever) then set up an IFTTT Google Assistant trigger to invoke a webhook which points to your exposed Pi.

c24w
  • 7,421
  • 7
  • 39
  • 47