Remote script execution on Pi

Thanks for the quick reply nrobinson!
I tried and it doesn't work.
Also running python scripts doesn't show any results.
This might be a matter of my setup:

I run the Google Assistant SDK on my Raspi 3
Then, in IFTTT I setup an applet the uses the GA (with one text ingredient) as trigger and publishes an event to Particle. In Particle the text ingredient determines which if function is to be exexuted back on my RasPi.

 if (strcmp(data,"off")==0) {
    // if GA text ingredient is "off"
    digitalWrite(led,LOW);
    digitalWrite(boardLed,LOW);
  }
  else if (strcmp(data,"on")==0) {
    // if GA text ingredient is "on"
    digitalWrite(led,HIGH);
    digitalWrite(boardLed,HIGH);
  }
  else if (strcmp(data,"open")==0) {
    // if GA text ingredient is "open"
    Process proc = Process::run("DISPLAY=:0 xdg-open http://google.de");
    proc.wait();
  }

Controlling the GPIOs works fine (on/off). "open" is also recognized correctly and IFTTT sends the right "answer". Just the run() functions only works for shutdown/restart so far.

It'd be awsome to be able to run any script and finally have the unltimate control what GA does for me.
Any ideas?

Best regards,
Flo

1 Like