FHEM Forum

FHEM => Automatisierung => Thema gestartet von: heinzfo am 29 Oktober 2016, 14:04:39

Titel: notify für "update finished, "shutdown restart" is needed to activate the change
Beitrag von: heinzfo am 29 Oktober 2016, 14:04:39
Hallo

Ich möchte eine notify einrichten für die Message "update finished, "shutdown restart" is needed to activate the changes.

Könnte das so funktionieren, geht es überhaupt?
global:.*finished.* {fhem "set HeinzMobil send fhem Update done, restart needed!"}

Beste Grüße
Heinz
Titel: Antw:notify für "update finished, "shutdown restart" is needed to activate the change
Beitrag von: heinzfo am 29 Oktober 2016, 14:25:42
Ich antworte mal selbst.

Nach der Meldung update finished kommt noch Global global UPDATE

Damit geht es dann:
global:.*Global.global.UPDATE.* {fhem "set HeinzMobil send fhem Update done, restart needed!"}

Beste Grüße
Heinz
Titel: Antw:notify für "update finished, "shutdown restart" is needed to activate the change
Beitrag von: Markus Bloch am 29 Oktober 2016, 15:33:46
Das Event selber heißt lediglich "global:UPDATE" siehe auch commandref: http://fhem.de/commandref.html#update (Zitat: "Upon completion it triggers the global:UPDATE event.")

Ich hab bei mir bspw. den Neustart automatisiert mit:

define Restart_on_update_complete notify global:UPDATE sleep 2;;shutdown restart

In deinem Fall dann:

define <NAME> notify global:UPDATE set HeinzMobil send fhem Update done, restart needed!

Der Wechsel auf eine Perl-Expression ist nicht notwendig.

Gruß
Markus

Gruß
Markus
Titel: Antw:notify für "update finished, "shutdown restart" is needed to activate the change
Beitrag von: heinzfo am 29 Oktober 2016, 15:43:57
Hallo Markus

Danke für den Tipp!

Es geht mit global:UPDATE
define UpdateDoneWA notify global:UPDATE set HeinzMobil send fhem Update done, restart ongoing!

Und das noch:
define RestartUpdateFinished notify global:UPDATE sleep 2;; save;; sleep 2;; shutdown restart

Schönes WE