2007-01-30 12:47:36 +00:00
|
|
|
# These are only examples for the at and notify command
|
|
|
|
|
|
|
|
|
|
|
|
##################################
|
|
|
|
# absolute ones:
|
2007-03-19 14:59:37 +00:00
|
|
|
define a1 at 17:00:00 set lamp on # fhem command
|
|
|
|
define a2 at 17:00:00 { Log 1, "Teetime" } # Perl command
|
|
|
|
define a3 at 17:00:00 "/bin/echo "Teetime" > /dev/console" # shell command
|
|
|
|
define a4 at *17:00:00 set lamp on # repeat every day
|
2007-01-30 12:47:36 +00:00
|
|
|
|
|
|
|
##################################
|
|
|
|
# relative ones
|
2007-03-19 14:59:37 +00:00
|
|
|
define a5 at +00:00:10 set lamp on # switch the lamp on in 10 seconds
|
|
|
|
define a6 at +00:00:02 set lamp on-for-timer 1 # Blink once in 2 seconds
|
|
|
|
define a7 at +*{3}00:00:02 set lamp on-for-timer 1 # Blink 3 times
|
2007-01-30 12:47:36 +00:00
|
|
|
|
|
|
|
##################################
|
|
|
|
# Switch the lamp on from sunset to 11 PM each day
|
|
|
|
# You have to install 99_SUNRISE.pm in the FHEM directory to have sunset()
|
|
|
|
# We have to use the relative versions, as the next event is computed now
|
|
|
|
{ sunrise_coord("8.686", "50.112", "Europe/Berlin") }
|
2007-03-19 14:59:37 +00:00
|
|
|
define a8 at +*{sunset_rel()} set lamp on
|
|
|
|
define a9 at *23:00:00 set lamp off
|
2007-01-30 12:47:36 +00:00
|
|
|
|
|
|
|
##################################
|
|
|
|
# A more elegant solution, which even works if sunset is after 23:00
|
2007-03-19 14:59:37 +00:00
|
|
|
define a10 at +*{sunset_rel()} set lamp on-till 23:00
|
2007-01-30 12:47:36 +00:00
|
|
|
|
|
|
|
##################################
|
|
|
|
# Only do this on weekend. For the preset perl variables see commandref.html
|
2007-03-19 14:59:37 +00:00
|
|
|
define a11 at +*{sunset_rel()} { fhem("set lamp on-till 23:00") if($we) }
|
2007-01-30 12:47:36 +00:00
|
|
|
|
|
|
|
##################################
|
|
|
|
# Switch lamp1 and lamp2 on from 7:00 till 10 minutes after sunrise
|
2007-03-19 14:59:37 +00:00
|
|
|
define a12 at *07:00 set lamp1,lamp2 on-till {sunrise_abs(+600)}
|
2007-01-30 12:47:36 +00:00
|
|
|
|
|
|
|
##################################
|
|
|
|
# Blink 3 times if the piri sends a command
|
2007-03-19 14:59:37 +00:00
|
|
|
define n1 notify piri:on.* define a13 at +*{3}00:00:02 set lamp on-for-timer 1
|