diff --git a/dist/main.js b/dist/main.js index 9dc5a59..4ffee92 100644 --- a/dist/main.js +++ b/dist/main.js @@ -38,6 +38,9 @@ aquariumLightCron.start(); let annaBedLight = new M433SwitchItem_1.M433SwitchItem('1st', 'Anna', 'BedLight', 'Bettlicht Anna', '14668116 24 1', '14668113 24 1'); annaBedLight.start(); allLabeledItems.push(annaBedLight); +let windowContactAnna1st = new MaxWindowContact_1.MaxWindowContact('1st', 'Anna', 'WindowContact', 'Fenster Anna', 20); +windowContactAnna1st.start(); +allLabeledItems.push(windowContactAnna1st); // Matthias ------------------------------------------------------------------------------------------------- // Matthias Stehlampen 7 24 1 6 24 1 let matthiasStandLights = new M433SwitchItem_1.M433SwitchItem('1st', 'Matthias', 'StandLight', 'Stehlampen Matthias', '7 24 1', '6 24 1'); @@ -140,11 +143,11 @@ let thermostatBedroom1st = new MaxThermostat_1.MaxThermostat('1st', 'Bedroom', ' thermostatBedroom1st.start(); allLabeledItems.push(thermostatBedroom1st); let thermostatBedroom1stCron = new Cron_1.Cron('thermostatBedroom1stCron', thermostatBedroom1st, [ - { cronTime: '00 00 06 * * mon-fri', output: '21.0' }, - { cronTime: '00 00 09 * * mon-fri', output: '5.0' }, - { cronTime: '00 00 08 * * sat-sun', output: '21.0' }, - { cronTime: '00 00 11 * * sat-sun', output: '5.0' }, - { cronTime: '00 00 17 * * *', output: '21.0' }, + { cronTime: '00 01 06 * * mon-fri', output: '21.0' }, + { cronTime: '00 01 09 * * mon-fri', output: '5.0' }, + { cronTime: '00 01 08 * * sat-sun', output: '21.0' }, + { cronTime: '00 01 11 * * sat-sun', output: '5.0' }, + { cronTime: '00 00 17 * * *', output: '23.0' }, { cronTime: '00 59 23 * * *', output: '5.0' } ]); thermostatBedroom1stCron.start(); @@ -185,10 +188,10 @@ 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 * * 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 02 06 * * mon-fri', output: '21.0' }, + { cronTime: '00 02 08 * * sat-sun', output: '21.0' }, + { cronTime: '00 02 11 * * *', output: '5.0' }, + { cronTime: '00 02 19 * * *', output: '21.0' }, { cronTime: '00 00 23 * * *', output: '5.0' } ]); thermostatBathroomGndCron.start(); diff --git a/homekit.json b/homekit.json index d087a29..60edff8 100644 --- a/homekit.json +++ b/homekit.json @@ -33,6 +33,17 @@ }, "config": {} }, + "1st_Anna_WindowContact": { + "id": "1st_Anna_WindowContact", + "name": "Fenster Anna", + "service": "ContactSensor", + "topic": { + "statusContactSensorState": "dispatcher_ng/items/1st/Anna/WindowContact/state/feedback" + }, + "payload": { + "onContactDetected": "CLOSED" + } + }, "1st_Matthias_StandLight": { "id": "1st_Matthias_StandLight", "name": "Stehlampen Matthias", @@ -405,6 +416,39 @@ }, "config": {} }, + "1st_Bedroom_WindowContactStreet": { + "id": "1st_Bedroom_WindowContactStreet", + "name": "Fenster Schlafzimmer Strasse", + "service": "ContactSensor", + "topic": { + "statusContactSensorState": "dispatcher_ng/items/1st/Bedroom/WindowContactStreet/state/feedback" + }, + "payload": { + "onContactDetected": "CLOSED" + } + }, + "1st_Bedroom_WindowContactGarden": { + "id": "1st_Bedroom_WindowContactGarden", + "name": "Fenster Schlafzimmer Garten", + "service": "ContactSensor", + "topic": { + "statusContactSensorState": "dispatcher_ng/items/1st/Bedroom/WindowContactGarden/state/feedback" + }, + "payload": { + "onContactDetected": "CLOSED" + } + }, + "1st_Bedroom_Thermostat": { + "id": "1st_Bedroom_Thermostat", + "name": "Thermostat Schlafzimmer", + "service": "Thermostat", + "topic": { + "setTargetTemperature": "dispatcher_ng/items/1st/Bedroom/Thermostat/temperature", + "statusTargetTemperature": "dispatcher_ng/items/1st/Bedroom/Thermostat/temperature/feedback", + "statusCurrentTemperature": "dispatcher_ng/items/1st/Bedroom/Thermostat/temperature/feedback" + }, + "payload": {} + }, "Gnd_Hallway_DayLight": { "id": "Gnd_Hallway_DayLight", "name": "DayLight", diff --git a/openhab.items b/openhab.items index 102b500..16bc195 100644 --- a/openhab.items +++ b/openhab.items @@ -1,5 +1,6 @@ Switch 1st_Anna_AquariumLight {mqtt=">[localbroker:dispatcher_ng/items/1st/Anna/AquariumLight/state:command:*:default],<[localbroker:dispatcher_ng/items/1st/Anna/AquariumLight/state/feedback:state:default]"} Switch 1st_Anna_BedLight {mqtt=">[localbroker:dispatcher_ng/items/1st/Anna/BedLight/state:command:*:default],<[localbroker:dispatcher_ng/items/1st/Anna/BedLight/state/feedback:state:default]"} + Switch 1st_Matthias_StandLight {mqtt=">[localbroker:dispatcher_ng/items/1st/Matthias/StandLight/state:command:*:default],<[localbroker:dispatcher_ng/items/1st/Matthias/StandLight/state/feedback:state:default]"} Switch 1st_Matthias_BedLight {mqtt=">[localbroker:dispatcher_ng/items/1st/Matthias/BedLight/state:command:*:default],<[localbroker:dispatcher_ng/items/1st/Matthias/BedLight/state/feedback:state:default]"} Switch 1st_Matthias_Speaker {mqtt=">[localbroker:dispatcher_ng/items/1st/Matthias/Speaker/state:command:*:default],<[localbroker:dispatcher_ng/items/1st/Matthias/Speaker/state/feedback:state:default]"} @@ -21,6 +22,9 @@ Switch 1st_BedRoom_WolfgangsSide {mqtt=">[localbroker:dispatcher_ng/items/1st/Be Switch 1st_BedRoom_PattysSide {mqtt=">[localbroker:dispatcher_ng/items/1st/BedRoom/PattysSide/state:command:*:default],<[localbroker:dispatcher_ng/items/1st/BedRoom/PattysSide/state/feedback:state:default]"} Switch 1st_BedRoom_WindowLight {mqtt=">[localbroker:dispatcher_ng/items/1st/BedRoom/WindowLight/state:command:*:default],<[localbroker:dispatcher_ng/items/1st/BedRoom/WindowLight/state/feedback:state:default]"} + + + Switch Gnd_Hallway_DayLight {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Hallway/DayLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Hallway/DayLight/state/feedback:state:default]"} Switch Gnd_Hallway_EcoLight {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Hallway/EcoLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Hallway/EcoLight/state/feedback:state:default]"} Switch Gnd_Hallway_MorningLight {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Hallway/MorningLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Hallway/MorningLight/state/feedback:state:default]"} diff --git a/src/main.ts b/src/main.ts index 08634aa..5b8fbce 100644 --- a/src/main.ts +++ b/src/main.ts @@ -48,6 +48,11 @@ let annaBedLight = new M433SwitchItem('1st', 'Anna', 'BedLight', 'Bettlicht Anna annaBedLight.start() allLabeledItems.push(annaBedLight) + +let windowContactAnna1st = new MaxWindowContact('1st', 'Anna', 'WindowContact', 'Fenster Anna', 20) +windowContactAnna1st.start() +allLabeledItems.push(windowContactAnna1st) + // Matthias ------------------------------------------------------------------------------------------------- // Matthias Stehlampen 7 24 1 6 24 1 let matthiasStandLights = new M433SwitchItem('1st', 'Matthias', 'StandLight', 'Stehlampen Matthias', '7 24 1', '6 24 1') @@ -181,11 +186,11 @@ thermostatBedroom1st.start() allLabeledItems.push(thermostatBedroom1st) let thermostatBedroom1stCron = new Cron('thermostatBedroom1stCron', thermostatBedroom1st, [ - {cronTime: '00 00 06 * * mon-fri', output: '21.0'}, - {cronTime: '00 00 09 * * mon-fri', output: '5.0'}, - {cronTime: '00 00 08 * * sat-sun', output: '21.0'}, - {cronTime: '00 00 11 * * sat-sun', output: '5.0'}, - {cronTime: '00 00 17 * * *', output: '21.0'}, + {cronTime: '00 01 06 * * mon-fri', output: '21.0'}, + {cronTime: '00 01 09 * * mon-fri', output: '5.0'}, + {cronTime: '00 01 08 * * sat-sun', output: '21.0'}, + {cronTime: '00 01 11 * * sat-sun', output: '5.0'}, + {cronTime: '00 00 17 * * *', output: '23.0'}, {cronTime: '00 59 23 * * *', output: '5.0'} ]) thermostatBedroom1stCron.start() @@ -243,10 +248,10 @@ thermostatBathroomGnd.start() allLabeledItems.push(thermostatBathroomGnd) let thermostatBathroomGndCron = new Cron('thermostatBathroomGndCron', thermostatBathroomGnd, [ - {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 02 06 * * mon-fri', output: '21.0'}, + {cronTime: '00 02 08 * * sat-sun', output: '21.0'}, + {cronTime: '00 02 11 * * *', output: '5.0'}, + {cronTime: '00 02 19 * * *', output: '21.0'}, {cronTime: '00 00 23 * * *', output: '5.0'} ]) thermostatBathroomGndCron.start()