17.07.2024, 10:01
(15.07.2024, 06:39)admin Wrote: Can be done via a script. This example creates a scheduler for objects from 0/0/1 to 0/0/5.
Code:webrequest = require('webrequest')
for i = 1, 5 do
address = '0/0/' .. i
data = {
object = buslib.encodega(address),
active = 'on',
controlobject = 0,
name = 'Scheduler ' .. address,
start_day = 1,
start_month = 1,
end_day = 31,
end_month = 12,
}
webrequest('schedulers', 'save', { data = data })
end
how can i add object name for objects from 32/2/1 to 32/2/252.
I don't understand how to use the code below in the code above.
Code:
name = grp.find(event.dst).name
i want to use scheduler names as the name of the scheduler.
i added it manually.