Unfortunately this is not suitable for me. Because the addresses do not go in a certain order and the names must also be meaningful. But if it was a visual addition then things would be great. I hope such an option will be added in the future.
The script can modified to create schedulers for a given tag and use object names as scheduler names. Alternatively a table with group address -> scheduler name mapping can be used to quickly create multiple schedulers.
I would like to know who do we manage to add sub-items :
- active
- name
- run at (ezg specific time, sunrise, sunset)
- start time
- days of the week (all, Mo, Tu, ... Su)
- week days of the month (all, 1st, 2nd, ...last)
- ...
- value
webrequest = require('webrequest')
data = {
value = '0', -- value to sendscheduler = 1, -- parent scheduler IDname = 'new event',
active = 'on', -- 'on' or 'off'type = '', -- '' (run at specific time), 'sunrise' or 'sunset'start_hour = 13, -- only for run at specific timestart_min = 0, -- only for run at specific timeoffset_hour = -1, -- only for 'sunrise' or 'sunset'offset_min = 30, -- only for 'sunrise' or 'sunset'year = 0, -- 0 = all years, specific year otherwisemonths = '111111111111', -- Jan to Dec, 1 = on, 0 = offdaysofmonth = '1111111111111111111111111111111', -- 1..31, 1 = on, 0 = offdaysofweek = '1111111', -- Monday to Sunday, 1 = on, 0 = offdayweeknrs = '111111', -- week 1 to 5 in month, 6th value = Last week of the month, 1 = on, 0 = offholidays = '', -- '' (don't care), 'y' (run on holidays), 'n' (don't run on holidays)
}
res, err = webrequest('schedulers', 'events-save', { data = data })
log(res, err)
Hi, i was just wondering how to add entries to the Holiday Schedule via script?
It' the time of the year where it may be cool to create an automatic calculation for Easter etc.
webrequest = require('webrequest')
data = {
name = 'new holiday',
type = '', -- '' (specific date) or 'dayweeknr' (day of the week)day = 1, -- day of the month numbermonth = 1, -- month number, 1 = Jan, 12 = Decyear = 0, -- 0 = all years, specific year otherwiseduration = 1, -- duration in daysdayofweek = 1, -- day of the week, 1 = Monday, 7 = Sundaydayweeknr = 1, -- 1st, 2nd etc day in a month, 6th value = last
}
res, err = webrequest('schedulers', 'holidays-save', { data = data })
log(res, err)
Thanks Admin.
When updating an existing holiday with holidays-save, or an event with events-save, is there a rule that we should send all data elements as the gui seems to do (SE 5500 AC2 v2.1.0), or is it allowed to only send the changed elements?
Cheers