- you can use the same schedule for multiple devices
- you can easily switch between different schedules (summer, winter, vacation, party...)
- if for some reason your controller is down during a scheduled switching time, it reads the condition it should currently have from the schedule file and sets it. So even after having the device switched off for a while, the setpoints are all restored --> My main motivation to write that.
- more to come...
Code: Select all
Zeitplan Badezimmer:
-- Heizen Früh
@111.... 04:30 23.0
@...11.. 05:00 23.0
@.....11 06:00 23.0
@11111.. 06:00 18.0
@.....11 07:30 18.0
@...
Code: Select all
Zeitplan Schalter 1:
@1111111 13:10 on
@1111111 13:12 off
@1111111 13:14 on
@1111111 13:16 off
@1111111 13:18 on
- func_misc.lua ... misc functions, so far only one to get the device name from the index
- func_scheduler.lua ... all the scheduler functionality
- script_time_scheduler.lua ... the only file to edit, here the schedules and switches are assigned
Code: Select all
local schedules = {}
schedules [666] = 'temp_debug.txt'
schedules [157] = 'switch_Stecker2.txt'
schedules [145] = 'temp_arbeitszimmer.txt'
schedules [120] = 'temp_badezimmer.txt'
schedules [123] = 'temp_dusche.txt'
schedules [...
If you don't want all the spam in the protocol, just set debugmode = 0 in the script
Planned upgrades/fixes:
- Manual overrides are currently overwritten within a minute -> make manual overrides possible (inputs welcome!)
- Add more comments to the code (also for my own sake in a year or so)
- Script only checks for last switching point on previous day if none is found on current day, go back further if not every day has a schedule item
- tie debug outputs to an external switch
- misc. code improvements, some of that stuff has been written at 3 in the morning - and looks like that
- you tell me!
Misc. Function(s)
Scheduler Function
Scheduler Time Script
As I said, it's work in progress, there will be for sure improvements. And please share your ideas and improvements!