Hi, is there a scheduler feature now?
Or do I just add timers in the script
Or do I just add timers in the script
Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tam
32
0x20
// start NTP driver, so we have time from web
startDriver NTP
ntp_setServer 192.168.111.1
ntp_timeZoneOfs -8
//Show up in Windows Network
startDriver SSDP
// Reduce power usage and heating
PowerSave 1
// Wait for NTP to connect
waitFor NTPState 1
echo "NTP is ready"
//
addClockEvent 14:31:00 0x16 1 backlog power1 on; delay_s 100; power1 off;
// This aliased command will turn off relay on CH1 after 10 seconds
// addRepeatingEvent [IntervalSeconds][RepeatsOr-1][CommandToRun]
alias turn_off_after_time addRepeatingEvent 10 1 power1 off
alias do_cycle backlog power1 on; turn_off_after_time
addClockEvent 14:31:00 0x16 1 do_cycle
// start NTP driver, so we have time from Network Time Protocol (NTP) to synchronize the clocks
startDriver NTP
// Configure a local NTP server on your LAN so that devices do not need to connect to the internet
ntp_setServer 192.168.111.1
// Set the local timezone as NTP server only provides UTC time
ntp_timeZoneOfs -8
// Setting the devices location will allow for calculating sunrise and sunset times
ntp_setLatlong 38.42825889193605 -122.58791953325273
//Show up in Windows Network
startDriver SSDP
// Reduce power usage and heating
PowerSave 1
// Wait for NTP to connect
waitFor NTPState 1
echo "NTP is ready"
//
// Turn on at 03:00:00 every day (0xff) {To be changed later to Sunday (0x01)}
//addClockEvent 14:43:00 0x16 1 backlog power1 on; delay_s 100; power1 off;
addClockEvent 08:15:00 0x7f 568 POWER ON
addClockEvent 08:16:00 0x7f 569 POWER OFF
Every bit corresponds to a day
00000001 Sunday
00000010 Monday
00000100 Tuesday
00001000 Wednessday
00010000 Thursday
00100000 Friday
01000000 Saturday
Therefore Monday, Wed, and Sat is
01001010 (Decimal: 74, Hexadecimal: 4A)
expressed as 0x4a