Skip to content

Instantly share code, notes, and snippets.

@MichaelNL
Created July 20, 2013 15:56
Show Gist options
  • Save MichaelNL/6045532 to your computer and use it in GitHub Desktop.
Save MichaelNL/6045532 to your computer and use it in GitHub Desktop.
Hue 1.1 schedule time formats
“time” (string)– Required - Time when the schedule occurs in extended ISO 8601:2004 format. Note time is always measured in the bridge in UTC time.
The set value that is supported is as follows:-
Non-recurring schedule – [YYYY]:[MM]:[DD]T[hh]:[mm]:[ss]
Non-recurring schedule with random– [YYYY]:[MM]:[DD]T[hh]:[mm]:[ss]A[hh]:[mm]:[ss]
Recurring schedule – W[bbb]T[hh]:[mm]:[ss]
Recurring schedule with random – W[bbb]T[hh]:[mm]:[ss]A[hh]:[mm]:[ss]
Timer – PT[hh]:[mm]:[ss]
Timer with random element - PT[hh]:[mm]:[ss] A[hh]:[mm]:[ss]
Recurring timer – R[nn]/PT[hh]:[mm]:[ss]
Recurring timer with random element – R[nn]/PT[hh]:[mm]:[ss]A[hh]:[mm]:[ss]
Where YYYY is the year [1970..2097], MM is the month[01:12], DD is the date [01:31].
Where hh is hours [00..24], mm is minutes [00:59], ss is seconds [00:59].
T indicates the next part is a time
Where P indicates the following is an interval
Where A indicates the start of an approximate time interval.
Where R indicates the following should be recurring
nn [absent or 00..99]specifies how many recurrences there should be. Not specifying n implies it should repeat forever. A value of one means the event will only be triggered once.
Where W indicates weekly recurrence.
bbb [0..127] – is a bit mask to indicate which days in a 7 day cycle are chosen.
• so bbb = 0MTWTFSS – So only Tuesdays is 00100000 = 32
• Weekdays is 01111100 = 124
/ - seperates the recurrence from the time
Note: If two schedules with a random element are set in the bridge with identical “time” resources they will execute simultaneously although at a different random time in the window each recurrence.
e.g. W124/T06:00:00A00:30:00 will trigger an event every weekday at 6am +- 30 minutes. i.e on Monday it might go off at 5.45, on Tuesday at 6.05 and at Wednesday at 6.20 etc. Each event will have the random element seperately applied to it.
e.g. PT00:05:00A00:00:30 will trigger an event after 5 minutes +/- 30 seconds
e.g. R/PT00:25:00A00:05:00 will trigger an event every 25 minutes +/- 5 minutes
Etc
e.g. W124/T06:00:00 will trigger an event every weekday at 6am.
e.g. R24/PT01:00:00 will trigger an event every hour for the next 24 hours from when it is set.
e.g. PT00:05:00 will trigger an event after 5 minutes
Incorrectly formatted value should raise error 7. If the time is in the past and will never trigger error 7 should also be raised.
@fearlessfreap24
Copy link

I've just spent 4 hours looking for the what bbb means. Had to use advanced google search to get here. Thank you for this information !!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment