Hauptmenü

Weckautomation

Begonnen von hermanski.k, 08 Dezember 2016, 08:04:11

Vorheriges Thema - Nächstes Thema

hermanski.k

Einen schönen guten Tag, seit neuestem bin ich am Thema fhem dran. Bin absolut begeistert von den Möglichkeiten. Habe aber als laie und Anfänger noch Probleme und bitte um Hilfe.

Ich möchte über das in FHEM vorhandene Modul eine weckautomation realisieren. Siehe hierzu im FHEM Wiki http://www.fhemwiki.de/wiki/Weckautomation

Sobald ich das ganze angelegt habe und einmal auf den button aus/an geklickt habe neben dem Drop Down Menü für die Uhrzeit bleibt das Feld ständig auf an und kann nicht ausgestellt werden.

Weiter würde ich gerne den Befehl Set Morgen active einfügen um meine Lampenszenario zu starten.

Ich bin mir auch nicht sicher welche Aktion für die Übernahme der Zeit sorgt. Nach dem ich eine Zeit gewählt habe springt das Drop Down  wieder auf Off bei neuem Seitenaufrufe von residents.

Zudem Zeit mein logfile folgende Fehler zum Modul.

2016.12.07 23:05:04 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:04 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:04 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:05 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:05 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:05 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:06 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:06 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:13 2: RESIDENTS set rgr_Bewohner home
2016.12.07 23:05:14 2: RESIDENTS set rgr_Bewohner absent
2016.12.07 23:05:15 2: RESIDENTS set rgr_Bewohner home
2016.12.07 23:05:16 2: RESIDENTS set rgr_Bewohner absent
2016.12.07 23:05:18 2: RESIDENTS set rgr_Bewohner home
2016.12.07 23:05:21 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:21 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:21 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:21 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:22 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:22 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:22 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:22 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:23 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:23 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:25 3: RESIDENTStk rr_Kamil_wakeuptimer1: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:26 3: RESIDENTStk rr_Kamil_wakeuptimer1: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:29 3: RESIDENTStk rr_Kamil_wakeuptimer2: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:05:57 3: RESIDENTStk rr_Kamil_wakeuptimer3: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:06:06 3: RESIDENTStk rr_Kamil_wakeuptimer3: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:12:03 2: ROOMMATE set rr_Kamil absent
2016.12.07 23:12:04 2: ROOMMATE set rr_Kamil home
2016.12.07 23:12:04 2: ROOMMATE set rr_Kamil absent
2016.12.07 23:12:05 2: ROOMMATE set rr_Kamil home
2016.12.07 23:12:05 2: ROOMMATE set rr_Kamil absent
2016.12.07 23:12:05 2: ROOMMATE set rr_Kamil home
2016.12.07 23:12:06 2: ROOMMATE set rr_Kamil absent
2016.12.07 23:12:06 2: ROOMMATE set rr_Kamil home
2016.12.07 23:12:08 3: RESIDENTStk rr_Kamil_wakeuptimer1: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:12:29 3: RESIDENTStk rr_Kamil_wakeuptimer1: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:12:53 3: RESIDENTStk rr_Kamil_wakeuptimer1: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:13:07 3: RESIDENTStk rr_Kamil_wakeuptimer1: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:13:21 3: RESIDENTStk rr_Kamil_wakeuptimer1: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:13:48 3: RESIDENTStk rr_Kamil_wakeuptimer1: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:13:57 3: RESIDENTStk rr_Kamil_wakeuptimer3: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:13:59 3: RESIDENTStk rr_Kamil_wakeuptimer3: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:14:00 3: RESIDENTStk rr_Kamil_wakeuptimer3: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:14:00 3: RESIDENTStk rr_Kamil_wakeuptimer3: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:14:01 3: RESIDENTStk rr_Kamil_wakeuptimer3: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!
2016.12.07 23:14:01 3: RESIDENTStk rr_Kamil_wakeuptimer3: ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!



Über Hilfe würde ich mich wirklich freuen. Vielen Dank

Gesendet von meinem SM-G930F mit Tapatalk


CBSnake

Guten Morgen,

http://www.fhemwiki.de/wiki/Weckautomation#Wake-up_Timer_1

