diff --git a/.gitignore b/.gitignore index e6806a3..21098b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules *.map mylogfile.log +dispatcher_ng.log diff --git a/dist/main.js b/dist/main.js index b12d862..9082ca6 100644 --- a/dist/main.js +++ b/dist/main.js @@ -25,8 +25,8 @@ let aquariumLight = new M433SwitchItem_1.M433SwitchItem('1st', 'Anna', 'Aquarium aquariumLight.start(); allLabeledItems.push(aquariumLight); let aquariumLightCron = new Cron_1.Cron('aquariumLightCron', aquariumLight, [ - { cronTime: '00 00 07 * * 1-5', output: 'ON' }, - { cronTime: '00 00 09 * * 6-7', output: 'ON' }, + { cronTime: '00 00 07 * * mon-fri', output: 'ON' }, + { cronTime: '00 00 09 * * sat-sun', output: 'ON' }, { cronTime: '00 00 13 * * *', output: 'OFF' }, { cronTime: '00 00 14 * * *', output: 'ON' }, { cronTime: '00 00 22 * * *', output: 'OFF' } @@ -155,8 +155,8 @@ let thermostatBathroomGnd = new MaxThermostat_1.MaxThermostat('Gnd', 'Bathroom', thermostatBathroomGnd.start(); allLabeledItems.push(thermostatBathroomGnd); let thermostatBathroomGndCron = new Cron_1.Cron('thermostatBathroomGndCron', thermostatBathroomGnd, [ - { cronTime: '00 00 06 * * 1-5', output: '21.0' }, - { cronTime: '00 00 08 * * 6-7', output: '21.0' }, + { cronTime: '00 00 06 * * mon-fri', output: '21.0' }, + { cronTime: '00 00 08 * * sat-sun', output: '21.0' }, { cronTime: '00 00 11 * * *', output: '5.0' }, { cronTime: '00 00 19 * * *', output: '21.0' }, { cronTime: '00 00 23 * * *', output: '5.0' } @@ -169,8 +169,8 @@ let thermostatBathroom1st = new MaxThermostat_1.MaxThermostat('1st', 'Bathroom', thermostatBathroom1st.start(); allLabeledItems.push(thermostatBathroom1st); let thermostatBathroom1stCron = new Cron_1.Cron('thermostatBathroom1stCron', thermostatBathroom1st, [ - { cronTime: '00 00 06 * * 1-5', output: '21.0' }, - { cronTime: '00 00 08 * * 6-7', output: '21.0' }, + { cronTime: '00 00 06 * * mon-fri', output: '21.0' }, + { cronTime: '00 00 08 * * sat-sun', output: '21.0' }, { cronTime: '00 00 11 * * *', output: '5.0' }, { cronTime: '00 00 19 * * *', output: '21.0' }, { cronTime: '00 00 23 * * *', output: '5.0' } @@ -194,10 +194,10 @@ let thermostatKitchen = new MaxThermostat_1.MaxThermostat('Gnd', 'Kitchen', 'The thermostatKitchen.start(); allLabeledItems.push(thermostatKitchen); let thermostatKitchenCron = new Cron_1.Cron('thermostatKitchenCron', thermostatKitchen, [ - { cronTime: '00 00 06 * * 1-5', output: '21.0' }, - { cronTime: '00 00 08 * * 6-7', output: '21.0' }, - { cronTime: '00 00 10 * * 1-3', output: '5.0' }, - { cronTime: '00 30 13 * * *', output: '21.0' }, + { cronTime: '00 00 06 * * mon-fri', output: '20.0' }, + { cronTime: '00 00 08 * * sat-sun', output: '20.0' }, + { cronTime: '00 00 10 * * mon-wed', output: '5.0' }, + { cronTime: '00 30 13 * * mon-wed', output: '20.0' }, { cronTime: '00 00 23 * * *', output: '5.0' } ]); thermostatKitchenCron.start(); diff --git a/src/main.ts b/src/main.ts index 8049570..b8a8527 100644 --- a/src/main.ts +++ b/src/main.ts @@ -32,8 +32,8 @@ aquariumLight.start() allLabeledItems.push(aquariumLight) let aquariumLightCron = new Cron('aquariumLightCron', aquariumLight, [ - {cronTime: '00 00 07 * * 1-5', output: 'ON'}, - {cronTime: '00 00 09 * * 6-7', output: 'ON'}, + {cronTime: '00 00 07 * * mon-fri', output: 'ON'}, + {cronTime: '00 00 09 * * sat-sun', output: 'ON'}, {cronTime: '00 00 13 * * *', output: 'OFF'}, {cronTime: '00 00 14 * * *', output: 'ON'}, {cronTime: '00 00 22 * * *', output: 'OFF'} @@ -204,8 +204,8 @@ thermostatBathroomGnd.start() allLabeledItems.push(thermostatBathroomGnd) let thermostatBathroomGndCron = new Cron('thermostatBathroomGndCron', thermostatBathroomGnd, [ - {cronTime: '00 00 06 * * 1-5', output: '21.0'}, - {cronTime: '00 00 08 * * 6-7', output: '21.0'}, + {cronTime: '00 00 06 * * mon-fri', output: '21.0'}, + {cronTime: '00 00 08 * * sat-sun', output: '21.0'}, {cronTime: '00 00 11 * * *', output: '5.0'}, {cronTime: '00 00 19 * * *', output: '21.0'}, {cronTime: '00 00 23 * * *', output: '5.0'} @@ -222,8 +222,8 @@ thermostatBathroom1st.start() allLabeledItems.push(thermostatBathroom1st) let thermostatBathroom1stCron = new Cron('thermostatBathroom1stCron', thermostatBathroom1st, [ - {cronTime: '00 00 06 * * 1-5', output: '21.0'}, - {cronTime: '00 00 08 * * 6-7', output: '21.0'}, + {cronTime: '00 00 06 * * mon-fri', output: '21.0'}, + {cronTime: '00 00 08 * * sat-sun', output: '21.0'}, {cronTime: '00 00 11 * * *', output: '5.0'}, {cronTime: '00 00 19 * * *', output: '21.0'}, {cronTime: '00 00 23 * * *', output: '5.0'} @@ -251,10 +251,10 @@ thermostatKitchen.start() allLabeledItems.push(thermostatKitchen) let thermostatKitchenCron = new Cron('thermostatKitchenCron', thermostatKitchen, [ - {cronTime: '00 00 06 * * 1-5', output: '21.0'}, - {cronTime: '00 00 08 * * 6-7', output: '21.0'}, - {cronTime: '00 00 10 * * 1-3', output: '5.0'}, - {cronTime: '00 30 13 * * *', output: '21.0'}, + {cronTime: '00 00 06 * * mon-fri', output: '20.0'}, + {cronTime: '00 00 08 * * sat-sun', output: '20.0'}, + {cronTime: '00 00 10 * * mon-wed', output: '5.0'}, + {cronTime: '00 30 13 * * mon-wed', output: '20.0'}, {cronTime: '00 00 23 * * *', output: '5.0'} ]) thermostatKitchenCron.start()