From d87fceb73ed3ceb6e96d40c1ce7908d8d321c35a Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Mon, 15 Jan 2018 19:32:55 +0100 Subject: [PATCH] thermostats --- dist/main.js | 37 +++++++++++++++++++++++++------------ src/main.ts | 46 ++++++++++++++++++++++++++++++++-------------- 2 files changed, 57 insertions(+), 26 deletions(-) diff --git a/dist/main.js b/dist/main.js index 033e1bf..ffabdb7 100644 --- a/dist/main.js +++ b/dist/main.js @@ -135,6 +135,31 @@ let morningLightScene = new Scene_1.LightScene('Gnd', 'Hallway', 'MorningLight', morningLightScene.start(); allLabeledItems.push(morningLightScene); // ---------------------------------------------------------------------------------------------------------- +let windowContactBathroomGnd = new MaxWindowContact_1.MaxWindowContact('Gnd', 'Bathroom', 'WindowContact', 'Fenster Bad unten', 7); +windowContactBathroomGnd.start(); +let thermostatBathroomGnd = new MaxThermostat_1.MaxThermostat('Gnd', 'Bathroom', 'Thermostat', 'Thermostat Bad unten', 4, [windowContactBathroomGnd]); +thermostatBathroomGnd.start(); +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 11 * * *', output: '5.0' }, + { cronTime: '00 00 19 * * *', output: '21.0' }, + { cronTime: '00 00 23 * * *', output: '5.0' } +]); +thermostatBathroomGndCron.start(); +let windowContactBathroom1st = new MaxWindowContact_1.MaxWindowContact('1st', 'Bathroom', 'WindowContact', 'Fenster Bad oben', 7); +windowContactBathroom1st.start(); +let thermostatBathroom1st = new MaxThermostat_1.MaxThermostat('1st', 'Bathroom', 'Thermostat', 'Thermostat Bad oben', 4, [windowContactBathroom1st]); +thermostatBathroom1st.start(); +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 11 * * *', output: '5.0' }, + { cronTime: '00 00 19 * * *', output: '21.0' }, + { cronTime: '00 00 23 * * *', output: '5.0' } +]); +thermostatBathroom1stCron.start(); +// ---------------------------------------------------------------------------------------------------------- let testFourButton = new HomematicFourButtonThing_1.HomematicFourButtonThing('Gnd', 'Hallway', 'TestButton', 9, [ new HomematicFourButtonThing_1.HomematicFourButtonSingleItem('dispatcher_ng/items/Gnd/Hallway/Testlight/dimmerIn'), new HomematicFourButtonThing_1.HomematicFourButtonSingleItem('dispatcher_ng/items/Gnd/Hallway/DeskLight/timerIn'), @@ -157,18 +182,6 @@ let testForwarder = new Forwarder_1.Forwarder('Gnd', 'Hallway', 'TestForwarder', testForwarder.start(); let testScene = new Scene_1.LightScene('Gnd', 'Hallway', 'TestScene', 'TestScene', [aquariumLight, annaBedLight], [matthiasStandLights, matthiasBedLight]); testScene.start(); -let windowContact1 = new MaxWindowContact_1.MaxWindowContact('Gnd', 'Bathroom', 'WindowContact1', 'Fenster Bad unten', 2); -windowContact1.start(); -let windowContact2 = new MaxWindowContact_1.MaxWindowContact('Gnd', 'Bathroom', 'WindowContact2', 'Fenster Bad unten', 20); -windowContact2.start(); -let thermostat1 = new MaxThermostat_1.MaxThermostat('Gnd', 'Bathroom', 'Thermostat', 'Thermostat Bad unten', 3, [windowContact1, windowContact2]); -thermostat1.start(); -let thermostat1Cron = new Cron_1.Cron('Thermostat1Cron', thermostat1, [ - { cronTime: '00 47 17 * * *', output: '5.0' }, - { cronTime: '00 48 17 * * *', output: '20.0' }, - { cronTime: '00 49 17 * * *', output: '25.0' } -]); -thermostat1Cron.start(); // ---------------------------------------------------------------------------------------------------------- // Homekit export let homekitObject = {}; diff --git a/src/main.ts b/src/main.ts index 7340992..5e92885 100644 --- a/src/main.ts +++ b/src/main.ts @@ -178,6 +178,38 @@ morningLightScene.start() allLabeledItems.push(morningLightScene) +// ---------------------------------------------------------------------------------------------------------- +let windowContactBathroomGnd = new MaxWindowContact('Gnd', 'Bathroom', 'WindowContact', 'Fenster Bad unten', 7) +windowContactBathroomGnd.start() + +let thermostatBathroomGnd = new MaxThermostat('Gnd', 'Bathroom', 'Thermostat', 'Thermostat Bad unten', 4, [windowContactBathroomGnd]) +thermostatBathroomGnd.start() + +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 11 * * *', output: '5.0'}, + {cronTime: '00 00 19 * * *', output: '21.0'}, + {cronTime: '00 00 23 * * *', output: '5.0'} +]) +thermostatBathroomGndCron.start() + + +let windowContactBathroom1st = new MaxWindowContact('1st', 'Bathroom', 'WindowContact', 'Fenster Bad oben', 7) +windowContactBathroom1st.start() + +let thermostatBathroom1st = new MaxThermostat('1st', 'Bathroom', 'Thermostat', 'Thermostat Bad oben', 4, [windowContactBathroom1st]) +thermostatBathroom1st.start() + +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 11 * * *', output: '5.0'}, + {cronTime: '00 00 19 * * *', output: '21.0'}, + {cronTime: '00 00 23 * * *', output: '5.0'} +]) +thermostatBathroom1stCron.start() + // ---------------------------------------------------------------------------------------------------------- let testFourButton = new HomematicFourButtonThing('Gnd', 'Hallway', 'TestButton', 9, [ new HomematicFourButtonSingleItem('dispatcher_ng/items/Gnd/Hallway/Testlight/dimmerIn'), @@ -213,20 +245,6 @@ let testScene = new LightScene('Gnd', 'Hallway', 'TestScene', 'TestScene', testScene.start() -let windowContact1 = new MaxWindowContact('Gnd', 'Bathroom', 'WindowContact1', 'Fenster Bad unten', 2) -windowContact1.start() -let windowContact2 = new MaxWindowContact('Gnd', 'Bathroom', 'WindowContact2', 'Fenster Bad unten', 20) -windowContact2.start() - -let thermostat1 = new MaxThermostat('Gnd', 'Bathroom', 'Thermostat', 'Thermostat Bad unten', 3, [windowContact1, windowContact2]) -thermostat1.start() - -let thermostat1Cron = new Cron('Thermostat1Cron', thermostat1, [ - {cronTime: '00 47 17 * * *', output: '5.0'}, - {cronTime: '00 48 17 * * *', output: '20.0'}, - {cronTime: '00 49 17 * * *', output: '25.0'} -]) -thermostat1Cron.start() // ---------------------------------------------------------------------------------------------------------- // Homekit export