Den Hinweis (Hierfür muss ein holiday-Device erstellt sein.....) hast du gelesen und umgesetzt?

Grüße
Achim
FHEM auf Debian 10, HM-Wlan, JeeLink-Wlan, Wlanduino, ConBee, TP-Link Steckdose, GHoma Steckdosen, Shelly Steckdosen

kumue

zu der FM ...
ERROR - wakeupHolidays set in this alarm clock but global attribute holiday2we not set!

Für rr_Kamil_wakeuptimer2 hast Du das wakeupHolidays Atrribut gesetzt, wei im Wiki unter Punkt "Wake-up Timer 1" beschrieben.
Hast Du auch die Holiday-Datei angelegt, in welcher Du die entsprechenden Zeiten definiert hast ?
Diese Holiday-Datei muß noch verlinkt werden. Dafür attr global holiday2we <NAME_DEINER_HO-DATEI ausführen.
Wie die Holiday-Datei aufgebaut ist, ist in der commandref beschrieben.
http://fhem.de/commandref_DE.html#holiday

hermanski.k

#3
Perfekt vielen dank. der button und die Zeiteinstellung funktionieren.

Leider wird die lampe noch nicht geschaltet.

Hat hier auch noch jemand einen Tipp für mich. :)

Aktuell sieht es so aus:

Macro_rr_Kamil_wakeuptimer1 {
##=============================================================================
## This is an example wake-up program running within a period of 30 minutes:
## - drive shutters upwards slowly
## - light up a HUE bulb from 2000K to 5600K
## - have some voice notifications via SONOS
## - have some wake-up chill music via SONOS during program run
##
## Actual FHEM commands are commented out by default as they would need
## to be adapted to your configuration.
##
## Available wake-up variables:
## 1. $EVTPART0 -> start or stop
## 2. $EVTPART1 -> target wake-up time
## 3. $EVTPART2 -> wake-up begin time considering wakeupOffset attribute
## 4. $EVTPART3 -> enforced wakeup yes=1,no=0 from wakeupEnforced attribute
## 5. $EVTPART4 -> device name of the user which called this macro
## 6. $EVTPART5 -> current state of user
##=============================================================================

##-----------------------------------------------------------------------------
## DELETE TEMP. AT-COMMANDS POTENTIALLY CREATED EARLIER BY THIS SCRIPT
## Executed for start to cleanup in case this wake-up automation is re-started.
## Executed for stop to cleanup in case the user ends this automation earlier.
##
for (my $i=1; $i <= 10; $i++) {
if (defined($defs{"atTmp_".$i."_".$NAME})) {
    fhem "delete atTmp_".$i."_".$NAME;
}
}

##-----------------------------------------------------------------------------
## BEGIN WAKE-UP PROGRAM
## Run first automation commands and create temp. at-devices for lagging actions.
##
if ($EVTPART0 eq "start") {
Log3 $NAME, 3, "$NAME: Wake-up program started for $EVTPART4 with target time $EVTPART1. Current state: $EVTPART5";
    [b]fhem "set Morgen active";[/b]
# fhem "set BR_FloorLamp:FILTER=onoff=0 pct 1 : ct 2000 : transitiontime 0; set BR_FloorLamp:FILTER=pct=1 pct 90 : ct 5600 : transitiontime 17700";

# fhem "define atTmp_1_$NAME at +00:10:00 set BR_Shutter:FILTER=pct<20 pct 20";
# fhem "define atTmp_2_$NAME at +00:20:00 set BR_Shutter:FILTER=pct<40 pct 40";
# fhem "define atTmp_4_$NAME at +00:30:00 msg audio \@Sonos_Bedroom |Hint| Es ist ".$EVTPART1." Uhr, Zeit zum aufstehen!;; set BR_FloorLamp:FILTER=pct<100 pct 100 60;; sleep 10;; set BR_Shutter:FILTER=pct<60 pct 60;; set Sonos_Bedroom:FILTER=Volume<10 Volume 10 10";

# if wake-up should be enforced
if ($EVTPART3) {
Log (4, "$NAME: planning enforced wake-up");
# fhem "define atTmp_3_$NAME at +00:25:00 set Sonos_Bedroom:FILTER=Volume>4 Volume 4;; sleep 0.5;; set Sonos_Bedroom:FILTER=Shuffle=0 Shuffle 1;; sleep 0.5;; set Sonos_Bedroom StartFavourite Morning%20Sounds";
# fhem "define atTmp_4_$NAME at +00:26:00 set Sonos_Bedroom:FILTER=Volume<5 Volume 5";
# fhem "define atTmp_5_$NAME at +00:27:00 set Sonos_Bedroom:FILTER=Volume<6 Volume 6";
# fhem "define atTmp_6_$NAME at +00:28:00 set Sonos_Bedroom:FILTER=Volume<7 Volume 7";
# fhem "define atTmp_7_$NAME at +00:29:00 set Sonos_Bedroom:FILTER=Volume<8 Volume 8";
}
}

##-----------------------------------------------------------------------------
## END WAKE-UP PROGRAM (OPTIONAL)
## Put some post wake-up tasks here like reminders after the actual wake-up period.
##
## Note: Will only be run when program ends normally after minutes specified in wakeupOffset.
##       If stop was user-forced by sending explicit set-command 'stop', this is not executed
##       assuming the user does not want any further automation activities.
##
if ($EVTPART0 eq "stop") {
Log3 $NAME, 3, "$NAME: Wake-up program ended for $EVTPART4 with target time $EVTPART1. Current state: $EVTPART5";

# if wake-up should be enforced, auto-change user state from 'asleep' to 'awoken'
# after a small additional nap to kick you out of bed if user did not confirm to be awake :-)
# An additional notify for user state 'awoken' may take further actions
# and change to state 'home' afterwards.
if ($EVTPART3) {
fhem "define atTmp_9_$NAME at +00:05:00 set $EVTPART4:FILTER=STATE=asleep awoken";

# Without enforced wake-up, be jentle and just set user state to 'home' after some
# additional long nap time
} else {
fhem "define atTmp_9_$NAME at +01:30:00 set $EVTPART4:FILTER=STATE=asleep home";
    }
}

}

