Automagic und Smart home

  • Antworten:1
Dennis Eisermann
  • Forum-Beiträge: 1

06.04.2019, 05:39:48 via Website

Hallo zusammen,

ich stehe vor folgender Herausforderung. Ich benutze zur automatisieren einiger Dinge die App Automagic. Klappt auch einwandfrei.

Nun würde ich gerne einen Flow anlegen der zb das Licht zuhause einschalte sobald sich mein Handy mir meinem WLAN verbindet und genau hier komme ich nicht weiter. Als smarthome Schalter nutze ich sonoff Geräte welche ich entweder direkt über eine app oder aber auch über Alexa steuern kann.

Die Frage ist welchen Befehl muss automagic ausführen damit das ganze funktioniert. Unter den normalen Aktionen finde ich nur Sachen wie 'starte diese oder jene app' jedoch kein Befehl der eine Anforderung an die sonoff Geräte oder aber Alexa sendet.
Hat jemand von euch vielleicht einen Tipp?

Beste Grüße
Dennis

Kommentieren
irondowdy
  • Forum-Beiträge: 1

14.01.2022, 10:18:43 via Website

If the output parameter is given, the specified array will be filled with all of the command's output lines. This array does not contain trailing whitespace, such as n. Note that exec() will add to the end of the array if it already includes some entries. Before sending the array to exec, use unset() on it if you don't want the function to add entries (). Example #1 An exec() example:

// outputs the username that owns the running php/httpd process
// (on a system with the "whoami" executable in the path)
$output=null;
$retval=null;
exec('whoami', $output, $retval);
echo "Returned with status $retval and output:\n";
print_r($output);
?>
If a program is launched using this function, the program's output must be redirected to a file or another output stream in order for it to continue operating in the background. Failure to do so will cause PHP to hang until the program's execution is complete.

— geändert am 14.01.2022, 10:20:23

Hilfreich?
Kommentieren