Weekly programming functionality allow to view a graphic table in the Domoticz timers page
Updated for Domoticz 2022.2 version
It can be used for light/switch(ON/OFF), selector levels and SetPoints
- a program can be defined on 2 weeks with the odd & even weeks mode
- the time range can be changed from 1 hour to 2 mins
- a entire program can be deactivate without deleting all timers and reactivate later with the buttons Deactivate All and Activate All
In setpoint configuration, you can define your own temperatures values for the 4th buttons. You just have to click inside the button and enter your value from to greater to the lower
////////////////////////////////////////////////////////////
To download files on domoticz folder, first move with a command line to the domoticz folder:
wget https://raw.githubusercontent.com/syrhus/domoticz-weekly-planning/master/www/app/timers/DeviceTimersController.js -O www/app/timers/DeviceTimersController.js
wget https://raw.githubusercontent.com/syrhus/domoticz-weekly-planning/master/www/app/timers/planning.js -O www/app/timers/planning.js
wget https://raw.githubusercontent.com/syrhus/domoticz-weekly-planning/master/www/css/planning.css -O www/css/planning.css
wget https://raw.githubusercontent.com/syrhus/domoticz-weekly-planning/master/www/views/timers.html -O www/views/timers.html
/////////////////////////////////////////////////////////////
Add files:
- planning.js file to the domoticz/www/app/timers folder
- planning.css file to the domoticz/www/css folder
- timers.html file to the domoticz/www/views folder
Edit the following files:
domoticz/www/app/timers/DeviceTimersController.js
add the path to planning javascript file " ,'timers/planning' "
define(['app', 'timers/factories', 'timers/components','timers/planning' ], function (app) {
1- add the trigger event timersInitialized before the call refreshTimers();
2- add the trigger event timersLoaded in the refreshTimers function
.....
init();
function init() {
.........
deviceApi.getDeviceInfo(vm.deviceIdx).then(function (device) {
.........
$( document ).trigger( "timersInitialized", [vm, refreshTimers] );//<===Update for Planning
refreshTimers();
});
vm.typeOptions = deviceTimerOptions.timerTypes;
vm.timerSettings = deviceTimerConfigUtils.getTimerDefaultConfig();
}
function refreshTimers() {
vm.selectedTimerIdx = null;
deviceTimers.getTimers(vm.deviceIdx).then(function (items) {
vm.timers = items;
$( document ).trigger( "timersLoaded", [items] );;//<===Update for Planning
});
}