hermanski.k

#4
Zitat von: hermanski.k am 08 Dezember 2016, 20:14:52
Perfekt vielen dank. der button und die Zeiteinstellung funktionieren.

Leider wird die lampe noch nicht geschaltet.

Hat hier auch noch jemand einen Tipp für mich. :)

Aktuell sieht es so aus:

Macro_rr_Kamil_wakeuptimer1 {
##=============================================================================
## This is an example wake-up program running within a period of 30 minutes:
## - drive shutters upwards slowly
## - light up a HUE bulb from 2000K to 5600K
## - have some voice notifications via SONOS
## - have some wake-up chill music via SONOS during program run
##
## Actual FHEM commands are commented out by default as they would need
## to be adapted to your configuration.
##
## Available wake-up variables:
## 1. $EVTPART0 -> start or stop
## 2. $EVTPART1 -> target wake-up time
## 3. $EVTPART2 -> wake-up begin time considering wakeupOffset attribute
## 4. $EVTPART3 -> enforced wakeup yes=1,no=0 from wakeupEnforced attribute
## 5. $EVTPART4 -> device name of the user which called this macro
## 6. $EVTPART5 -> current state of user
##=============================================================================

##-----------------------------------------------------------------------------
## DELETE TEMP. AT-COMMANDS POTENTIALLY CREATED EARLIER BY THIS SCRIPT
## Executed for start to cleanup in case this wake-up automation is re-started.
## Executed for stop to cleanup in case the user ends this automation earlier.
##
for (my $i=1; $i <= 10; $i++) {
if (defined($defs{"atTmp_".$i."_".$NAME})) {
    fhem "delete atTmp_".$i."_".$NAME;
}
}

##-----------------------------------------------------------------------------
## BEGIN WAKE-UP PROGRAM
## Run first automation commands and create temp. at-devices for lagging actions.
##
if ($EVTPART0 eq "start") {
Log3 $NAME, 3, "$NAME: Wake-up program started for $EVTPART4 with target time $EVTPART1. Current state: $EVTPART5";
        fhem "set Morgen active";
# fhem "set BR_FloorLamp:FILTER=onoff=0 pct 1 : ct 2000 : transitiontime 0; set BR_FloorLamp:FILTER=pct=1 pct 90 : ct 5600 : transitiontime 17700";

# fhem "define atTmp_1_$NAME at +00:10:00 set BR_Shutter:FILTER=pct<20 pct 20";
# fhem "define atTmp_2_$NAME at +00:20:00 set BR_Shutter:FILTER=pct<40 pct 40";
# fhem "define atTmp_4_$NAME at +00:30:00 msg audio \@Sonos_Bedroom |Hint| Es ist ".$EVTPART1." Uhr, Zeit zum aufstehen!;; set BR_FloorLamp:FILTER=pct<100 pct 100 60;; sleep 10;; set BR_Shutter:FILTER=pct<60 pct 60;; set Sonos_Bedroom:FILTER=Volume<10 Volume 10 10";

# if wake-up should be enforced
if ($EVTPART3) {
Log (4, "$NAME: planning enforced wake-up");
# fhem "define atTmp_3_$NAME at +00:25:00 set Sonos_Bedroom:FILTER=Volume>4 Volume 4;; sleep 0.5;; set Sonos_Bedroom:FILTER=Shuffle=0 Shuffle 1;; sleep 0.5;; set Sonos_Bedroom StartFavourite Morning%20Sounds";
# fhem "define atTmp_4_$NAME at +00:26:00 set Sonos_Bedroom:FILTER=Volume<5 Volume 5";
# fhem "define atTmp_5_$NAME at +00:27:00 set Sonos_Bedroom:FILTER=Volume<6 Volume 6";
# fhem "define atTmp_6_$NAME at +00:28:00 set Sonos_Bedroom:FILTER=Volume<7 Volume 7";
# fhem "define atTmp_7_$NAME at +00:29:00 set Sonos_Bedroom:FILTER=Volume<8 Volume 8";
}
}

##-----------------------------------------------------------------------------
## END WAKE-UP PROGRAM (OPTIONAL)
## Put some post wake-up tasks here like reminders after the actual wake-up period.
##
## Note: Will only be run when program ends normally after minutes specified in wakeupOffset.
##       If stop was user-forced by sending explicit set-command 'stop', this is not executed
##       assuming the user does not want any further automation activities.
##
if ($EVTPART0 eq "stop") {
Log3 $NAME, 3, "$NAME: Wake-up program ended for $EVTPART4 with target time $EVTPART1. Current state: $EVTPART5";

# if wake-up should be enforced, auto-change user state from 'asleep' to 'awoken'
# after a small additional nap to kick you out of bed if user did not confirm to be awake :-)
# An additional notify for user state 'awoken' may take further actions
# and change to state 'home' afterwards.
if ($EVTPART3) {
fhem "define atTmp_9_$NAME at +00:05:00 set $EVTPART4:FILTER=STATE=asleep awoken";

# Without enforced wake-up, be jentle and just set user state to 'home' after some
# additional long nap time
} else {
fhem "define atTmp_9_$NAME at +01:30:00 set $EVTPART4:FILTER=STATE=asleep home";
    }
}

}



nur ein Befehl   fhem "set Morgen active";


log sieht wie folgt aus:

2016.12.08 21:30:47 3: Macro_rr_Kamil_wakeuptimer1 return value: Global symbol "$EVTPART0" requires explicit package name at (eval 591) line 36.
Global symbol "$EVTPART4" requires explicit package name at (eval 591) line 37.
Global symbol "$EVTPART1" requires explicit package name at (eval 591) line 37.
Global symbol "$EVTPART5" requires explicit package name at (eval 591) line 37.
Global symbol "$EVTPART3" requires explicit package name at (eval 591) line 46.
Global symbol "$EVTPART0" requires explicit package name at (eval 591) line 64.
Global symbol "$EVTPART4" requires explicit package name at (eval 591) line 65.
Global symbol "$EVTPART1" requires explicit package name at (eval 591) line 65.
Global symbol "$EVTPART5" requires explicit package name at (eval 591) line 65.
Global symbol "$EVTPART3" requires explicit package name at (eval 591) line 71.
Global symbol "$EVTPART4" requires explicit package name at (eval 591) line 72.
Global symbol "$EVTPART4" requires explicit package name at (eval 591) line 77.