mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
71fe020f84
git-svn-id: https://svn.fhem.de/fhem/trunk@3 2b470e98-0d58-463d-a4d8-8e2adae1ed80
40 lines
1.6 KiB
Plaintext
40 lines
1.6 KiB
Plaintext
# These are only examples for the at and notify command
|
|
|
|
|
|
##################################
|
|
# absolute ones:
|
|
at 17:00:00 set lamp on # fhz command
|
|
at 17:00:00 { Log 1, "Teetime" } # Perl command
|
|
at 17:00:00 "/bin/echo "Teetime" > /dev/console" # shell command
|
|
at *17:00:00 set lamp on # repeat every day
|
|
|
|
##################################
|
|
# relative ones
|
|
at +00:00:10 set lamp on # switch the lamp on in 10 seconds
|
|
at +00:00:02 set lamp on-for-timer 1 # Blink once in 2 seconds
|
|
at +*{3}00:00:02 set lamp on-for-timer 1 # Blink 3 times
|
|
|
|
##################################
|
|
# 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") }
|
|
at +*{sunset_rel()} set lamp on
|
|
at *23:00:00 set lamp off
|
|
|
|
##################################
|
|
# A more elegant solution, which even works if sunset is after 23:00
|
|
at +*{sunset_rel()} set lamp on-till 23:00
|
|
|
|
##################################
|
|
# Only do this on weekend. For the preset perl variables see commandref.html
|
|
at +*{sunset_rel()} { fhz("set lamp on-till 23:00") if($we) }
|
|
|
|
##################################
|
|
# Switch lamp1 and lamp2 on from 7:00 till 10 minutes after sunrise
|
|
at *07:00 set lamp1,lamp2 on-till {sunrise_abs(+600)}
|
|
|
|
##################################
|
|
# Blink 3 times if the piri sends a command
|
|
notify piri:on.* at +*{3}00:00:02 set lamp on-for-timer 1
|