98 Commits

Author SHA1 Message Date
ceeecf5009 fix SimpleTopic and remove homekit and openhab stuff 2018-07-11 20:35:55 +02:00
3dc256f960 SimpleTopicSwitchItem added, Regallicht changed 2018-07-11 20:27:09 +02:00
4fb1311e7a scenes at the end 2018-07-01 11:42:00 +02:00
28fa32d48d adjust for smartclient output 2018-06-25 13:14:03 +02:00
718ac667d1 several quick fixes 2018-06-03 21:50:40 +02:00
ea04fae523 small fix 2018-05-30 23:59:22 +02:00
0513928d4b fix for keller licht 2018-05-25 18:39:35 +02:00
4d0b708e4a off 2018-05-25 00:08:19 +02:00
e413f2871c switch adaptor 2018-05-24 23:42:07 +02:00
f75de912ba debug keller licht 2018-05-24 23:26:38 +02:00
27153262bc couple large and small basement light 2018-05-24 22:43:55 +02:00
ab08986ca2 Kellerlicht 2018-05-24 22:09:35 +02:00
7e2fb7edea move workshop light 2018-05-23 01:12:58 +02:00
d071ce54ee add workshop light 2018-05-23 00:42:28 +02:00
d4636f550c fix in mqtt clientId 2018-05-16 16:41:03 +02:00
7e78a5724b heartbeat stuff 2018-05-16 10:32:13 +02:00
50b0b85f4f nothing 2018-05-16 10:26:36 +02:00
d394f39322 quick fix 2018-04-28 18:18:41 +02:00
499f90c080 MySwitch, first test passed 2018-04-28 18:12:05 +02:00
341829efe0 more heating stuff 2018-04-28 17:49:03 +02:00
e1088083de some more window contacts 2018-04-27 22:52:38 +02:00
f4d35b5e04 fix case 2018-04-25 19:09:25 +02:00
1600cc9469 TwoLedSignal stuff 2018-04-25 13:05:28 +02:00
5619ac007a start with support for TwoLedSignal 2018-04-21 23:27:21 +02:00
a8761a68b6 heating scenes added 2018-04-17 13:58:50 +02:00
c77f5b9096 fix issue with failing off when heatmain is off 2018-04-15 17:10:39 +02:00
eb90199d97 fix in heating main switch handling 2018-04-12 09:03:15 +02:00
62303cf27e add windowcontact matthias 2018-04-11 21:28:43 +02:00
82cb8d56cb contact frontdoor 2018-04-10 21:56:51 +02:00
f0d32b5a2b rename summer/winter switch to heatingMainSwitch 2018-04-09 16:28:24 +02:00
245002acad debug output 2018-04-09 16:08:41 +02:00
aad115f7b0 evaluate retained messages too 2018-04-09 15:56:46 +02:00
b8dcece64e add summer/winter switch 2018-04-09 15:53:38 +02:00
00ba130010 in topic 2018-04-07 09:59:38 +02:00
dc28dc81b7 export fix 2018-04-06 23:42:10 +02:00
a5c629e331 preset fix 2018-04-06 23:38:08 +02:00
c503e31ee5 adjust main 2018-04-06 23:09:51 +02:00
37acc620d5 rework thermostat 2018-04-06 23:00:41 +02:00
9db2aebf09 nothing special 2018-04-05 22:36:19 +02:00
b9ac97f2df export stuff 2018-04-03 00:40:50 +02:00
2e251fe3bc export again 2018-04-03 00:25:59 +02:00
d6bde14e76 export currently not working 2018-04-03 00:07:24 +02:00
8350b21161 export relaybox 2018-04-03 00:00:42 +02:00
e883c9a791 export stuff 2018-04-02 23:03:10 +02:00
d586ab6860 relaybox fix 2018-04-02 20:40:24 +02:00
d0d7250d63 Merge remote-tracking branch 'refs/remotes/origin/master' 2018-04-02 20:31:18 +02:00
f444cb13e3 some js files 2018-04-02 20:29:45 +02:00
dfc4a04df0 fix in relaybox feedback 2018-04-02 17:50:20 +02:00
cc930e6bbc export prepared 2018-03-27 21:50:48 +02:00
4f2e74bddb reduced logging 2018-03-27 21:33:17 +02:00
656db81602 reduced logging 2018-03-27 21:31:03 +02:00
166f958cac status handling 2018-03-27 21:27:59 +02:00
0d14933863 status handling 2018-03-27 21:23:24 +02:00
ce78afaa55 small fix 2018-03-27 21:06:49 +02:00
3179c84684 still status handling 2018-03-27 21:03:07 +02:00
0977223736 more status handling 2018-03-27 20:58:12 +02:00
bd4bced0c0 relaybox status handling 2018-03-27 20:54:27 +02:00
71f00fdf31 relaybox stuff 2018-03-27 20:44:49 +02:00
7992ccd7a1 fix cron settings 2018-03-27 19:13:35 +02:00
e6a12e4215 change cron to numbers 2018-03-06 12:20:01 +01:00
9b4853501d contact export 2018-02-28 12:24:08 +01:00
6e35c1fe6c openhab export 2018-02-28 12:21:53 +01:00
d27349833a export thermostat to openhab 2018-02-27 15:45:19 +01:00
bd0996b03b Thermostat Bedroom 2018-02-25 22:32:50 +01:00
7ead49a67a Thermostat Bedroom 2018-02-22 17:59:05 +01:00
a5d6791e88 dimmer 2018-01-31 21:25:17 +01:00
f6db2369c3 dimmer 2018-01-31 21:24:42 +01:00
a104b53509 fix 2018-01-31 21:23:57 +01:00
48fe3be0e9 touch 2018-01-31 20:55:58 +01:00
72516fac28 touch switch support 2018-01-31 16:13:44 +01:00
409ab71365 consider device feedback 2018-01-31 15:59:21 +01:00
c4ab32a229 fixes 2018-01-27 17:58:18 +01:00
3002b01788 hue stuff 2018-01-27 17:48:36 +01:00
1e3823b2a5 interface 2018-01-27 17:47:52 +01:00
3188efac5f fix typo 2018-01-27 17:44:19 +01:00
b979969324 hue light 2018-01-27 17:40:33 +01:00
11c3def220 first Hue light 2018-01-25 16:23:06 +01:00
32a57408d9 change kitchen heating 2018-01-25 16:00:43 +01:00
1113924c57 Merge branch 'master' of gitlab.com:wolutator/dispatcher_ng 2018-01-23 20:31:05 +01:00
4aa7335e54 changes 2018-01-23 20:30:04 +01:00
c1242afd07 fix another typo 2018-01-16 21:30:23 +01:00
988840a947 exported 2018-01-16 21:22:49 +01:00
8702cd8a40 fix typo 2018-01-16 21:07:21 +01:00
1847db3934 export of thermostat and windowcontact 2018-01-16 21:06:00 +01:00
72731b74b7 Fensterkontakte und Thermostat Küche 2018-01-16 20:31:56 +01:00
503790a73d add shelf light control 2018-01-15 21:35:46 +01:00
f362c90b91 some changes 2018-01-15 21:24:53 +01:00
85cab38058 fix in setting temperature, avoid feedback loop 2018-01-15 20:06:01 +01:00
d87fceb73e thermostats 2018-01-15 19:32:55 +01:00
9c0ac6dc3b Cron implemented 2018-01-15 17:49:25 +01:00
09a63fe736 mqtt: always send globally, always retain, thermostat und windowContact completed 2018-01-15 17:10:42 +01:00
f88cf5ee0d some changes, not yet done with WindowContact, too cold in Q-West to complete 2018-01-15 16:20:59 +01:00
677f9c807d fixes and start of UrlSwitchItem 2018-01-12 22:02:08 +01:00
e88f9d225c fix MaxSwitch 2018-01-12 19:39:04 +01:00
c474d22265 EcoSwitch 2018-01-12 10:50:25 +01:00
5eac6dfab6 configure scenes 2018-01-11 16:48:18 +01:00
402603c376 Scene implemented 2018-01-11 15:32:37 +01:00
28eec19e53 introduce interfaces for state/feedback topics 2018-01-11 13:52:09 +01:00
65 changed files with 5028 additions and 372 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
node_modules
*.map
mylogfile.log
dispatcher_ng.log*

18
dispatcher.service Executable file
View File

@ -0,0 +1,18 @@
[Unit]
Description=dispatcher_ng
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
GuessMainPID=yes
ExecStart=/usr/bin/npm start -- -c dispatcher_ng.conf
ExecStop=kill -SIGINT $mainpid
Restart=on-failure
WorkingDirectory=/opt/services/dispatcher_ng
[Install]
Alias=dispatcher
WantedBy=multi-user.target

View File

@ -8,5 +8,10 @@
"smtpSender": "dispatcher@hottis.de",
"smtpReceiver": "woho@hottis.de",
"homekitFile": "homekit.json",
"openhabItemFile": "openhab.items"
"openhabItemFile": "openhab.items",
"heartbeatTopic": "dispatcher_ng/i/am/alive",
"heartbeatInterval": 10000,
"watchdogTopic": "IoT/Watchdog",
"watchdogInterval": 1000,
"watchdogMessage": "WauWau!"
}

14
dist/AHomegearItem.js vendored Normal file
View File

@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const AItem_1 = require("./AItem");
class AHomegearItem extends AItem_1.AItem {
constructor(floor, room, item, label, hmId) {
super(floor, room, item, label);
this.hmId = hmId;
this.homegearTopicPre = 'homegear/instance1';
this.actionTopicPre = `${this.homegearTopicPre}/set/${this.hmId}`;
this.deviceTopicPre = `${this.homegearTopicPre}/plain/${this.hmId}`;
}
}
exports.AHomegearItem = AHomegearItem;
//# sourceMappingURL=AHomegearItem.js.map

13
dist/AItem.js vendored
View File

@ -1,13 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const logger = require("./log");
const MqttDispatcher_1 = require("./MqttDispatcher");
class AItem {
const Events = require("events");
class AItem extends Events.EventEmitter {
constructor(floor, room, item, label = '') {
super();
this.floor = floor;
this.room = room;
this.item = item;
this.itemId = `${this.floor}.${this.room}.${this.item}`;
this.itemId = `${this.floor}_${this.room}_${this.item}`;
if (label == '') {
this.label = this.itemId;
}
@ -16,14 +17,16 @@ class AItem {
}
this.topicFirstPart = `dispatcher_ng/items/${this.floor}/${this.room}/${this.item}`;
}
startFunc() {
}
exportItem() {
return null;
}
start() {
MqttDispatcher_1.mqttHandler.register(this.subscribeTopics, (topic, payload) => {
logger.info(`item ${this.itemId}: ${topic}, ${payload}`);
// logger.info(`item ${this.itemId}: ${topic}, ${payload}`)
this.processMessage(topic, payload);
});
}, () => { this.startFunc(); });
}
}
exports.AItem = AItem;

23
dist/Cron.js vendored Normal file
View File

@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const logger = require("./log");
const MqttDispatcher_1 = require("./MqttDispatcher");
const cron = require("cron");
class Cron {
constructor(name, target, crontab) {
this.name = name;
this.targetTopic = target.getInTopic();
this.crontab = crontab;
}
start() {
this.crontab.forEach((cronEntry) => {
logger.info(`Starting cronjob for: ${this.targetTopic}, ${cronEntry.output} at ${cronEntry.cronTime}`);
cronEntry.cronJob = new cron.CronJob(cronEntry.cronTime, () => {
logger.info(`Firing ${this.targetTopic}, ${cronEntry.output}`);
MqttDispatcher_1.mqttHandler.send(this.targetTopic, cronEntry.output);
}, undefined, true, 'Europe/Berlin');
});
}
}
exports.Cron = Cron;
//# sourceMappingURL=Cron.js.map

View File

@ -13,6 +13,9 @@ class DimmerAdaptor extends AItem_1.AItem {
this.bright = 100;
this.brightDirection = -1;
}
getInTopic() {
return this.inTopic;
}
processMessage(topic, payload) {
switch (topic) {
case this.inTopic:

3
dist/Disabler.js vendored Normal file
View File

@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=Disabler.js.map

102
dist/Export.js vendored
View File

@ -16,6 +16,39 @@ function SwitchExport(itemId, label, stateTopic, stateFeedbackTopic, type) {
return { 'homekit': homekitOut, 'openhab': openhabOut };
}
exports.SwitchExport = SwitchExport;
function ThermostatExport(itemId, label, temperatureTopic, temperatureFeedbackTopic, presetTemperatureTopic, presetTemperatureFeedbackTopic) {
return { 'homekit': ThermostatHomekitExport(itemId, label, temperatureTopic, temperatureFeedbackTopic), 'openhab': ThermostatOpenHAPExport(itemId, label, temperatureTopic, temperatureFeedbackTopic, presetTemperatureTopic, presetTemperatureFeedbackTopic) };
}
exports.ThermostatExport = ThermostatExport;
function ContactExport(itemId, label, status) {
return { 'homekit': ContactHomekitExport(itemId, label, status), 'openhab': ContactOpenHABExport(itemId, label, status) };
}
exports.ContactExport = ContactExport;
function HueColorLightExport(itemId, label, stateTopic, stateFeedbackTopic, brightnessTopic, brightnessFeedbackTopic, hueTopic, hueFeedbackTopic, saturationTopic, saturationFeedbackTopic, colorTemperatureTopic, colorTemperatureFeedbackTopic) {
return { 'homekit': HueColorLightHomekitExport(itemId, label, stateTopic, stateFeedbackTopic, brightnessTopic, brightnessFeedbackTopic, hueTopic, hueFeedbackTopic, saturationTopic, saturationFeedbackTopic, colorTemperatureTopic, colorTemperatureFeedbackTopic), 'openhab': '' };
}
exports.HueColorLightExport = HueColorLightExport;
function RelayBoxExport(itemId, stateTopicPre, feedbackTopicPre, conflictTopicPre, itemNames) {
return { 'homekit': RelayBoxHomekitExport(itemId, stateTopicPre, feedbackTopicPre, conflictTopicPre, itemNames),
'openhab': RelayBoxOpenHABExport(itemId, stateTopicPre, feedbackTopicPre, conflictTopicPre, itemNames) };
}
exports.RelayBoxExport = RelayBoxExport;
function HeatingMainSwitchExport(topic) {
return { 'homekit': { 'id': '', 'object': {} },
'openhab': `Switch HeatingMainSwitch "Heizung Hauptschalter" {mqtt=">[localbroker:${topic}:command:*:default],<[localbroker:${topic}:state:default]"}` };
}
exports.HeatingMainSwitchExport = HeatingMainSwitchExport;
function RelayBoxHomekitExport(itemId, stateTopicPre, feedbackTopicPre, conflictTopicPre, itemNames) {
return { 'id': '', 'object': {} };
}
function RelayBoxOpenHABExport(itemId, stateTopicPre, feedbackTopicPre, conflictTopicPre, itemNames) {
let o = [];
itemNames.forEach((label, index) => {
o.push(`Switch ${itemId}${index} "${label}" {mqtt=">[localbroker:${stateTopicPre}/${index}:command:*:default],<[localbroker:${feedbackTopicPre}/${index}:state:default]"}`);
o.push(`String ${itemId}${index}Conflict "${label} [%s]" {mqtt="<[localbroker:${conflictTopicPre}/${index}:state:default]"}`);
});
return o;
}
function SwitchHomekitBulbExport(id, label, setOn, statusOn) {
let o = {
"id": id,
@ -53,8 +86,75 @@ function SwitchHomekitOutletExport(id, label, setOn, statusOn) {
};
return { 'id': id, 'object': o };
}
function ThermostatHomekitExport(id, label, setTemperature, statusTemperature) {
let o = {
"id": id,
"name": label,
"service": "Thermostat",
"topic": {
"setTargetTemperature": setTemperature,
"statusTargetTemperature": statusTemperature,
"statusCurrentTemperature": statusTemperature
},
"payload": {}
};
return { 'id': id, 'object': o };
}
function ContactHomekitExport(id, label, status) {
let o = {
"id": id,
"name": label,
"service": "ContactSensor",
"topic": {
"statusContactSensorState": status
},
"payload": {
"onContactDetected": "CLOSED"
}
};
return { 'id': id, 'object': o };
}
function SwitchOpenHABExport(id, label, setOn, statusOn) {
// Switch windowLightKitchen {mqtt=">[localbroker:nodered/items/windowLightKitchen:command:*:default]", mqtt="<[localbroker:nodered/items/windowLightKitchen/feedback:state:default]"}
return `Switch ${id} {mqtt=">[localbroker:${setOn}:command:*:default]", mqtt="<[localbroker:${statusOn}:state:default]"}`;
return `Switch ${id} "${label}"{mqtt=">[localbroker:${setOn}:command:*:default],<[localbroker:${statusOn}:state:default]"}`;
}
function ContactOpenHABExport(id, label, status) {
// Switch windowLightKitchen {mqtt=">[localbroker:nodered/items/windowLightKitchen:command:*:default]", mqtt="<[localbroker:nodered/items/windowLightKitchen/feedback:state:default]"}
return `Contact ${id} "${label}" {mqtt="<[localbroker:${status}:state:default]"}`;
}
function ThermostatOpenHAPExport(id, label, setTemperature, statusTemperature, presetTemperature, presetStatusTemperature) {
let o = [];
o.push(`Number ${id} "${label} [%.1f °C]" {mqtt=">[localbroker:${setTemperature}:command:*:default],<[localbroker:${statusTemperature}:state:default]"}`);
o.push(`Number Preset_${id} "Preset_${label} [%.1f °C]" {mqtt=">[localbroker:${presetTemperature}:command:*:default],<[localbroker:${presetStatusTemperature}:state:default]"}`);
return o;
}
function HueColorLightHomekitExport(id, label, stateTopic, stateFeedbackTopic, brightnessTopic, brightnessFeedbackTopic, hueTopic, hueFeedbackTopic, saturationTopic, saturationFeedbackTopic, colorTemperatureTopic, colorTemperatureFeedbackTopic) {
let o = {
"id": id,
"name": label,
"service": "Lightbulb",
"manufacturer": "hue2mqtt - Hue",
"model": "color light",
"topic": {
"setOn": stateTopic,
"statusOn": stateFeedbackTopic,
"setBrightness": brightnessTopic,
"statusBrightness": brightnessFeedbackTopic,
"setHue": hueTopic,
"statusHue": hueFeedbackTopic,
"setSaturation": saturationTopic,
"statusSaturation": saturationFeedbackTopic,
"setColorTemperature": colorTemperatureTopic,
"statusColorTemperature": colorTemperatureFeedbackTopic
},
"payload": {
"onTrue": "ON",
"onFalse": "OFF",
"brightnessFactor": 1,
"hueFactor": 1,
"saturationFactor": 1
}
};
return { 'id': id, 'object': o };
}
//# sourceMappingURL=Export.js.map

3
dist/Forwarder.js vendored
View File

@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
const AItem_1 = require("./AItem");
const MqttDispatcher_1 = require("./MqttDispatcher");
class Forwarder extends AItem_1.AItem {
getInTopic() {
return this.inTopic;
}
constructor(floor, room, item, topicLastPart, label, targetTopics) {
super(floor, room, item, label);
this.inTopic = `${this.topicFirstPart}/${topicLastPart}`;

14
dist/HeatingScene.js vendored Normal file
View File

@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Forwarder_1 = require("./Forwarder");
class HeatingScene extends Forwarder_1.Forwarder {
constructor(floor, room, item, label, targetItems) {
let inTopics = [];
targetItems.forEach((item) => {
inTopics.push(item.getInTopic());
});
super(floor, room, item, "command", label, inTopics);
}
}
exports.HeatingScene = HeatingScene;
//# sourceMappingURL=HeatingScene.js.map

View File

@ -2,8 +2,8 @@
Object.defineProperty(exports, "__esModule", { value: true });
const logger = require("./log");
const MqttDispatcher_1 = require("./MqttDispatcher");
const AHomematicItem_1 = require("./AHomematicItem");
class HomematicDimmerItem extends AHomematicItem_1.AHomematicItem {
const AHomegearItem_1 = require("./AHomegearItem");
class HomematicDimmerItem extends AHomegearItem_1.AHomegearItem {
constructor(floor, room, item, label, hmId) {
super(floor, room, item, label, hmId);
this.stateTopic = `${this.topicFirstPart}/state`;

View File

@ -2,7 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
const logger = require("./log");
const MqttDispatcher_1 = require("./MqttDispatcher");
const AHomematicItem_1 = require("./AHomematicItem");
const AHomegearItem_1 = require("./AHomegearItem");
class HomematicFourButtonSingleItem {
constructor(actionTopic) {
this.actionTopic = actionTopic;
@ -26,7 +26,7 @@ class HomematicFourButtonSingleItem {
}
}
exports.HomematicFourButtonSingleItem = HomematicFourButtonSingleItem;
class HomematicFourButtonThing extends AHomematicItem_1.AHomematicItem {
class HomematicFourButtonThing extends AHomegearItem_1.AHomegearItem {
constructor(floor, room, item, hmId, itemObjs) {
super(floor, room, item, '', hmId);
this.itemObjs = itemObjs;

View File

@ -1,15 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const MqttDispatcher_1 = require("./MqttDispatcher");
const AHomematicItem_1 = require("./AHomematicItem");
const AHomegearItem_1 = require("./AHomegearItem");
const Export_1 = require("./Export");
class HomematicSwitchItem extends AHomematicItem_1.AHomematicItem {
constructor(floor, room, item, label, hmId, type = 'bulb') {
class HomematicSwitchItem extends AHomegearItem_1.AHomegearItem {
getLabel() {
return this.label;
}
getRoom() {
return this.room;
}
getStateTopic() {
return this.stateTopic;
}
getStateFeedbackTopic() {
return this.stateFeedbackTopic;
}
getState() {
return this.state;
}
constructor(floor, room, item, label, hmId, partId = 1, type = 'bulb') {
super(floor, room, item, label, hmId);
this.partId = partId;
this.stateTopic = `${this.topicFirstPart}/state`;
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`;
this.deviceFeedbackTopic = `${this.deviceTopicPre}/1/STATE`;
this.actionTopic = `${this.actionTopicPre}/1/STATE`;
this.deviceFeedbackTopic = `${this.deviceTopicPre}/${this.partId}/STATE`;
this.actionTopic = `${this.actionTopicPre}/${this.partId}/STATE`;
this.subscribeTopics = [
this.stateTopic,
this.deviceFeedbackTopic
@ -47,6 +63,7 @@ class HomematicSwitchItem extends AHomematicItem_1.AHomematicItem {
MqttDispatcher_1.mqttHandler.send(this.stateFeedbackTopic, this.state);
break;
}
this.emit('somethingChanged');
}
}
exports.HomematicSwitchItem = HomematicSwitchItem;

130
dist/HueColorBulbItem.js vendored Normal file
View File

@ -0,0 +1,130 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const MqttDispatcher_1 = require("./MqttDispatcher");
const AHomegearItem_1 = require("./AHomegearItem");
const Export_1 = require("./Export");
class HueColorBulbItem extends AHomegearItem_1.AHomegearItem {
constructor(floor, room, item, label, hmId) {
super(floor, room, item, label, hmId);
this.BRIGHT_FACTOR = 2.54;
this.HUE_FACTOR = (65535 / 360);
this.SATURATION_FACTOR = 2.54;
this.stateTopic = `${this.topicFirstPart}/state`;
this.brightTopic = `${this.topicFirstPart}/bright`;
this.colorTemperatureTopic = `${this.topicFirstPart}/colorTemperature`;
this.hueTopic = `${this.topicFirstPart}/hue`;
this.saturationTopic = `${this.topicFirstPart}/saturation`;
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`;
this.brightFeedbackTopic = `${this.topicFirstPart}/bright/feedback`;
this.hueFeedbackTopic = `${this.topicFirstPart}/bright/hue`;
this.saturationFeedbackTopic = `${this.topicFirstPart}/bright/saturation`;
this.colorTemperatureFeedbackTopic = `${this.topicFirstPart}/colorTemperature/feedback`;
this.stateActionTopic = `${this.actionTopicPre}/1/STATE`;
this.brightActionTopic = `${this.actionTopicPre}/1/FAST_BRIGHTNESS`;
this.hueActionTopic = `${this.actionTopicPre}/1/HUE`;
this.saturationActionTopic = `${this.actionTopicPre}/1/SATURATION`;
this.colorTemperatureActionTopic = `${this.actionTopicPre}/1/COLOR_TEMPERATURE`;
this.stateDeviceTopic = `${this.deviceTopicPre}/1/STATE`;
this.brightDeviceTopic = `${this.deviceTopicPre}/1/FAST_BRIGHTNESS`;
this.hueDeviceTopic = `${this.deviceTopicPre}/1/HUE`;
this.saturationDeviceTopic = `${this.deviceTopicPre}/1/SATURATION`;
this.colorTemperatureDeviceTopic = `${this.deviceTopicPre}/1/COLOR_TEMPERATURE`;
this.subscribeTopics = [
this.stateTopic,
this.brightTopic,
this.colorTemperatureTopic,
this.hueTopic,
this.saturationTopic,
this.stateDeviceTopic,
this.brightDeviceTopic,
this.colorTemperatureDeviceTopic,
this.hueDeviceTopic,
this.saturationDeviceTopic
];
this.state = 'OFF';
this.bright = 0;
this.colorTemperature = 0;
this.hue = 0;
this.saturation = 0;
}
getLabel() {
return this.label;
}
getRoom() {
return this.room;
}
getStateTopic() {
return this.stateTopic;
}
getInTopic() {
return this.stateTopic;
}
getStateFeedbackTopic() {
return this.stateFeedbackTopic;
}
exportItem() {
return Export_1.HueColorLightExport(this.itemId, this.label, this.stateTopic, this.stateFeedbackTopic, this.brightTopic, this.brightFeedbackTopic, this.hueTopic, this.hueFeedbackTopic, this.saturationTopic, this.saturationFeedbackTopic, this.colorTemperatureTopic, this.colorTemperatureFeedbackTopic);
}
processMessage(topic, payload) {
switch (topic) {
case this.stateTopic:
this.state = payload;
MqttDispatcher_1.mqttHandler.send(this.stateFeedbackTopic, this.state);
if (this.state == "ON") {
MqttDispatcher_1.mqttHandler.send(this.stateActionTopic, "true");
}
else {
MqttDispatcher_1.mqttHandler.send(this.stateActionTopic, "false");
}
break;
case this.stateDeviceTopic:
this.state = payload;
if (payload == "true") {
this.state = "ON";
}
else {
this.state = "OFF";
}
MqttDispatcher_1.mqttHandler.send(this.stateFeedbackTopic, this.state);
break;
case this.brightTopic:
this.bright = parseFloat(payload);
MqttDispatcher_1.mqttHandler.send(this.brightFeedbackTopic, `${this.bright}`);
MqttDispatcher_1.mqttHandler.send(this.brightActionTopic, `${this.bright * this.BRIGHT_FACTOR}`);
break;
case this.brightDeviceTopic:
this.bright = parseFloat(payload) / this.BRIGHT_FACTOR;
MqttDispatcher_1.mqttHandler.send(this.brightFeedbackTopic, `${this.bright}`);
break;
case this.hueTopic:
this.hue = parseFloat(payload);
MqttDispatcher_1.mqttHandler.send(this.hueFeedbackTopic, `${this.hue}`);
MqttDispatcher_1.mqttHandler.send(this.hueActionTopic, `${this.hue * this.HUE_FACTOR}`);
break;
case this.hueDeviceTopic:
this.hue = parseFloat(payload) / this.HUE_FACTOR;
MqttDispatcher_1.mqttHandler.send(this.hueFeedbackTopic, `${this.hue}`);
break;
case this.saturationTopic:
this.saturation = parseFloat(payload);
MqttDispatcher_1.mqttHandler.send(this.saturationFeedbackTopic, `${this.saturation}`);
MqttDispatcher_1.mqttHandler.send(this.saturationActionTopic, `${this.saturation * this.SATURATION_FACTOR}`);
break;
case this.saturationDeviceTopic:
this.saturation = parseFloat(payload) / this.SATURATION_FACTOR;
MqttDispatcher_1.mqttHandler.send(this.saturationFeedbackTopic, `${this.saturation}`);
break;
case this.colorTemperatureTopic:
this.colorTemperature = parseInt(payload);
MqttDispatcher_1.mqttHandler.send(this.colorTemperatureFeedbackTopic, `${this.colorTemperature}`);
MqttDispatcher_1.mqttHandler.send(this.colorTemperatureActionTopic, `${this.colorTemperature}`);
break;
case this.colorTemperatureDeviceTopic:
this.colorTemperature = parseInt(payload);
MqttDispatcher_1.mqttHandler.send(this.colorTemperatureFeedbackTopic, `${this.colorTemperature}`);
break;
}
}
}
exports.HueColorBulbItem = HueColorBulbItem;
//# sourceMappingURL=HueColorBulbItem.js.map

52
dist/HueColorTemperatureBulbItem.js vendored Normal file
View File

@ -0,0 +1,52 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const MqttDispatcher_1 = require("./MqttDispatcher");
const AHomegearItem_1 = require("./AHomegearItem");
class HueColorTemperatureBulbItem extends AHomegearItem_1.AHomegearItem {
constructor(floor, room, item, label, hmId) {
super(floor, room, item, label, hmId);
this.stateTopic = `${this.topicFirstPart}/state`;
this.brightTopic = `${this.topicFirstPart}/bright`;
this.colorTemperatureTopic = `${this.topicFirstPart}/colorTemperature`;
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`;
this.brightFeedbackTopic = `${this.topicFirstPart}/bright/feedback`;
this.colorTemperatureFeedbackTopic = `${this.topicFirstPart}/colorTemperature/feedback`;
this.stateActionTopic = `${this.actionTopicPre}/1/STATE`;
this.brightActionTopic = `${this.actionTopicPre}/1/BRIGHTNESS`;
this.colorTemperatureActionTopic = `${this.actionTopicPre}/1/COLOR_TEMPERATURE`;
this.subscribeTopics = [
this.stateTopic,
this.brightTopic,
this.colorTemperatureTopic
];
this.state = 'OFF';
this.bright = 0;
this.colorTemperature = 0;
}
processMessage(topic, payload) {
switch (topic) {
case this.stateTopic:
this.state = payload;
MqttDispatcher_1.mqttHandler.send(this.stateFeedbackTopic, this.state);
if (this.state == "ON") {
MqttDispatcher_1.mqttHandler.send(this.stateActionTopic, "true");
}
else {
MqttDispatcher_1.mqttHandler.send(this.stateActionTopic, "false");
}
break;
case this.brightTopic:
this.bright = parseInt(payload);
MqttDispatcher_1.mqttHandler.send(this.brightFeedbackTopic, `${this.bright}`);
MqttDispatcher_1.mqttHandler.send(this.brightActionTopic, `${this.bright}`);
break;
case this.colorTemperatureTopic:
this.colorTemperature = parseInt(payload);
MqttDispatcher_1.mqttHandler.send(this.colorTemperatureFeedbackTopic, `${this.colorTemperature}`);
MqttDispatcher_1.mqttHandler.send(this.colorTemperatureActionTopic, `${this.colorTemperature}`);
break;
}
}
}
exports.HueColorTemperatureBulbItem = HueColorTemperatureBulbItem;
//# sourceMappingURL=HueColorTemperatureBulbItem.js.map

View File

@ -4,6 +4,21 @@ const MqttDispatcher_1 = require("./MqttDispatcher");
const AItem_1 = require("./AItem");
const Export_1 = require("./Export");
class M433SwitchItem extends AItem_1.AItem {
getLabel() {
return this.label;
}
getRoom() {
return this.room;
}
getStateTopic() {
return this.stateTopic;
}
getInTopic() {
return this.stateTopic;
}
getStateFeedbackTopic() {
return this.stateFeedbackTopic;
}
constructor(floor, room, item, label, onCode, offCode, type = 'bulb') {
super(floor, room, item, label);
this.stateTopic = `${this.topicFirstPart}/state`;

56
dist/MaxEcoSwitch.js vendored Normal file
View File

@ -0,0 +1,56 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const MqttDispatcher_1 = require("./MqttDispatcher");
const AHomegearItem_1 = require("./AHomegearItem");
class MaxEcoSwitch extends AHomegearItem_1.AHomegearItem {
constructor(floor, room, item, label, hmId, mainScene, ecoScene) {
super(floor, room, item, label, hmId);
this.mainButtonTopic = `${this.deviceTopicPre}/1/PRESS`;
this.ecoButtonTopic = `${this.deviceTopicPre}/2/PRESS`;
this.subscribeTopics = [this.mainButtonTopic, this.ecoButtonTopic];
this.mainTopic = mainScene.getStateTopic();
this.ecoTopic = ecoScene.getStateTopic();
this.state = 'OFF';
}
processMessage(topic, payload) {
switch (this.state) {
case 'OFF':
if (topic == this.mainButtonTopic) {
this.state = 'ON';
}
else if (topic == this.ecoButtonTopic) {
this.state = 'ECO';
}
break;
case 'ON':
if (topic == this.mainButtonTopic) {
this.state = 'OFF';
}
else if (topic == this.ecoButtonTopic) {
this.state = 'ECO';
}
break;
case 'ECO':
if (topic == this.mainButtonTopic) {
this.state = 'ON';
}
else if (topic == this.ecoButtonTopic) {
this.state = 'OFF';
}
break;
}
switch (this.state) {
case 'OFF':
MqttDispatcher_1.mqttHandler.send(this.mainTopic, 'OFF');
break;
case 'ON':
MqttDispatcher_1.mqttHandler.send(this.mainTopic, 'ON');
break;
case 'ECO':
MqttDispatcher_1.mqttHandler.send(this.ecoTopic, 'ON');
break;
}
}
}
exports.MaxEcoSwitch = MaxEcoSwitch;
//# sourceMappingURL=MaxEcoSwitch.js.map

111
dist/MaxThermostat.js vendored Normal file
View File

@ -0,0 +1,111 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const logger = require("./log");
const MqttDispatcher_1 = require("./MqttDispatcher");
const AHomegearItem_1 = require("./AHomegearItem");
// import { MaxWindowContact } from './MaxWindowContact';
const Export_1 = require("./Export");
const DISABLED_TEMPERATURE = 5.0;
class MaxThermostat extends AHomegearItem_1.AHomegearItem {
constructor(floor, room, item, label, hmId, hardDisablers) {
super(floor, room, item, label, hmId);
this.heatingMainFlag = false;
this.temperatureTopic = `${this.topicFirstPart}/temperature`;
this.temperatureFeedbackTopic = `${this.topicFirstPart}/temperature/feedback`;
this.presetTemperatureTopic = `${this.topicFirstPart}/presetTemperature`;
this.presetTemperatureFeedbackTopic = `${this.topicFirstPart}/presetTemperature/feedback`;
this.deviceFeedbackTopic = `${this.deviceTopicPre}/1/SET_TEMPERATURE`;
this.actionTopic = `${this.actionTopicPre}/1/SET_TEMPERATURE`;
this.commandTopic = `${this.topicFirstPart}/command`;
this.subscribeTopics = [
this.temperatureTopic,
this.presetTemperatureTopic,
this.deviceFeedbackTopic,
this.commandTopic,
MaxThermostat.heatingMainSwitchTopic
];
this.hardDisabled = false;
this.hardDisablerMap = {};
hardDisablers.forEach((hardDisabler) => {
this.subscribeTopics.push(hardDisabler.getStateFeedbackTopic());
this.hardDisablerMap[hardDisabler.getStateFeedbackTopic()] = { disabler: hardDisabler, state: 'unknown' };
});
}
// Thermostat: homegear/instance1/set/3/1/SET_TEMPERATURE
getInTopic() {
return this.commandTopic;
}
exportItem() {
return Export_1.ThermostatExport(this.itemId, this.label, this.temperatureTopic, this.temperatureFeedbackTopic, this.presetTemperatureTopic, this.presetTemperatureFeedbackTopic);
}
static exportHeatingMainSwitchItem() {
return Export_1.HeatingMainSwitchExport(MaxThermostat.heatingMainSwitchTopic);
}
setPresetTemperature(presetTemperature) {
this.presetTemperature = presetTemperature;
}
startFunc() {
MqttDispatcher_1.mqttHandler.send(this.presetTemperatureTopic, `${this.presetTemperature}`);
}
processMessage(topic, payload) {
let setTemperature = false;
if (topic == this.temperatureTopic) {
this.temperature = parseFloat(payload);
setTemperature = true;
}
else if (topic == this.commandTopic) {
if ((payload == 'ON') && this.heatingMainFlag) {
this.temperature = this.presetTemperature;
setTemperature = true;
}
else if (payload == 'OFF') {
this.temperature = DISABLED_TEMPERATURE;
setTemperature = true;
}
else if (payload == 'FORCE_ON') {
this.temperature = this.presetTemperature;
setTemperature = true;
}
}
else if (topic == MaxThermostat.heatingMainSwitchTopic) {
this.heatingMainFlag = (payload == 'ON');
logger.info(`${this.itemId} heating main: ${this.heatingMainFlag}`);
if (!this.heatingMainFlag) {
this.temperature = DISABLED_TEMPERATURE;
MqttDispatcher_1.mqttHandler.send(this.temperatureFeedbackTopic, `${this.temperature}`);
MqttDispatcher_1.mqttHandler.send(this.actionTopic, `${this.temperature}`);
}
}
else if (topic == this.presetTemperatureTopic) {
this.presetTemperature = parseFloat(payload);
MqttDispatcher_1.mqttHandler.send(this.presetTemperatureFeedbackTopic, `${this.presetTemperature}`);
}
else if (topic == this.deviceFeedbackTopic) {
// this.temperature = parseFloat(payload)
setTemperature = false;
}
else if (topic in this.hardDisablerMap) {
this.hardDisablerMap[topic].state = this.hardDisablerMap[topic].disabler.transform(payload);
this.hardDisabled = false;
Object.values(this.hardDisablerMap).forEach((w) => {
if (w.state == 'DISABLE') {
this.hardDisabled = true;
}
});
setTemperature = true;
}
if (setTemperature) {
if (!this.hardDisabled) {
MqttDispatcher_1.mqttHandler.send(this.temperatureFeedbackTopic, `${this.temperature}`);
MqttDispatcher_1.mqttHandler.send(this.actionTopic, `${this.temperature}`);
}
else {
MqttDispatcher_1.mqttHandler.send(this.temperatureFeedbackTopic, `${DISABLED_TEMPERATURE}`);
MqttDispatcher_1.mqttHandler.send(this.actionTopic, `${DISABLED_TEMPERATURE}`);
}
}
}
}
MaxThermostat.heatingMainSwitchTopic = 'dispatcher_ng/items/heatingMainSwitch';
exports.MaxThermostat = MaxThermostat;
//# sourceMappingURL=MaxThermostat.js.map

50
dist/MaxWindowContact.js vendored Normal file
View File

@ -0,0 +1,50 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const MqttDispatcher_1 = require("./MqttDispatcher");
const AHomegearItem_1 = require("./AHomegearItem");
const Export_1 = require("./Export");
class MaxWindowContact extends AHomegearItem_1.AHomegearItem {
getStateFeedbackTopic() {
return this.stateFeedbackTopic;
}
getLabel() {
return this.label;
}
transform(payload) {
let res;
if (payload == 'OPEN') {
res = 'DISABLE';
}
else if (payload == 'CLOSED') {
res = 'ENABLE';
}
else {
res = 'UNKNOWN';
}
return res;
}
constructor(floor, room, item, label, hmId) {
super(floor, room, item, label, hmId);
this.stateTopic = `${this.topicFirstPart}/state`;
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`;
this.deviceFeedbackTopic = `${this.deviceTopicPre}/1/STATE`;
this.subscribeTopics = [
this.stateTopic,
this.deviceFeedbackTopic
];
}
exportItem() {
return Export_1.ContactExport(this.itemId, this.label, this.stateFeedbackTopic);
}
processMessage(topic, payload) {
if (payload == 'true') {
this.state = 'OPEN';
}
else {
this.state = 'CLOSED';
}
MqttDispatcher_1.mqttHandler.send(this.stateFeedbackTopic, this.state);
}
}
exports.MaxWindowContact = MaxWindowContact;
//# sourceMappingURL=MaxWindowContact.js.map

View File

@ -8,6 +8,7 @@ class MqttHandler {
constructor() {
this.mqttOptions = {};
this.mqttBrokerUrl = config.dict.brokerUrl;
this.mqttOptions.clientId = 'dispatcher';
if (config.dict.brokerUser && config.dict.brokerPass) {
this.mqttOptions.username = config.dict.brokerUser;
this.mqttOptions.password = config.dict.brokerPass;
@ -17,13 +18,15 @@ class MqttHandler {
this.mqttOptions.rejectUnauthorized = true;
}
this.topicHandlers = [];
this.startCallbacks = [];
logger.info("MqttHandler constructed");
}
register(topics, cb) {
register(topics, cb, startCb) {
topics.forEach((topic) => {
this.topicHandlers.push({ topic: topic, callback: cb });
logger.info(`Callback registered for ${topic}`);
});
this.startCallbacks.push(startCb);
}
exec() {
logger.info(`Connecting to ${this.mqttBrokerUrl}`);
@ -39,13 +42,17 @@ class MqttHandler {
logger.info(`${topicHandler.topic} subscribed`);
});
logger.info('MQTT connection established');
this.startCallbacks.forEach((cb) => {
cb();
logger.info("started");
});
});
this.mqttClient.on('message', (topic, payload, packet) => {
if (!packet.retain) {
let payloadStr = payload.toString('UTF-8');
logger.info(`Message received on topic ${topic}: ${payload}`);
this.processMessage(topic, payloadStr);
}
// if (! packet.retain) {
let payloadStr = payload.toString('UTF-8');
// logger.info(`Message received on topic ${topic}: ${payload}`)
this.processMessage(topic, payloadStr);
// }
});
}
processMessage(topic, payload) {
@ -70,18 +77,18 @@ class MqttHandler {
return found;
}
send(topic, payload, internalFirst = false) {
let sent = false;
if (internalFirst) {
logger.info(`Try internal sending: ${topic}`);
sent = this.processMessage(topic, payload);
}
if (!sent) {
logger.info(`External sending required: ${topic}`);
this.mqttClient.publish(topic, payload);
}
else {
logger.info(`Internally delivered: ${topic}`);
}
//let sent = false
//if (internalFirst) {
// logger.info(`Try internal sending: ${topic}`)
// sent = this.processMessage(topic, payload)
//}
//if (! sent) {
logger.info(`External sending required: ${topic} ${payload}`);
let options = { retain: true, qos: 0 };
this.mqttClient.publish(topic, payload, options);
//} else {
// logger.info(`Internally delivered: ${topic}`)
//}
}
}
exports.mqttHandler = new MqttHandler();

52
dist/MySwitchThing.js vendored Normal file
View File

@ -0,0 +1,52 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const logger = require("./log");
const MqttDispatcher_1 = require("./MqttDispatcher");
const AItem_1 = require("./AItem");
class MySwitchSingleItem {
constructor(actionTopic) {
this.actionTopic = actionTopic;
}
processMessage(topic, payload) {
switch (payload) {
case 'PRESS_SHORT':
MqttDispatcher_1.mqttHandler.send(this.actionTopic, 'SHORT', true);
break;
case 'PRESS_LONG_START':
case 'PRESS_LONG_CONT':
MqttDispatcher_1.mqttHandler.send(this.actionTopic, 'LONG_HOLD', true);
break;
case 'PRESS_LONG_END':
MqttDispatcher_1.mqttHandler.send(this.actionTopic, 'LONG_END', true);
break;
default:
logger.warn(`HM4BSI: no handling available for ${topic}`);
break;
}
}
}
exports.MySwitchSingleItem = MySwitchSingleItem;
class MySwitchThing extends AItem_1.AItem {
constructor(floor, room, item, itemObjs) {
super(floor, room, item, '');
this.itemObjs = itemObjs;
if (this.itemObjs.length != 3) {
throw new Error('itemObjs for MySwitchThing must have three elements');
}
this.subscribeTopics = [
`${this.topicFirstPart}/#`
];
}
processMessage(topic, payload) {
logger.info(`MyT: ${topic}, ${payload}`);
let buttonIdx = parseInt(topic.substring(this.topicFirstPart.length + 1));
if (buttonIdx >= 1 && buttonIdx <= 3) {
this.itemObjs[buttonIdx - 1].processMessage('', payload);
}
else {
logger.warn(`MyT: no handling available for ${topic}, ${buttonIdx}`);
}
}
}
exports.MySwitchThing = MySwitchThing;
//# sourceMappingURL=MySwitchThing.js.map

73
dist/RelayBox.js vendored Normal file
View File

@ -0,0 +1,73 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const logger = require("./log");
const MqttDispatcher_1 = require("./MqttDispatcher");
const AItem_1 = require("./AItem");
const Export_1 = require("./Export");
class RelayBoxThing extends AItem_1.AItem {
constructor(floor, room, item, deviceCommandTopic, deviceStatusTopic, itemNames) {
super(floor, room, item, '');
this.itemNames = itemNames;
this.deviceCommandTopic = deviceCommandTopic;
this.deviceStatusTopic = deviceStatusTopic;
this.stateTopicPre = `${this.topicFirstPart}/state`;
this.feedbackTopicPre = `${this.topicFirstPart}/feedback`;
this.conflictTopicPre = `${this.topicFirstPart}/conflict`;
this.subscribeTopics = [
`${this.deviceStatusTopic}`,
`${this.stateTopicPre}/#`
];
this.oldSwitchStates = '';
}
exportItem() {
return Export_1.RelayBoxExport(this.itemId, this.stateTopicPre, this.feedbackTopicPre, this.conflictTopicPre, this.itemNames);
}
processMessage(topic, payload) {
// logger.info(`RT: ${topic}, ${payload}`)
if (topic == this.deviceStatusTopic) {
// logger.info(`RT: status received`)
this.status = JSON.parse(payload);
let statusParsed = JSON.stringify(this.status);
this.switchStates = JSON.stringify(this.status.data.switchStates);
if (this.switchStates != this.oldSwitchStates) {
this.oldSwitchStates = this.switchStates;
logger.info(`RT: status parsed: ${statusParsed}`);
logger.info(`RT: device: ${this.status.metadata.device}`);
logger.info(`RT: uptime: ${this.status.data.uptime}`);
for (let i = 0; i < this.itemNames.length; i++) {
if (this.status.data.switchStates[i].feedbackState == '0') {
MqttDispatcher_1.mqttHandler.send(`${this.feedbackTopicPre}/${i}`, 'OFF');
}
else {
MqttDispatcher_1.mqttHandler.send(`${this.feedbackTopicPre}/${i}`, 'ON');
}
if (this.status.data.switchStates[i].stateConflict == '0') {
MqttDispatcher_1.mqttHandler.send(`${this.conflictTopicPre}/${i}`, 'CLEAR');
}
else {
MqttDispatcher_1.mqttHandler.send(`${this.conflictTopicPre}/${i}`, 'CONFLICT');
}
}
}
}
else {
logger.info(`RT: ${topic}, ${payload}`);
let thingRelatedPart = topic.substring(this.stateTopicPre.length + 1);
let itemIdx = parseInt(thingRelatedPart);
logger.info(`RT: pre: ${this.stateTopicPre}, thingRelatedPart: ${thingRelatedPart}, itemIdx: ${itemIdx}`);
if (itemIdx >= 0 && itemIdx < this.itemNames.length) {
if (payload == 'ON') {
MqttDispatcher_1.mqttHandler.send(this.deviceCommandTopic, `switch ${itemIdx} on`);
}
else {
MqttDispatcher_1.mqttHandler.send(this.deviceCommandTopic, `switch ${itemIdx} off`);
}
}
else {
logger.warn(`RT: no handling available for ${topic}`);
}
}
}
}
exports.RelayBoxThing = RelayBoxThing;
//# sourceMappingURL=RelayBox.js.map

97
dist/Scene.js vendored Normal file
View File

@ -0,0 +1,97 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const AItem_1 = require("./AItem");
const MqttDispatcher_1 = require("./MqttDispatcher");
const Export_1 = require("./Export");
class LightScene extends AItem_1.AItem {
getLabel() {
return this.label;
}
getRoom() {
return this.room;
}
getStateTopic() {
return this.stateTopic;
}
getStateFeedbackTopic() {
return this.stateFeedbackTopic;
}
constructor(floor, room, item, label = '', onItems, offItems) {
super(floor, room, item, label);
this.onItems = onItems;
this.offItems = offItems;
this.stateTopic = `${this.topicFirstPart}/state`;
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`;
this.subscribeTopics = [];
this.subscribeTopics.push(this.stateTopic);
this.onFeedbackTopics = [];
this.onTopics = [];
this.onFeedbackMap = {};
this.onItems.forEach((item) => {
this.subscribeTopics.push(item.getStateFeedbackTopic());
this.onFeedbackTopics.push(item.getStateFeedbackTopic());
this.onTopics.push(item.getStateTopic());
this.onFeedbackMap[item.getStateFeedbackTopic()] = '-';
});
this.offFeedbackTopics = [];
this.offTopics = [];
this.offFeedbackMap = {};
this.offItems.forEach((item) => {
this.subscribeTopics.push(item.getStateFeedbackTopic());
this.offFeedbackTopics.push(item.getStateFeedbackTopic());
this.offTopics.push(item.getStateTopic());
this.offFeedbackMap[item.getStateFeedbackTopic()] = '-';
});
this.state = 'OFF';
this.myLastFeedbackState = '-';
}
exportItem() {
return Export_1.SwitchExport(this.itemId, this.label, this.stateTopic, this.stateFeedbackTopic, 'bulb');
}
processMessage(topic, payload) {
if (topic == this.stateTopic) {
this.state = payload;
if (this.state == 'ON') {
this.onTopics.forEach((topic2) => {
MqttDispatcher_1.mqttHandler.send(topic2, 'ON');
});
this.offTopics.forEach((topic2) => {
MqttDispatcher_1.mqttHandler.send(topic2, 'OFF');
});
}
else {
this.onTopics.forEach((topic2) => {
MqttDispatcher_1.mqttHandler.send(topic2, 'OFF');
});
this.offTopics.forEach((topic2) => {
MqttDispatcher_1.mqttHandler.send(topic2, 'OFF');
});
}
}
else if (this.onFeedbackTopics.some((x) => { return x == topic; })) {
let feedbackState = payload;
this.onFeedbackMap[topic] = feedbackState;
}
else if (this.offFeedbackTopics.some((x) => { return x == topic; })) {
let feedbackState = payload;
this.offFeedbackMap[topic] = feedbackState;
}
let myFeedbackState = 'ON';
Object.values(this.onFeedbackMap).forEach((v) => {
if (v != 'ON') {
myFeedbackState = 'OFF';
}
});
Object.values(this.offFeedbackMap).forEach((v) => {
if (v != 'OFF') {
myFeedbackState = 'OFF';
}
});
if (myFeedbackState != this.myLastFeedbackState) {
MqttDispatcher_1.mqttHandler.send(this.stateFeedbackTopic, myFeedbackState);
this.myLastFeedbackState = myFeedbackState;
}
}
}
exports.LightScene = LightScene;
//# sourceMappingURL=Scene.js.map

56
dist/SimpleTopicSwitchItem.js vendored Normal file
View File

@ -0,0 +1,56 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const MqttDispatcher_1 = require("./MqttDispatcher");
const AItem_1 = require("./AItem");
const Export_1 = require("./Export");
class SimpleTopicSwitchItem extends AItem_1.AItem {
getLabel() {
return this.label;
}
getRoom() {
return this.room;
}
getStateTopic() {
return this.stateTopic;
}
getStateFeedbackTopic() {
return this.stateFeedbackTopic;
}
getState() {
return this.state;
}
constructor(floor, room, item, label, actionTopic) {
super(floor, room, item, label);
this.stateTopic = `${this.topicFirstPart}/state`;
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`;
this.actionTopic = actionTopic;
this.subscribeTopics = [
this.stateTopic
];
this.state = 'OFF';
this.oldState = undefined;
}
exportItem() {
return Export_1.SwitchExport(this.itemId, this.label, this.stateTopic, this.stateFeedbackTopic, this.type);
}
processMessage(topic, payload) {
switch (topic) {
case this.stateTopic:
this.state = payload;
MqttDispatcher_1.mqttHandler.send(this.stateFeedbackTopic, this.state);
if (this.state != this.oldState) {
if (this.state == 'ON') {
MqttDispatcher_1.mqttHandler.send(this.actionTopic, 'ON');
}
else {
MqttDispatcher_1.mqttHandler.send(this.actionTopic, 'OFF');
}
this.oldState = this.state;
}
break;
}
this.emit('somethingChanged');
}
}
exports.SimpleTopicSwitchItem = SimpleTopicSwitchItem;
//# sourceMappingURL=SimpleTopicSwitchItem.js.map

35
dist/SwitchAdaptor.js vendored Normal file
View File

@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const AItem_1 = require("./AItem");
const MqttDispatcher_1 = require("./MqttDispatcher");
class SwitchAdaptor extends AItem_1.AItem {
constructor(floor, room, item) {
super(floor, room, item);
this.actionStateTopic = `${this.topicFirstPart}/state`;
this.inTopic = `${this.topicFirstPart}/in`;
this.subscribeTopics = [this.inTopic];
this.state = 'OFF';
}
getInTopic() {
return this.inTopic;
}
processMessage(topic, payload) {
switch (topic) {
case this.inTopic:
switch (payload) {
case 'SHORT':
if (this.state == 'OFF') {
this.state = 'ON';
}
else {
this.state = 'OFF';
}
MqttDispatcher_1.mqttHandler.send(this.actionStateTopic, this.state, true);
break;
}
break;
}
}
}
exports.SwitchAdaptor = SwitchAdaptor;
//# sourceMappingURL=SwitchAdaptor.js.map

22
dist/SwitchOffAdaptor.js vendored Normal file
View File

@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const AItem_1 = require("./AItem");
const MqttDispatcher_1 = require("./MqttDispatcher");
class SwitchOffAdaptor extends AItem_1.AItem {
constructor(floor, room, item) {
super(floor, room, item);
this.actionStateTopic = `${this.topicFirstPart}/state`;
this.inTopic = `${this.topicFirstPart}/in`;
this.subscribeTopics = [this.inTopic];
}
getInTopic() {
return this.inTopic;
}
processMessage(topic, payload) {
if ((topic == this.inTopic) && (payload == 'SHORT')) {
MqttDispatcher_1.mqttHandler.send(this.actionStateTopic, 'OFF', true);
}
}
}
exports.SwitchOffAdaptor = SwitchOffAdaptor;
//# sourceMappingURL=SwitchOffAdaptor.js.map

52
dist/TouchSwitchMultiButtonThing.js vendored Normal file
View File

@ -0,0 +1,52 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const logger = require("./log");
const MqttDispatcher_1 = require("./MqttDispatcher");
const AItem_1 = require("./AItem");
class TouchSwitchButtonSingleItem {
constructor(actionTopic) {
this.actionTopic = actionTopic;
}
processMessage(topic, payload) {
switch (payload) {
case 'SHORT':
MqttDispatcher_1.mqttHandler.send(this.actionTopic, 'SHORT', true);
break;
case 'LONG_BEGIN':
case 'LONG_CONT':
MqttDispatcher_1.mqttHandler.send(this.actionTopic, 'LONG_HOLD', true);
break;
case 'LONG_END':
MqttDispatcher_1.mqttHandler.send(this.actionTopic, 'LONG_END', true);
break;
default:
logger.warn(`TWBSI: no handling available for ${topic}`);
break;
}
}
}
exports.TouchSwitchButtonSingleItem = TouchSwitchButtonSingleItem;
class TouchSwitchMultiButtonThing extends AItem_1.AItem {
constructor(floor, room, item, itemObjs) {
super(floor, room, item, '');
this.itemObjs = itemObjs;
this.deviceTopicPre = `IoT/TouchSwitch/${this.floor}/${this.room}/${this.item}`;
this.subscribeTopics = [
`${this.deviceTopicPre}/#`
];
}
processMessage(topic, payload) {
logger.info(`TSMBT: ${topic}, ${payload}`);
let buttonRelatedPart = topic.substring(this.deviceTopicPre.length + 1);
let buttonIdx = parseInt(buttonRelatedPart);
logger.info(`TSMBT: pre: ${this.deviceTopicPre}, buttonRelatedPart: ${buttonRelatedPart}, buttonIdx: ${buttonIdx}`);
if (buttonIdx >= 1 && buttonIdx <= this.itemObjs.length) {
this.itemObjs[buttonIdx - 1].processMessage('-', payload);
}
else {
logger.warn(`TSMBT: no handling available for ${topic}`);
}
}
}
exports.TouchSwitchMultiButtonThing = TouchSwitchMultiButtonThing;
//# sourceMappingURL=TouchSwitchMultiButtonThing.js.map

78
dist/TwoLedSignal.js vendored Normal file
View File

@ -0,0 +1,78 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const AItem_1 = require("./AItem");
const MqttDispatcher_1 = require("./MqttDispatcher");
const logger = require("./log");
var SignalState;
(function (SignalState) {
SignalState[SignalState["SIGNAL_RED"] = 0] = "SIGNAL_RED";
SignalState[SignalState["SIGNAL_GREEN"] = 1] = "SIGNAL_GREEN";
SignalState[SignalState["SIGNAL_UNKNOWN"] = 2] = "SIGNAL_UNKNOWN";
})(SignalState || (SignalState = {}));
class SignalItem {
constructor(item, redToken, greenToken) {
this.item = item;
this.signalState = SignalState.SIGNAL_UNKNOWN;
this.redToken = redToken;
this.greenToken = greenToken;
}
getSignalState() {
return this.signalState;
}
processMessage(topic, payload) {
if (topic == this.item.getStateFeedbackTopic()) {
logger.info(`${topic}, ${payload}`);
if (payload == this.greenToken) {
this.signalState = SignalState.SIGNAL_GREEN;
}
else if (payload == this.redToken) {
this.signalState = SignalState.SIGNAL_RED;
}
else {
this.signalState = SignalState.SIGNAL_UNKNOWN;
}
// logger.info(`DBG: SignalItem: ${topic}, ${payload}, ${this.signalState}`)
}
}
}
class TwoLedSignal extends AItem_1.AItem {
constructor(floor, room, item, label, led1Items, led1GreenToken, led1RedToken, led2Items, led2GreenToken, led2RedToken) {
super(floor, room, item, label);
this.led1Items = [];
this.led2Items = [];
this.subscribeTopics = [];
led1Items.forEach((item) => {
this.led1Items.push(new SignalItem(item, led1RedToken, led1GreenToken));
this.subscribeTopics.push(item.getStateFeedbackTopic());
});
led2Items.forEach((item) => {
this.led2Items.push(new SignalItem(item, led2RedToken, led2GreenToken));
this.subscribeTopics.push(item.getStateFeedbackTopic());
});
}
processMessage(topic, payload) {
let reds = 0;
const RED_VALUES = [SignalState.SIGNAL_RED, SignalState.SIGNAL_UNKNOWN];
this.led1Items.forEach((item) => {
item.processMessage(topic, payload);
if (RED_VALUES.indexOf(item.getSignalState()) != -1) {
reds++;
}
// logger.info(`DBG: TwoLedSignal ${item.getSignalState()}, ${reds}`)
});
let msg = (reds > 0) ? "red" : "green";
MqttDispatcher_1.mqttHandler.send(`${this.topicFirstPart}/led1`, msg);
reds = 0;
this.led2Items.forEach((item) => {
item.processMessage(topic, payload);
if (RED_VALUES.indexOf(item.getSignalState()) != -1) {
reds++;
}
// logger.info(`DBG: TwoLedSignal ${item.getSignalState()}, ${reds}`)
});
msg = (reds > 0) ? "red" : "green";
MqttDispatcher_1.mqttHandler.send(`${this.topicFirstPart}/led2`, msg);
}
}
exports.TwoLedSignal = TwoLedSignal;
//# sourceMappingURL=TwoLedSignal.js.map

50
dist/UrlSwitchItem.js vendored Normal file
View File

@ -0,0 +1,50 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const logger = require("./log");
const MqttDispatcher_1 = require("./MqttDispatcher");
const AItem_1 = require("./AItem");
const Export_1 = require("./Export");
const http = require("http");
class UrlSwitchItem extends AItem_1.AItem {
getStateTopic() {
return this.stateTopic;
}
getStateFeedbackTopic() {
return this.stateFeedbackTopic;
}
constructor(floor, room, item, label, onUrl, offUrl, type = 'bulb') {
super(floor, room, item, label);
this.stateTopic = `${this.topicFirstPart}/state`;
this.subscribeTopics = [this.stateTopic];
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`;
this.actionTopic = 'IoT/Mqtt433Gateway/Message';
this.state = 'OFF';
this.oldState = undefined;
this.onUrl = onUrl;
this.offUrl = offUrl;
this.type = type;
}
exportItem() {
return Export_1.SwitchExport(this.itemId, this.label, this.stateTopic, this.stateFeedbackTopic, this.type);
}
processMessage(topic, payload) {
this.state = payload;
MqttDispatcher_1.mqttHandler.send(this.stateFeedbackTopic, this.state);
if (this.state != this.oldState) {
try {
if (this.state == 'ON') {
http.get(this.onUrl);
}
else {
http.get(this.offUrl);
}
this.oldState = this.state;
}
catch (_a) {
logger.error(`Failed to handle ${this.onUrl} or ${this.offUrl}`);
}
}
}
}
exports.UrlSwitchItem = UrlSwitchItem;
//# sourceMappingURL=UrlSwitchItem.js.map

483
dist/main.js vendored
View File

@ -8,170 +8,505 @@ const M433SwitchItem_1 = require("./M433SwitchItem");
const HomematicFourButtonThing_1 = require("./HomematicFourButtonThing");
const DimmerAdaptor_1 = require("./DimmerAdaptor");
const TimerAdaptor_1 = require("./TimerAdaptor");
const SwitchOffAdaptor_1 = require("./SwitchOffAdaptor");
const HomematicDimmerItem_1 = require("./HomematicDimmerItem");
const HomematicSwitchItem_1 = require("./HomematicSwitchItem");
const Forwarder_1 = require("./Forwarder");
const Scene_1 = require("./Scene");
const MaxEcoSwitch_1 = require("./MaxEcoSwitch");
const MaxThermostat_1 = require("./MaxThermostat");
const MaxWindowContact_1 = require("./MaxWindowContact");
const Cron_1 = require("./Cron");
const HueColorBulbItem_1 = require("./HueColorBulbItem");
const TouchSwitchMultiButtonThing_1 = require("./TouchSwitchMultiButtonThing");
const RelayBox_1 = require("./RelayBox");
const HeatingScene_1 = require("./HeatingScene");
const TwoLedSignal_1 = require("./TwoLedSignal");
const MySwitchThing_1 = require("./MySwitchThing");
const SimpleTopicSwitchItem_1 = require("./SimpleTopicSwitchItem");
logger.info("Dispatcher starting");
let allLabeledItems = new Array();
let allThermostatItems = new Array();
let allWindows = new Array();
let allRelevantLights = new Array();
let allLights = new Array();
let allLightScenes = new Array();
// Anna -----------------------------------------------------------------------------------------------------
// Anna Aquarium 14665044 24 1 14665041 24 1
let aquariumLight = new M433SwitchItem_1.M433SwitchItem('1st', 'Anna', 'AquariumLight', 'Aquariumlicht', '14665044 24 1', '14665041 24 1');
let aquariumLight = new M433SwitchItem_1.M433SwitchItem('1st', 'Anna', 'AquariumLight', 'Aquarium', '14665044 24 1', '14665041 24 1');
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,0', output: 'ON' },
{ cronTime: '00 00 13 * * *', output: 'OFF' },
{ cronTime: '00 00 14 * * *', output: 'ON' },
{ cronTime: '00 00 22 * * *', output: 'OFF' }
]);
aquariumLightCron.start();
// Anna Bett 14668116 24 1 14668113 24 1
let annaBedLight = new M433SwitchItem_1.M433SwitchItem('1st', 'Anna', 'BedLight', 'Bettlicht Anna', '14668116 24 1', '14668113 24 1');
let annaBedLight = new M433SwitchItem_1.M433SwitchItem('1st', 'Anna', 'BedLight', 'Bettlicht', '14668116 24 1', '14668113 24 1');
annaBedLight.start();
allLabeledItems.push(annaBedLight);
allRelevantLights.push(annaBedLight);
allLights.push(annaBedLight);
let windowContactAnna1st = new MaxWindowContact_1.MaxWindowContact('1st', 'Anna', 'WindowContact', 'Anna', 20);
windowContactAnna1st.start();
allLabeledItems.push(windowContactAnna1st);
allWindows.push(windowContactAnna1st);
let thermostatAnna1st = new MaxThermostat_1.MaxThermostat('1st', 'Anna', 'Thermostat', 'Thermostat Anna', 21, [windowContactAnna1st]);
thermostatAnna1st.start();
thermostatAnna1st.setPresetTemperature(21.0);
allLabeledItems.push(thermostatAnna1st);
allThermostatItems.push(thermostatAnna1st);
let thermostatAnna1stCron = new Cron_1.Cron('thermostatAnna1stCron', thermostatAnna1st, [
{ cronTime: '00 05 06 * * *', output: 'ON' },
{ cronTime: '00 05 08 * * 1-5', output: 'OFF' },
{ cronTime: '00 05 16 * * 1', output: 'ON' },
{ cronTime: '00 05 14 * * 2', output: 'ON' },
{ cronTime: '00 05 14 * * 3', output: 'ON' },
{ cronTime: '00 05 16 * * 4', output: 'ON' },
{ cronTime: '00 05 14 * * 5', output: 'ON' },
{ cronTime: '00 58 23 * * *', output: 'OFF' }
]);
thermostatAnna1stCron.start();
// Matthias -------------------------------------------------------------------------------------------------
// Matthias Stehlampen 7 24 1 6 24 1
let matthiasStandLights = new M433SwitchItem_1.M433SwitchItem('1st', 'Matthias', 'Stehlampen Matthias', 'StandLight', '7 24 1', '6 24 1');
let matthiasStandLights = new M433SwitchItem_1.M433SwitchItem('1st', 'Matthias', 'StandLight', 'Stehlampen', '7 24 1', '6 24 1');
matthiasStandLights.start();
allLabeledItems.push(matthiasStandLights);
allRelevantLights.push(matthiasStandLights);
allLights.push(matthiasStandLights);
// Matthias Bett 15 24 1 14 24 1
let matthiasBedLight = new M433SwitchItem_1.M433SwitchItem('1st', 'Matthias', 'BedLight', 'Bettlicht Matthias', '15 24 1', '14 24 1');
let matthiasBedLight = new M433SwitchItem_1.M433SwitchItem('1st', 'Matthias', 'BedLight', 'Bettlicht', '15 24 1', '14 24 1');
matthiasBedLight.start();
allLabeledItems.push(matthiasBedLight);
allRelevantLights.push(matthiasBedLight);
allLights.push(matthiasBedLight);
// Matthias Lautsprecher 11 24 1 10 24 1
let matthiasSpeaker = new M433SwitchItem_1.M433SwitchItem('1st', 'Matthias', 'Speaker', 'Lautsprecher Matthias', '11 24 1', '10 24 1', 'outlet');
let matthiasSpeaker = new M433SwitchItem_1.M433SwitchItem('1st', 'Matthias', 'Speaker', 'Lautsprecher', '11 24 1', '10 24 1', 'outlet');
matthiasSpeaker.start();
allLabeledItems.push(matthiasSpeaker);
allRelevantLights.push(matthiasSpeaker);
allLights.push(matthiasSpeaker);
let windowContactMatthias = new MaxWindowContact_1.MaxWindowContact('1st', 'Matthias', 'WindowContact', 'Matthias', 24);
windowContactMatthias.start();
allLabeledItems.push(windowContactMatthias);
allWindows.push(windowContactMatthias);
// Esszimmer ------------------------------------------------------------------------------------------------
// Esszimmer kleine Lampe 69653 24 1 69652 24 1
let diningRoomSmallLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'DiningRoom', 'SmallLight', 'kleine Lampe Esszimmer', '69653 24 1', '69652 24 1');
let diningRoomSmallLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'Esszimmer', 'SmallLight', 'kleine Lampe', '69653 24 1', '69652 24 1');
diningRoomSmallLight.start();
allLabeledItems.push(diningRoomSmallLight);
allRelevantLights.push(diningRoomSmallLight);
allLights.push(diningRoomSmallLight);
// Esszimmer Stehlampe 86037 24 1 86036 24 1
let diningRoomStandLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'DiningRoom', 'StandLight', 'Stehlampe Esszimmer', '86037 24 1', '86036 24 1');
let diningRoomStandLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'Esszimmer', 'StandLight', 'Stehlampe', '86037 24 1', '86036 24 1');
diningRoomStandLight.start();
allLabeledItems.push(diningRoomStandLight);
allRelevantLights.push(diningRoomStandLight);
allLights.push(diningRoomStandLight);
// Esszimmer Schranklicht 65813 24 1 65812 24 1
let diningRoomCupboardLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'DiningRoom', 'CupboardLight', 'Schranklicht Esszimmer', '65813 24 1', '65812 24 1');
let diningRoomCupboardLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'Esszimmer', 'CupboardLight', 'Schranklicht', '65813 24 1', '65812 24 1');
diningRoomCupboardLight.start();
allLabeledItems.push(diningRoomCupboardLight);
allRelevantLights.push(diningRoomCupboardLight);
allLights.push(diningRoomCupboardLight);
// Esszimmer Regallicht
let diningRoomShelfLight = new SimpleTopicSwitchItem_1.SimpleTopicSwitchItem('Gnd', 'Esszimmer', 'ShelfLight', 'Regallicht', 'IoT/WifiRelay1/State');
diningRoomShelfLight.start();
allLabeledItems.push(diningRoomShelfLight);
allRelevantLights.push(diningRoomShelfLight);
allLights.push(diningRoomShelfLight);
let diningRoomNaehkaestchenLight = new HueColorBulbItem_1.HueColorBulbItem('Gnd', 'Esszimmer', 'NaehkaestchenLight', 'Nähkästchen', 15);
diningRoomNaehkaestchenLight.start();
allLabeledItems.push(diningRoomNaehkaestchenLight);
allRelevantLights.push(diningRoomNaehkaestchenLight);
allLights.push(diningRoomNaehkaestchenLight);
let windowContactDiningRoom1 = new MaxWindowContact_1.MaxWindowContact('Gnd', 'Esszimmer', 'WindowContact1', 'Essz. links', 26);
windowContactDiningRoom1.start();
allLabeledItems.push(windowContactDiningRoom1);
allWindows.push(windowContactDiningRoom1);
let windowContactDiningRoom2 = new MaxWindowContact_1.MaxWindowContact('Gnd', 'Esszimmer', 'WindowContact2', 'Essz. rechts', 27);
windowContactDiningRoom2.start();
allLabeledItems.push(windowContactDiningRoom2);
allWindows.push(windowContactDiningRoom2);
let thermostatDiningRoom = new MaxThermostat_1.MaxThermostat('Gnd', 'Esszimmer', 'Thermostat', 'Thermostat Esszimmer', 31, [windowContactDiningRoom1, windowContactDiningRoom2]);
thermostatDiningRoom.start();
thermostatDiningRoom.setPresetTemperature(21.0);
allLabeledItems.push(thermostatDiningRoom);
allThermostatItems.push(thermostatDiningRoom);
// Wohnzimmer -----------------------------------------------------------------------------------------------
// Wohnzimmer grosse Lampe 65557 24 1 65556 24 1
let livingRoomLargeLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'LivingRoom', 'LargeLight', 'große Lampe Wohnzimmer', '65557 24 1', '65556 24 1');
let livingRoomLargeLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'Wohnzimmer', 'LargeLight', 'große Lampe', '65557 24 1', '65556 24 1');
livingRoomLargeLight.start();
allLabeledItems.push(livingRoomLargeLight);
allRelevantLights.push(livingRoomLargeLight);
allLights.push(livingRoomLargeLight);
// Wohnzimmer kleine Lampe 87061 24 1 87060 24 1
let livingRoomSmallLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'LivingRoom', 'SmallLight', 'kleine Lampe Wohnzimmer', '87061 24 1', '87060 24 1');
let livingRoomSmallLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'Wohnzimmer', 'SmallLight', 'kleine Lampe', '87061 24 1', '87060 24 1');
livingRoomSmallLight.start();
allLabeledItems.push(livingRoomSmallLight);
allRelevantLights.push(livingRoomSmallLight);
allLights.push(livingRoomSmallLight);
// Wohnzimmer Sterne 69909 24 1 69908 24 1
let livingRoomStars = new M433SwitchItem_1.M433SwitchItem('Gnd', 'LivingRoom', 'Stars', 'Sterne Wohnzimmer', '69909 24 1', '69908 24 1');
let livingRoomStars = new M433SwitchItem_1.M433SwitchItem('Gnd', 'Wohnzimmer', 'Stars', 'Sterne', '69909 24 1', '69908 24 1');
livingRoomStars.start();
allLabeledItems.push(livingRoomStars);
allRelevantLights.push(livingRoomStars);
allLights.push(livingRoomStars);
// Wohnzimmer kleine Stehlampe 81941 24 1 81940 24 1
let livingRoomStandLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'LivingRoom', 'StandLight', 'Stehlampe Wohnzimmer', '81941 24 1', '81940 24 1');
let livingRoomStandLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'Wohnzimmer', 'StandLight', 'Stehlampe', '81941 24 1', '81940 24 1');
livingRoomStandLight.start();
allLabeledItems.push(livingRoomStandLight);
allRelevantLights.push(livingRoomStandLight);
allLights.push(livingRoomStandLight);
let windowContactLivingRoom1 = new MaxWindowContact_1.MaxWindowContact('Gnd', 'Wohnzimmer', 'WindowContact1', 'Wohnz. rechts', 28);
windowContactLivingRoom1.start();
allLabeledItems.push(windowContactLivingRoom1);
allWindows.push(windowContactLivingRoom1);
let windowContactLivingRoom2 = new MaxWindowContact_1.MaxWindowContact('Gnd', 'Wohnzimmer', 'WindowContact2', 'Wohnz. links', 29);
windowContactLivingRoom2.start();
allLabeledItems.push(windowContactLivingRoom2);
allWindows.push(windowContactLivingRoom2);
let thermostatLivingRoom = new MaxThermostat_1.MaxThermostat('Gnd', 'Wohnzimmer', 'Thermostat', 'Thermostat Wohnzimmer', 30, [windowContactLivingRoom1, windowContactLivingRoom2]);
thermostatLivingRoom.start();
thermostatLivingRoom.setPresetTemperature(21.0);
allLabeledItems.push(thermostatLivingRoom);
allThermostatItems.push(thermostatLivingRoom);
// Flur -----------------------------------------------------------------------------------------------------
// Flur Schreibtisch 83221 24 1 83220 24 1
let hallwayDeskLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'Hallway', 'DeskLight', 'Schreibtischlampe Flur', '83221 24 1', '83220 24 1');
let hallwayDeskLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'Flur', 'DeskLight', 'Schreibtischlampe', '83221 24 1', '83220 24 1');
hallwayDeskLight.start();
allLabeledItems.push(hallwayDeskLight);
allRelevantLights.push(hallwayDeskLight);
allLights.push(hallwayDeskLight);
// Flur Stehlampe 8704914 24 5 8793154 24 5
let hallwayStandLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'Hallway', 'StandLight', 'Stehlampe Flur', '8704914 24 5', '8793154 24 5');
let hallwayStandLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'Flur', 'StandLight', 'Stehlampe', '8704914 24 5', '8793154 24 5');
hallwayStandLight.start();
allLabeledItems.push(hallwayStandLight);
allRelevantLights.push(hallwayStandLight);
allLights.push(hallwayStandLight);
// Flur Schranklicht 66581 24 1 66580 24 1
let hallwayWardrobeLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'Hallway', 'WardrobeLight', 'Schranklicht Flur', '66581 24 1', '66580 24 1');
let hallwayWardrobeLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'Flur', 'WardrobeLight', 'Schranklicht', '66581 24 1', '66580 24 1');
hallwayWardrobeLight.start();
allLabeledItems.push(hallwayWardrobeLight);
allRelevantLights.push(hallwayWardrobeLight);
allLights.push(hallwayWardrobeLight);
let windowContactHallway = new MaxWindowContact_1.MaxWindowContact('Gnd', 'Flur', 'WindowContact', 'Flur', 25);
windowContactHallway.start();
allLabeledItems.push(windowContactHallway);
allWindows.push(windowContactHallway);
let thermostatHallway1 = new MaxThermostat_1.MaxThermostat('Gnd', 'Flur', 'Thermostat1', 'Thermostat Flur vorne', 32, []);
thermostatHallway1.start();
thermostatHallway1.setPresetTemperature(19.0);
allLabeledItems.push(thermostatHallway1);
allThermostatItems.push(thermostatHallway1);
let thermostatHallway2 = new MaxThermostat_1.MaxThermostat('Gnd', 'Flur', 'Thermostat2', 'Thermostat Flur hinten', 33, []);
thermostatHallway2.start();
thermostatHallway2.setPresetTemperature(5.0);
allLabeledItems.push(thermostatHallway2);
allThermostatItems.push(thermostatHallway2);
// Küche ----------------------------------------------------------------------------------------------------
// Küche Fensterbank 66837 24 1 66836 24 1
let kitchenWindowLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'Kitchen', 'WindowLight', 'Fensterbanklicht Küche', '66837 24 1', '66836 24 1');
let kitchenWindowLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'Kueche', 'WindowLight', 'Fensterbanklicht', '66837 24 1', '66836 24 1');
kitchenWindowLight.start();
allLabeledItems.push(kitchenWindowLight);
allRelevantLights.push(kitchenWindowLight);
allLights.push(kitchenWindowLight);
// Küche Deckenlampe 82197 24 1 82196 24 1
let kitchenCeilingLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'Kitchen', 'CeilingLight', 'Deckenlampe Küche', '82197 24 1', '82196 24 1');
let kitchenCeilingLight = new M433SwitchItem_1.M433SwitchItem('Gnd', 'Kueche', 'CeilingLight', 'Deckenlampe', '82197 24 1', '82196 24 1');
kitchenCeilingLight.start();
allLabeledItems.push(kitchenCeilingLight);
allRelevantLights.push(kitchenCeilingLight);
allLights.push(kitchenCeilingLight);
// Schlafzimmer ---------------------------------------------------------------------------------------------
// Schlafzimmer Wolfgangs Seite 13976916 24 1 13976913 24 1
let bedRoomWolfgangsSide = new M433SwitchItem_1.M433SwitchItem('1st', 'BedRoom', 'WolfgangsSide', 'Wolfgangs Seite Schlafzimmer', '13976916 24 1', '13976913 24 1');
let bedRoomWolfgangsSide = new M433SwitchItem_1.M433SwitchItem('1st', 'Schlafzimmer', 'WolfgangsSide', 'Wolfgangs Seite', '13976916 24 1', '13976913 24 1');
bedRoomWolfgangsSide.start();
allLabeledItems.push(bedRoomWolfgangsSide);
allRelevantLights.push(bedRoomWolfgangsSide);
allLights.push(bedRoomWolfgangsSide);
let bedRoomWolfgangBedLight = new HueColorBulbItem_1.HueColorBulbItem('1st', 'Schlafzimmer', 'WolfgangBedLight', 'Wolfgangs Bettlicht', 16);
bedRoomWolfgangBedLight.start();
allLabeledItems.push(bedRoomWolfgangBedLight);
allRelevantLights.push(bedRoomWolfgangBedLight);
allLights.push(bedRoomWolfgangBedLight);
let bedRoomWolfgangBedLightDimmerAdaptor = new DimmerAdaptor_1.DimmerAdaptor('1st', 'Schlafzimmer', 'WolfgangBedLight');
bedRoomWolfgangBedLightDimmerAdaptor.start();
let touchSwitchMultiButtonThing = new TouchSwitchMultiButtonThing_1.TouchSwitchMultiButtonThing('1st', 'Bedroom', 'Wolfgang', [new TouchSwitchMultiButtonThing_1.TouchSwitchButtonSingleItem(bedRoomWolfgangBedLightDimmerAdaptor.getInTopic())]);
touchSwitchMultiButtonThing.start();
// Schlafzimmer Pattys Seite 13980756 24 1 13980753 24 1
let bedRoomPattysSide = new M433SwitchItem_1.M433SwitchItem('1st', 'BedRoom', 'PattysSide', 'Pattys Seite Schlafzimmer', '13980756 24 1', '13980753 24 1');
let bedRoomPattysSide = new M433SwitchItem_1.M433SwitchItem('1st', 'Schlafzimmer', 'PattysSide', 'Pattys Seite', '13980756 24 1', '13980753 24 1');
bedRoomPattysSide.start();
allLabeledItems.push(bedRoomPattysSide);
allRelevantLights.push(bedRoomPattysSide);
allLights.push(bedRoomPattysSide);
// Schlafzimmer Fensterbank 13979988 24 1 13979985 24 1
let bedRoomWindowLight = new M433SwitchItem_1.M433SwitchItem('1st', 'BedRoom', 'WindowLight', 'Fensterbanklicht Schlafzimmer', '13979988 24 1', '13979985 24 1');
let bedRoomWindowLight = new M433SwitchItem_1.M433SwitchItem('1st', 'Schlafzimmer', 'WindowLight', 'Fensterbanklicht', '13979988 24 1', '13979985 24 1');
bedRoomWindowLight.start();
allLabeledItems.push(bedRoomWindowLight);
allRelevantLights.push(bedRoomWindowLight);
allLights.push(bedRoomWindowLight);
let windowContactBedroomStreet1st = new MaxWindowContact_1.MaxWindowContact('1st', 'Bedroom', 'WindowContactStreet', 'Schlafz. Strasse', 17);
windowContactBedroomStreet1st.start();
allLabeledItems.push(windowContactBedroomStreet1st);
allWindows.push(windowContactBedroomStreet1st);
let windowContact1BedroomGarden1st = new MaxWindowContact_1.MaxWindowContact('1st', 'Bedroom', 'WindowContact1Garden', 'Schlafz. Garten 1', 18);
windowContact1BedroomGarden1st.start();
allLabeledItems.push(windowContact1BedroomGarden1st);
allWindows.push(windowContact1BedroomGarden1st);
let windowContact2BedroomGarden1st = new MaxWindowContact_1.MaxWindowContact('1st', 'Bedroom', 'WindowContact2Garden', 'Schlafz. Garten 2', 22);
windowContact2BedroomGarden1st.start();
allLabeledItems.push(windowContact2BedroomGarden1st);
allWindows.push(windowContact2BedroomGarden1st);
let thermostatBedroom1st = new MaxThermostat_1.MaxThermostat('1st', 'Bedroom', 'Thermostat', 'Thermostat Schlafzimmer', 19, [windowContact1BedroomGarden1st, windowContact2BedroomGarden1st, windowContactBedroomStreet1st]);
thermostatBedroom1st.start();
thermostatBedroom1st.setPresetTemperature(20.0);
allLabeledItems.push(thermostatBedroom1st);
allThermostatItems.push(thermostatBedroom1st);
let thermostatBedroom1stCron = new Cron_1.Cron('thermostatBedroom1stCron', thermostatBedroom1st, [
{ cronTime: '00 01 06 * * 1-5', output: 'ON' },
{ cronTime: '00 01 09 * * 1-5', output: 'OFF' },
{ cronTime: '00 01 08 * * 6,0', output: 'ON' },
{ cronTime: '00 01 11 * * 6,0', output: 'OFF' },
{ cronTime: '00 00 17 * * *', output: 'ON' },
{ cronTime: '00 59 23 * * *', output: 'OFF' }
]);
thermostatBedroom1stCron.start();
// ---------------------------------------------------------------------------------------------------------
let morningLightForwarder = new Forwarder_1.Forwarder('Gnd', 'Hallway', 'MorningLight', 'state', 'MorningLight', [
kitchenWindowLight.stateTopic,
kitchenCeilingLight.stateTopic,
hallwayDeskLight.stateTopic,
hallwayStandLight.stateTopic,
hallwayWardrobeLight.stateTopic
let windowContactBathroomGnd = new MaxWindowContact_1.MaxWindowContact('Gnd', 'Bathroom', 'WindowContact', 'Bad unten', 7);
windowContactBathroomGnd.start();
allLabeledItems.push(windowContactBathroomGnd);
allWindows.push(windowContactBathroomGnd);
let thermostatBathroomGnd = new MaxThermostat_1.MaxThermostat('Gnd', 'Bathroom', 'Thermostat', 'Thermostat Bad unten', 4, [windowContactBathroomGnd]);
thermostatBathroomGnd.start();
thermostatBathroomGnd.setPresetTemperature(20.0);
allLabeledItems.push(thermostatBathroomGnd);
allThermostatItems.push(thermostatBathroomGnd);
let thermostatBathroomGndCron = new Cron_1.Cron('thermostatBathroomGndCron', thermostatBathroomGnd, [
{ cronTime: '00 02 06 * * 1-5', output: 'ON' },
{ cronTime: '00 02 08 * * 6,0', output: 'ON' },
{ cronTime: '00 02 11 * * *', output: 'OFF' },
{ cronTime: '00 02 19 * * *', output: 'ON' },
{ cronTime: '00 00 23 * * *', output: 'OFF' }
]);
morningLightForwarder.start();
let dayLightForwarder = new Forwarder_1.Forwarder('Gnd', 'Hallway', 'DayLight', 'state', 'DayLight', [
kitchenWindowLight.stateTopic,
kitchenCeilingLight.stateTopic,
hallwayDeskLight.stateTopic,
hallwayStandLight.stateTopic,
hallwayWardrobeLight.stateTopic,
diningRoomSmallLight.stateTopic,
diningRoomStandLight.stateTopic,
diningRoomCupboardLight.stateTopic,
livingRoomLargeLight.stateTopic,
livingRoomSmallLight.stateTopic,
livingRoomStars.stateTopic,
livingRoomStandLight.stateTopic
thermostatBathroomGndCron.start();
let windowContactBathroom1st = new MaxWindowContact_1.MaxWindowContact('1st', 'Bathroom', 'WindowContact', 'Bad oben', 2);
windowContactBathroom1st.start();
allLabeledItems.push(windowContactBathroom1st);
allWindows.push(windowContactBathroom1st);
let thermostatBathroom1st = new MaxThermostat_1.MaxThermostat('1st', 'Bathroom', 'Thermostat', 'Thermostat Bad oben', 3, [windowContactBathroom1st]);
thermostatBathroom1st.start();
thermostatBathroom1st.setPresetTemperature(20.0);
allLabeledItems.push(thermostatBathroom1st);
allThermostatItems.push(thermostatBathroom1st);
let thermostatBathroom1stCron = new Cron_1.Cron('thermostatBathroom1stCron', thermostatBathroom1st, [
{ cronTime: '00 00 06 * * 1-5', output: 'ON' },
{ cronTime: '00 00 08 * * 6,0', output: 'ON' },
{ cronTime: '00 00 11 * * *', output: 'OFF' },
{ cronTime: '00 00 19 * * *', output: 'ON' },
{ cronTime: '00 00 23 * * *', output: 'OFF' }
]);
dayLightForwarder.start();
let ecoLightForwarder = new Forwarder_1.Forwarder('Gnd', 'Hallway', 'EcoLight', 'state', 'EcoLight', [
kitchenWindowLight.stateTopic,
hallwayDeskLight.stateTopic,
hallwayWardrobeLight.stateTopic,
diningRoomSmallLight.stateTopic,
diningRoomStandLight.stateTopic,
diningRoomCupboardLight.stateTopic,
livingRoomStars.stateTopic,
livingRoomStandLight.stateTopic
thermostatBathroom1stCron.start();
let windowContactKitchen1 = new MaxWindowContact_1.MaxWindowContact('Gnd', 'Kueche', 'WindowContact1', 'Küche Garten', 11);
windowContactKitchen1.start();
allLabeledItems.push(windowContactKitchen1);
allWindows.push(windowContactKitchen1);
let windowContactKitchen2 = new MaxWindowContact_1.MaxWindowContact('Gnd', 'Kueche', 'WindowContact2', 'Küche Terassentür', 10);
windowContactKitchen2.start();
allLabeledItems.push(windowContactKitchen2);
allWindows.push(windowContactKitchen2);
let windowContactKitchen3 = new MaxWindowContact_1.MaxWindowContact('Gnd', 'Kueche', 'WindowContact3', 'Küche Straße 1', 12);
windowContactKitchen3.start();
allLabeledItems.push(windowContactKitchen3);
allWindows.push(windowContactKitchen3);
let windowContactKitchen4 = new MaxWindowContact_1.MaxWindowContact('Gnd', 'Kueche', 'WindowContact4', 'Küche Straße 2', 13);
windowContactKitchen4.start();
allLabeledItems.push(windowContactKitchen4);
allWindows.push(windowContactKitchen4);
let thermostatKitchen = new MaxThermostat_1.MaxThermostat('Gnd', 'Kueche', 'Thermostat', 'Thermostat Küche', 14, [
windowContactKitchen1, windowContactKitchen2, windowContactKitchen3, windowContactKitchen4
]);
ecoLightForwarder.start();
thermostatKitchen.start();
thermostatKitchen.setPresetTemperature(20.0);
allLabeledItems.push(thermostatKitchen);
allThermostatItems.push(thermostatKitchen);
let thermostatKitchenCron = new Cron_1.Cron('thermostatKitchenCron', thermostatKitchen, [
{ cronTime: '00 00 06 * * 1-5', output: 'ON' },
{ cronTime: '00 00 08 * * 6,0', output: 'ON' },
{ cronTime: '00 00 10 * * 1-3', output: 'OFF' },
{ cronTime: '00 30 13 * * 1-3', output: 'ON' },
{ cronTime: '00 00 23 * * *', output: 'OFF' }
]);
thermostatKitchenCron.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'),
let windowContactFrontdoor = new MaxWindowContact_1.MaxWindowContact('Gnd', 'Flur', 'FrontdoorContact', 'Haustür', 23);
windowContactFrontdoor.start();
allLabeledItems.push(windowContactFrontdoor);
// ----------------------------------------------------------------------------------------------------------
let relayBox = new RelayBox_1.RelayBoxThing('base', 'labor', 'relaybox', 'IoT/Command/RelayBox', 'IoT/Status/RelayBox', [
"Küche", "Herd", "Waschküche"
]);
relayBox.start();
allLabeledItems.push(relayBox);
// ----------------------------------------------------------------------------------------------------------
let heatingSceneAll = new HeatingScene_1.HeatingScene('Gnd', 'House', 'Heatings', 'Alle Heizungen', allThermostatItems);
heatingSceneAll.start();
// ----------------------------------------------------------------------------------------------------------
// Basement
let workshopLight = new HomematicSwitchItem_1.HomematicSwitchItem('Base', 'Keller', 'Light', 'Werkstatt', 5);
workshopLight.start();
allLabeledItems.push(workshopLight);
allRelevantLights.push(workshopLight);
allLights.push(workshopLight);
let basementSmallLight = new HomematicSwitchItem_1.HomematicSwitchItem('Base', 'Keller', 'SmallLight', 'Licht einfach', 35, 1);
basementSmallLight.start();
allLabeledItems.push(basementSmallLight);
allRelevantLights.push(basementSmallLight);
allLights.push(basementSmallLight);
basementSmallLight.on('somethingChanged', () => {
if (basementSmallLight.getState() == 'ON') {
setTimeout(() => {
if (basementLargeLight.getState() == 'OFF') {
MqttDispatcher_1.mqttHandler.send(basementSmallLight.getStateTopic(), 'OFF');
}
}, (3 * 60 * 1000));
}
if ((basementLargeLight.getState() == 'ON') && (basementSmallLight.getState() == 'OFF')) {
MqttDispatcher_1.mqttHandler.send(basementLargeLight.getStateTopic(), 'OFF');
}
});
let basementLargeLight = new HomematicSwitchItem_1.HomematicSwitchItem('Base', 'Keller', 'LargeLight', 'Licht hell', 35, 2);
basementLargeLight.start();
allLabeledItems.push(basementLargeLight);
allRelevantLights.push(basementLargeLight);
allLights.push(basementLargeLight);
basementLargeLight.on('somethingChanged', () => {
if (basementLargeLight.getState() == 'ON') {
MqttDispatcher_1.mqttHandler.send(basementSmallLight.getStateTopic(), 'ON');
}
else if (basementLargeLight.getState() == 'OFF') {
MqttDispatcher_1.mqttHandler.send(basementSmallLight.getStateTopic(), 'OFF');
}
});
let basementForwarder = new Forwarder_1.Forwarder('Base', 'All', 'Forwarder', 'state', 'BasementForwarder', [
basementLargeLight.getStateTopic(),
basementSmallLight.getStateTopic(),
workshopLight.getStateTopic()
]);
basementForwarder.start();
let basementForwarderSwitchOffAdaptor = new SwitchOffAdaptor_1.SwitchOffAdaptor('Base', 'All', 'Forwarder');
basementForwarderSwitchOffAdaptor.start();
// ----------------------------------------------------------------------------------------------------------
let twoLedSignal1 = new TwoLedSignal_1.TwoLedSignal('Gnd', 'Flur', 'TwoLedSignal1', 'Licht- und Fenster-Anzeiger', allRelevantLights, "OFF", "ON", allWindows, "CLOSED", "OPEN");
twoLedSignal1.start();
// MySwitchTHing
let mySwitchThingWolfgang = new MySwitchThing_1.MySwitchThing('1st', 'Schlafzimmer', 'WolfgangsSwitch', [
new MySwitchThing_1.MySwitchSingleItem(bedRoomWolfgangBedLightDimmerAdaptor.getInTopic()),
new MySwitchThing_1.MySwitchSingleItem(basementForwarderSwitchOffAdaptor.getInTopic()),
new MySwitchThing_1.MySwitchSingleItem('IoT/InsLeere/2'),
]);
mySwitchThingWolfgang.start();
// ----------------------------------------------------------------------------------------------------------
let testFourButton = new HomematicFourButtonThing_1.HomematicFourButtonThing('Gnd', 'Flur', 'TestButton', 9, [
new HomematicFourButtonThing_1.HomematicFourButtonSingleItem('dispatcher_ng/items/Gnd/Flur/Testlight/dimmerIn'),
new HomematicFourButtonThing_1.HomematicFourButtonSingleItem('dispatcher_ng/items/Gnd/Flur/DeskLight/timerIn'),
new HomematicFourButtonThing_1.HomematicFourButtonSingleItem('test/button/3'),
new HomematicFourButtonThing_1.HomematicFourButtonSingleItem('test/button/4')
]);
testFourButton.start();
let testDimmerAdaptor = new DimmerAdaptor_1.DimmerAdaptor('Gnd', 'Hallway', 'Testlight');
let testDimmerAdaptor = new DimmerAdaptor_1.DimmerAdaptor('Gnd', 'Flur', 'Testlight');
testDimmerAdaptor.start();
let testTimerAdaptor = new TimerAdaptor_1.TimerAdaptor('Gnd', 'Hallway', 'DeskLight', 10);
let testTimerAdaptor = new TimerAdaptor_1.TimerAdaptor('Gnd', 'Flur', 'DeskLight', 10);
testTimerAdaptor.start();
let testLight = new HomematicDimmerItem_1.HomematicDimmerItem('Gnd', 'Hallway', 'Testlight', 'Testlampe mit Dimmer', 8);
let testLight = new HomematicDimmerItem_1.HomematicDimmerItem('Gnd', 'Flur', 'Testlight', 'Testlampe mit Dimmer', 8);
testLight.start();
let testLight2 = new HomematicSwitchItem_1.HomematicSwitchItem('Gnd', 'Hallway', 'Testlight2', 'Testlampe ohne Dimmer', 5);
testLight2.start();
let testForwarder = new Forwarder_1.Forwarder('Gnd', 'Hallway', 'TestForwarder', 'state', 'TestForwarder', [
'dispatcher_ng/items/Gnd/Hallway/Testlight2/state',
'dispatcher_ng/items/Gnd/Hallway/DeskLight/state'
let testForwarder = new Forwarder_1.Forwarder('Gnd', 'Flur', 'TestForwarder', 'state', 'TestForwarder', [
'dispatcher_ng/items/Gnd/Flur/Testlight2/state',
'dispatcher_ng/items/Gnd/Flur/DeskLight/state'
]);
testForwarder.start();
let testScene = new Scene_1.LightScene('Gnd', 'Flur', 'TestScene', 'TestScene', [aquariumLight, annaBedLight], [matthiasStandLights, matthiasBedLight]);
testScene.start();
// ----------------------------------------------------------------------------------------------------------
// Homekit export
let homekitObject = {};
let openhabList = [];
allLabeledItems.forEach((item) => {
let exportData = item.exportItem();
if (exportData != null) {
if ('id' in exportData['homekit']) {
homekitObject[exportData['homekit']['id']] = exportData['homekit']['object'];
}
openhabList.push(exportData['openhab']);
let dayLightScene = new Scene_1.LightScene('Gnd', 'Szenen', 'DayLight', 'DayLight', [
kitchenWindowLight, kitchenCeilingLight, hallwayDeskLight, hallwayStandLight, hallwayWardrobeLight,
diningRoomSmallLight, diningRoomStandLight, diningRoomCupboardLight, diningRoomShelfLight,
livingRoomLargeLight, livingRoomSmallLight, livingRoomStars, livingRoomStandLight, diningRoomNaehkaestchenLight
], []);
dayLightScene.start();
allLabeledItems.push(dayLightScene);
allLightScenes.push(dayLightScene);
let ecoLightScene = new Scene_1.LightScene('Gnd', 'Szenen', 'EcoLight', 'EcoLight', [
kitchenWindowLight, hallwayDeskLight, hallwayWardrobeLight,
diningRoomSmallLight, diningRoomStandLight, diningRoomCupboardLight, diningRoomShelfLight,
livingRoomStars, livingRoomStandLight, diningRoomNaehkaestchenLight
], [
kitchenCeilingLight, hallwayStandLight,
livingRoomLargeLight, livingRoomSmallLight
]);
ecoLightScene.start();
allLabeledItems.push(ecoLightScene);
allLightScenes.push(ecoLightScene);
let ecoSwitch = new MaxEcoSwitch_1.MaxEcoSwitch('Gnd', 'Szenen', 'EcoSwitch', 'EcoSwitch', 6, dayLightScene, ecoLightScene);
ecoSwitch.start();
let morningLightScene = new Scene_1.LightScene('Gnd', 'Szenen', 'MorningLight', 'MorningLight', [
kitchenWindowLight, kitchenCeilingLight, hallwayDeskLight, hallwayWardrobeLight,
hallwayStandLight
], [
diningRoomSmallLight, diningRoomStandLight, diningRoomCupboardLight, diningRoomShelfLight,
livingRoomStars, livingRoomStandLight, livingRoomLargeLight, livingRoomSmallLight, diningRoomNaehkaestchenLight
]);
morningLightScene.start();
allLabeledItems.push(morningLightScene);
allLightScenes.push(morningLightScene);
let sceneOfAllLights = new Scene_1.LightScene('Gnd', 'Szenen', 'AllLights', 'Alle Lampen', allLights, []);
sceneOfAllLights.start();
allLightScenes.push(sceneOfAllLights);
// ----------------------------------------------------------------------------------------------------------
// heartbeat
let heartbeatCounter = 0;
let heartbeatTimer = setInterval(() => {
heartbeatCounter += 1;
MqttDispatcher_1.mqttHandler.send(config.dict.heartbeatTopic, `${heartbeatCounter}`);
}, config.dict.heartbeatInterval);
// watchdog
let watchdogCounter = 0;
let watchdogTimer = setInterval(() => {
watchdogCounter += 1;
MqttDispatcher_1.mqttHandler.send(config.dict.watchdogTopic, `${config.dict.watchdogMessage} ${watchdogCounter}`);
}, config.dict.watchdogInterval);
// ----------------------------------------------------------------------------------------------------------
let roomSwitches = {};
allLights.forEach((item) => {
let switchItem = { 'label': item.getLabel(), 'actionTopic': item.getStateTopic(), 'feedbackTopic': item.getStateFeedbackTopic() };
if (item.getRoom() in roomSwitches) {
roomSwitches[item.getRoom()].push(switchItem);
}
else {
roomSwitches[item.getRoom()] = [switchItem];
}
});
fs.writeFileSync(config.dict.homekitFile, JSON.stringify(homekitObject, null, 4));
fs.writeFileSync(config.dict.openhabItemFile, openhabList.join('\n'));
let smartClientConfiguration = {};
smartClientConfiguration['switches'] = [];
for (let key in roomSwitches) {
let item = { 'room': key, 'switches': roomSwitches[key] };
smartClientConfiguration['switches'].push(item);
}
smartClientConfiguration['scenes'] = [];
allLightScenes.forEach((scene) => {
let item = { 'label': scene.getLabel(), 'actionTopic': scene.getStateTopic() };
smartClientConfiguration['scenes'].push(item);
});
smartClientConfiguration['windows'] = [];
allWindows.forEach((window) => {
let item = { 'label': window.getLabel(), 'topic': window.getStateFeedbackTopic() };
smartClientConfiguration['windows'].push(item);
});
fs.writeFileSync('smartclient.json', JSON.stringify(smartClientConfiguration, null, 4));
// ----------------------------------------------------------------------------------------------------------
MqttDispatcher_1.mqttHandler.exec();
logger.info("Dispatcher running");
MqttDispatcher_1.mqttHandler.send('smartclient/configuration', JSON.stringify(smartClientConfiguration, null, 4));
//# sourceMappingURL=main.js.map

View File

@ -1,7 +1,7 @@
{
"1st.Anna.AquariumLight": {
"id": "1st.Anna.AquariumLight",
"name": "Aquariumlicht",
"1st_Anna_AquariumLight": {
"id": "1st_Anna_AquariumLight",
"name": "Aquarium",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/1st/Anna/AquariumLight/state",
@ -16,9 +16,9 @@
},
"config": {}
},
"1st.Anna.BedLight": {
"id": "1st.Anna.BedLight",
"name": "Bettlicht Anna",
"1st_Anna_BedLight": {
"id": "1st_Anna_BedLight",
"name": "Bettlicht",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/1st/Anna/BedLight/state",
@ -33,13 +33,35 @@
},
"config": {}
},
"1st.Matthias.Stehlampen Matthias": {
"id": "1st.Matthias.Stehlampen Matthias",
"name": "StandLight",
"1st_Anna_WindowContact": {
"id": "1st_Anna_WindowContact",
"name": "Anna",
"service": "ContactSensor",
"topic": {
"statusContactSensorState": "dispatcher_ng/items/1st/Anna/WindowContact/state/feedback"
},
"payload": {
"onContactDetected": "CLOSED"
}
},
"1st_Anna_Thermostat": {
"id": "1st_Anna_Thermostat",
"name": "Thermostat Anna",
"service": "Thermostat",
"topic": {
"setTargetTemperature": "dispatcher_ng/items/1st/Anna/Thermostat/temperature",
"statusTargetTemperature": "dispatcher_ng/items/1st/Anna/Thermostat/temperature/feedback",
"statusCurrentTemperature": "dispatcher_ng/items/1st/Anna/Thermostat/temperature/feedback"
},
"payload": {}
},
"1st_Matthias_StandLight": {
"id": "1st_Matthias_StandLight",
"name": "Stehlampen",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/1st/Matthias/Stehlampen Matthias/state",
"statusOn": "dispatcher_ng/items/1st/Matthias/Stehlampen Matthias/state/feedback"
"setOn": "dispatcher_ng/items/1st/Matthias/StandLight/state",
"statusOn": "dispatcher_ng/items/1st/Matthias/StandLight/state/feedback"
},
"payload": {
"onTrue": "ON",
@ -50,9 +72,9 @@
},
"config": {}
},
"1st.Matthias.BedLight": {
"id": "1st.Matthias.BedLight",
"name": "Bettlicht Matthias",
"1st_Matthias_BedLight": {
"id": "1st_Matthias_BedLight",
"name": "Bettlicht",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/1st/Matthias/BedLight/state",
@ -67,9 +89,9 @@
},
"config": {}
},
"1st.Matthias.Speaker": {
"id": "1st.Matthias.Speaker",
"name": "Lautsprecher Matthias",
"1st_Matthias_Speaker": {
"id": "1st_Matthias_Speaker",
"name": "Lautsprecher",
"service": "Outlet",
"topic": {
"setOn": "dispatcher_ng/items/1st/Matthias/Speaker/state",
@ -81,13 +103,24 @@
},
"config": {}
},
"Gnd.DiningRoom.SmallLight": {
"id": "Gnd.DiningRoom.SmallLight",
"name": "kleine Lampe Esszimmer",
"1st_Matthias_WindowContact": {
"id": "1st_Matthias_WindowContact",
"name": "Matthias",
"service": "ContactSensor",
"topic": {
"statusContactSensorState": "dispatcher_ng/items/1st/Matthias/WindowContact/state/feedback"
},
"payload": {
"onContactDetected": "CLOSED"
}
},
"Gnd_Esszimmer_SmallLight": {
"id": "Gnd_Esszimmer_SmallLight",
"name": "kleine Lampe",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/Gnd/DiningRoom/SmallLight/state",
"statusOn": "dispatcher_ng/items/Gnd/DiningRoom/SmallLight/state/feedback"
"setOn": "dispatcher_ng/items/Gnd/Esszimmer/SmallLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Esszimmer/SmallLight/state/feedback"
},
"payload": {
"onTrue": "ON",
@ -98,13 +131,13 @@
},
"config": {}
},
"Gnd.DiningRoom.StandLight": {
"id": "Gnd.DiningRoom.StandLight",
"name": "Stehlampe Esszimmer",
"Gnd_Esszimmer_StandLight": {
"id": "Gnd_Esszimmer_StandLight",
"name": "Stehlampe",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/Gnd/DiningRoom/StandLight/state",
"statusOn": "dispatcher_ng/items/Gnd/DiningRoom/StandLight/state/feedback"
"setOn": "dispatcher_ng/items/Gnd/Esszimmer/StandLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Esszimmer/StandLight/state/feedback"
},
"payload": {
"onTrue": "ON",
@ -115,13 +148,13 @@
},
"config": {}
},
"Gnd.DiningRoom.CupboardLight": {
"id": "Gnd.DiningRoom.CupboardLight",
"name": "Schranklicht Esszimmer",
"Gnd_Esszimmer_CupboardLight": {
"id": "Gnd_Esszimmer_CupboardLight",
"name": "Schranklicht",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/Gnd/DiningRoom/CupboardLight/state",
"statusOn": "dispatcher_ng/items/Gnd/DiningRoom/CupboardLight/state/feedback"
"setOn": "dispatcher_ng/items/Gnd/Esszimmer/CupboardLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Esszimmer/CupboardLight/state/feedback"
},
"payload": {
"onTrue": "ON",
@ -132,13 +165,72 @@
},
"config": {}
},
"Gnd.LivingRoom.LargeLight": {
"id": "Gnd.LivingRoom.LargeLight",
"name": "große Lampe Wohnzimmer",
"Gnd_Esszimmer_NaehkaestchenLight": {
"id": "Gnd_Esszimmer_NaehkaestchenLight",
"name": "Nähkästchen",
"service": "Lightbulb",
"manufacturer": "hue2mqtt - Hue",
"model": "color light",
"topic": {
"setOn": "dispatcher_ng/items/Gnd/Esszimmer/NaehkaestchenLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Esszimmer/NaehkaestchenLight/state/feedback",
"setBrightness": "dispatcher_ng/items/Gnd/Esszimmer/NaehkaestchenLight/bright",
"statusBrightness": "dispatcher_ng/items/Gnd/Esszimmer/NaehkaestchenLight/bright/feedback",
"setHue": "dispatcher_ng/items/Gnd/Esszimmer/NaehkaestchenLight/hue",
"statusHue": "dispatcher_ng/items/Gnd/Esszimmer/NaehkaestchenLight/bright/hue",
"setSaturation": "dispatcher_ng/items/Gnd/Esszimmer/NaehkaestchenLight/saturation",
"statusSaturation": "dispatcher_ng/items/Gnd/Esszimmer/NaehkaestchenLight/bright/saturation",
"setColorTemperature": "dispatcher_ng/items/Gnd/Esszimmer/NaehkaestchenLight/colorTemperature",
"statusColorTemperature": "dispatcher_ng/items/Gnd/Esszimmer/NaehkaestchenLight/colorTemperature/feedback"
},
"payload": {
"onTrue": "ON",
"onFalse": "OFF",
"brightnessFactor": 1,
"hueFactor": 1,
"saturationFactor": 1
}
},
"Gnd_Esszimmer_WindowContact1": {
"id": "Gnd_Esszimmer_WindowContact1",
"name": "Essz. links",
"service": "ContactSensor",
"topic": {
"statusContactSensorState": "dispatcher_ng/items/Gnd/Esszimmer/WindowContact1/state/feedback"
},
"payload": {
"onContactDetected": "CLOSED"
}
},
"Gnd_Esszimmer_WindowContact2": {
"id": "Gnd_Esszimmer_WindowContact2",
"name": "Essz. rechts",
"service": "ContactSensor",
"topic": {
"statusContactSensorState": "dispatcher_ng/items/Gnd/Esszimmer/WindowContact2/state/feedback"
},
"payload": {
"onContactDetected": "CLOSED"
}
},
"Gnd_Esszimmer_Thermostat": {
"id": "Gnd_Esszimmer_Thermostat",
"name": "Thermostat Esszimmer",
"service": "Thermostat",
"topic": {
"setTargetTemperature": "dispatcher_ng/items/Gnd/Esszimmer/Thermostat/temperature",
"statusTargetTemperature": "dispatcher_ng/items/Gnd/Esszimmer/Thermostat/temperature/feedback",
"statusCurrentTemperature": "dispatcher_ng/items/Gnd/Esszimmer/Thermostat/temperature/feedback"
},
"payload": {}
},
"Gnd_Wohnzimmer_LargeLight": {
"id": "Gnd_Wohnzimmer_LargeLight",
"name": "große Lampe",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/Gnd/LivingRoom/LargeLight/state",
"statusOn": "dispatcher_ng/items/Gnd/LivingRoom/LargeLight/state/feedback"
"setOn": "dispatcher_ng/items/Gnd/Wohnzimmer/LargeLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Wohnzimmer/LargeLight/state/feedback"
},
"payload": {
"onTrue": "ON",
@ -149,13 +241,13 @@
},
"config": {}
},
"Gnd.LivingRoom.SmallLight": {
"id": "Gnd.LivingRoom.SmallLight",
"name": "kleine Lampe Wohnzimmer",
"Gnd_Wohnzimmer_SmallLight": {
"id": "Gnd_Wohnzimmer_SmallLight",
"name": "kleine Lampe",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/Gnd/LivingRoom/SmallLight/state",
"statusOn": "dispatcher_ng/items/Gnd/LivingRoom/SmallLight/state/feedback"
"setOn": "dispatcher_ng/items/Gnd/Wohnzimmer/SmallLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Wohnzimmer/SmallLight/state/feedback"
},
"payload": {
"onTrue": "ON",
@ -166,13 +258,13 @@
},
"config": {}
},
"Gnd.LivingRoom.Stars": {
"id": "Gnd.LivingRoom.Stars",
"name": "Sterne Wohnzimmer",
"Gnd_Wohnzimmer_Stars": {
"id": "Gnd_Wohnzimmer_Stars",
"name": "Sterne",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/Gnd/LivingRoom/Stars/state",
"statusOn": "dispatcher_ng/items/Gnd/LivingRoom/Stars/state/feedback"
"setOn": "dispatcher_ng/items/Gnd/Wohnzimmer/Stars/state",
"statusOn": "dispatcher_ng/items/Gnd/Wohnzimmer/Stars/state/feedback"
},
"payload": {
"onTrue": "ON",
@ -183,13 +275,13 @@
},
"config": {}
},
"Gnd.LivingRoom.StandLight": {
"id": "Gnd.LivingRoom.StandLight",
"name": "Stehlampe Wohnzimmer",
"Gnd_Wohnzimmer_StandLight": {
"id": "Gnd_Wohnzimmer_StandLight",
"name": "Stehlampe",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/Gnd/LivingRoom/StandLight/state",
"statusOn": "dispatcher_ng/items/Gnd/LivingRoom/StandLight/state/feedback"
"setOn": "dispatcher_ng/items/Gnd/Wohnzimmer/StandLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Wohnzimmer/StandLight/state/feedback"
},
"payload": {
"onTrue": "ON",
@ -200,13 +292,46 @@
},
"config": {}
},
"Gnd.Hallway.DeskLight": {
"id": "Gnd.Hallway.DeskLight",
"name": "Schreibtischlampe Flur",
"Gnd_Wohnzimmer_WindowContact1": {
"id": "Gnd_Wohnzimmer_WindowContact1",
"name": "Wohnz. rechts",
"service": "ContactSensor",
"topic": {
"statusContactSensorState": "dispatcher_ng/items/Gnd/Wohnzimmer/WindowContact1/state/feedback"
},
"payload": {
"onContactDetected": "CLOSED"
}
},
"Gnd_Wohnzimmer_WindowContact2": {
"id": "Gnd_Wohnzimmer_WindowContact2",
"name": "Wohnz. links",
"service": "ContactSensor",
"topic": {
"statusContactSensorState": "dispatcher_ng/items/Gnd/Wohnzimmer/WindowContact2/state/feedback"
},
"payload": {
"onContactDetected": "CLOSED"
}
},
"Gnd_Wohnzimmer_Thermostat": {
"id": "Gnd_Wohnzimmer_Thermostat",
"name": "Thermostat Wohnzimmer",
"service": "Thermostat",
"topic": {
"setTargetTemperature": "dispatcher_ng/items/Gnd/Wohnzimmer/Thermostat/temperature",
"statusTargetTemperature": "dispatcher_ng/items/Gnd/Wohnzimmer/Thermostat/temperature/feedback",
"statusCurrentTemperature": "dispatcher_ng/items/Gnd/Wohnzimmer/Thermostat/temperature/feedback"
},
"payload": {}
},
"Gnd_Flur_DeskLight": {
"id": "Gnd_Flur_DeskLight",
"name": "Schreibtischlampe",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/Gnd/Hallway/DeskLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Hallway/DeskLight/state/feedback"
"setOn": "dispatcher_ng/items/Gnd/Flur/DeskLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Flur/DeskLight/state/feedback"
},
"payload": {
"onTrue": "ON",
@ -217,13 +342,13 @@
},
"config": {}
},
"Gnd.Hallway.StandLight": {
"id": "Gnd.Hallway.StandLight",
"name": "Stehlampe Flur",
"Gnd_Flur_StandLight": {
"id": "Gnd_Flur_StandLight",
"name": "Stehlampe",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/Gnd/Hallway/StandLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Hallway/StandLight/state/feedback"
"setOn": "dispatcher_ng/items/Gnd/Flur/StandLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Flur/StandLight/state/feedback"
},
"payload": {
"onTrue": "ON",
@ -234,13 +359,13 @@
},
"config": {}
},
"Gnd.Hallway.WardrobeLight": {
"id": "Gnd.Hallway.WardrobeLight",
"name": "Schranklicht Flur",
"Gnd_Flur_WardrobeLight": {
"id": "Gnd_Flur_WardrobeLight",
"name": "Schranklicht",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/Gnd/Hallway/WardrobeLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Hallway/WardrobeLight/state/feedback"
"setOn": "dispatcher_ng/items/Gnd/Flur/WardrobeLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Flur/WardrobeLight/state/feedback"
},
"payload": {
"onTrue": "ON",
@ -251,13 +376,46 @@
},
"config": {}
},
"Gnd.Kitchen.WindowLight": {
"id": "Gnd.Kitchen.WindowLight",
"name": "Fensterbanklicht Küche",
"Gnd_Flur_WindowContact": {
"id": "Gnd_Flur_WindowContact",
"name": "Flur",
"service": "ContactSensor",
"topic": {
"statusContactSensorState": "dispatcher_ng/items/Gnd/Flur/WindowContact/state/feedback"
},
"payload": {
"onContactDetected": "CLOSED"
}
},
"Gnd_Flur_Thermostat1": {
"id": "Gnd_Flur_Thermostat1",
"name": "Thermostat Flur vorne",
"service": "Thermostat",
"topic": {
"setTargetTemperature": "dispatcher_ng/items/Gnd/Flur/Thermostat1/temperature",
"statusTargetTemperature": "dispatcher_ng/items/Gnd/Flur/Thermostat1/temperature/feedback",
"statusCurrentTemperature": "dispatcher_ng/items/Gnd/Flur/Thermostat1/temperature/feedback"
},
"payload": {}
},
"Gnd_Flur_Thermostat2": {
"id": "Gnd_Flur_Thermostat2",
"name": "Thermostat Flur hinten",
"service": "Thermostat",
"topic": {
"setTargetTemperature": "dispatcher_ng/items/Gnd/Flur/Thermostat2/temperature",
"statusTargetTemperature": "dispatcher_ng/items/Gnd/Flur/Thermostat2/temperature/feedback",
"statusCurrentTemperature": "dispatcher_ng/items/Gnd/Flur/Thermostat2/temperature/feedback"
},
"payload": {}
},
"Gnd_Kueche_WindowLight": {
"id": "Gnd_Kueche_WindowLight",
"name": "Fensterbanklicht",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/Gnd/Kitchen/WindowLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Kitchen/WindowLight/state/feedback"
"setOn": "dispatcher_ng/items/Gnd/Kueche/WindowLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Kueche/WindowLight/state/feedback"
},
"payload": {
"onTrue": "ON",
@ -268,13 +426,13 @@
},
"config": {}
},
"Gnd.Kitchen.CeilingLight": {
"id": "Gnd.Kitchen.CeilingLight",
"name": "Deckenlampe Küche",
"Gnd_Kueche_CeilingLight": {
"id": "Gnd_Kueche_CeilingLight",
"name": "Deckenlampe",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/Gnd/Kitchen/CeilingLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Kitchen/CeilingLight/state/feedback"
"setOn": "dispatcher_ng/items/Gnd/Kueche/CeilingLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Kueche/CeilingLight/state/feedback"
},
"payload": {
"onTrue": "ON",
@ -285,13 +443,13 @@
},
"config": {}
},
"1st.BedRoom.WolfgangsSide": {
"id": "1st.BedRoom.WolfgangsSide",
"name": "Wolfgangs Seite Schlafzimmer",
"1st_Schlafzimmer_WolfgangsSide": {
"id": "1st_Schlafzimmer_WolfgangsSide",
"name": "Wolfgangs Seite",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/1st/BedRoom/WolfgangsSide/state",
"statusOn": "dispatcher_ng/items/1st/BedRoom/WolfgangsSide/state/feedback"
"setOn": "dispatcher_ng/items/1st/Schlafzimmer/WolfgangsSide/state",
"statusOn": "dispatcher_ng/items/1st/Schlafzimmer/WolfgangsSide/state/feedback"
},
"payload": {
"onTrue": "ON",
@ -302,13 +460,39 @@
},
"config": {}
},
"1st.BedRoom.PattysSide": {
"id": "1st.BedRoom.PattysSide",
"name": "Pattys Seite Schlafzimmer",
"1st_Schlafzimmer_WolfgangBedLight": {
"id": "1st_Schlafzimmer_WolfgangBedLight",
"name": "Wolfgangs Bettlicht",
"service": "Lightbulb",
"manufacturer": "hue2mqtt - Hue",
"model": "color light",
"topic": {
"setOn": "dispatcher_ng/items/1st/Schlafzimmer/WolfgangBedLight/state",
"statusOn": "dispatcher_ng/items/1st/Schlafzimmer/WolfgangBedLight/state/feedback",
"setBrightness": "dispatcher_ng/items/1st/Schlafzimmer/WolfgangBedLight/bright",
"statusBrightness": "dispatcher_ng/items/1st/Schlafzimmer/WolfgangBedLight/bright/feedback",
"setHue": "dispatcher_ng/items/1st/Schlafzimmer/WolfgangBedLight/hue",
"statusHue": "dispatcher_ng/items/1st/Schlafzimmer/WolfgangBedLight/bright/hue",
"setSaturation": "dispatcher_ng/items/1st/Schlafzimmer/WolfgangBedLight/saturation",
"statusSaturation": "dispatcher_ng/items/1st/Schlafzimmer/WolfgangBedLight/bright/saturation",
"setColorTemperature": "dispatcher_ng/items/1st/Schlafzimmer/WolfgangBedLight/colorTemperature",
"statusColorTemperature": "dispatcher_ng/items/1st/Schlafzimmer/WolfgangBedLight/colorTemperature/feedback"
},
"payload": {
"onTrue": "ON",
"onFalse": "OFF",
"brightnessFactor": 1,
"hueFactor": 1,
"saturationFactor": 1
}
},
"1st_Schlafzimmer_PattysSide": {
"id": "1st_Schlafzimmer_PattysSide",
"name": "Pattys Seite",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/1st/BedRoom/PattysSide/state",
"statusOn": "dispatcher_ng/items/1st/BedRoom/PattysSide/state/feedback"
"setOn": "dispatcher_ng/items/1st/Schlafzimmer/PattysSide/state",
"statusOn": "dispatcher_ng/items/1st/Schlafzimmer/PattysSide/state/feedback"
},
"payload": {
"onTrue": "ON",
@ -319,13 +503,270 @@
},
"config": {}
},
"1st.BedRoom.WindowLight": {
"id": "1st.BedRoom.WindowLight",
"name": "Fensterbanklicht Schlafzimmer",
"1st_Schlafzimmer_WindowLight": {
"id": "1st_Schlafzimmer_WindowLight",
"name": "Fensterbanklicht",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/1st/BedRoom/WindowLight/state",
"statusOn": "dispatcher_ng/items/1st/BedRoom/WindowLight/state/feedback"
"setOn": "dispatcher_ng/items/1st/Schlafzimmer/WindowLight/state",
"statusOn": "dispatcher_ng/items/1st/Schlafzimmer/WindowLight/state/feedback"
},
"payload": {
"onTrue": "ON",
"onFalse": "OFF",
"brightnessFactor": "",
"hueFactor": "",
"saturationFactor": ""
},
"config": {}
},
"1st_Bedroom_WindowContactStreet": {
"id": "1st_Bedroom_WindowContactStreet",
"name": "Schlafz. Strasse",
"service": "ContactSensor",
"topic": {
"statusContactSensorState": "dispatcher_ng/items/1st/Bedroom/WindowContactStreet/state/feedback"
},
"payload": {
"onContactDetected": "CLOSED"
}
},
"1st_Bedroom_WindowContact1Garden": {
"id": "1st_Bedroom_WindowContact1Garden",
"name": "Schlafz. Garten 1",
"service": "ContactSensor",
"topic": {
"statusContactSensorState": "dispatcher_ng/items/1st/Bedroom/WindowContact1Garden/state/feedback"
},
"payload": {
"onContactDetected": "CLOSED"
}
},
"1st_Bedroom_WindowContact2Garden": {
"id": "1st_Bedroom_WindowContact2Garden",
"name": "Schlafz. Garten 2",
"service": "ContactSensor",
"topic": {
"statusContactSensorState": "dispatcher_ng/items/1st/Bedroom/WindowContact2Garden/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_Bathroom_WindowContact": {
"id": "Gnd_Bathroom_WindowContact",
"name": "Bad unten",
"service": "ContactSensor",
"topic": {
"statusContactSensorState": "dispatcher_ng/items/Gnd/Bathroom/WindowContact/state/feedback"
},
"payload": {
"onContactDetected": "CLOSED"
}
},
"Gnd_Bathroom_Thermostat": {
"id": "Gnd_Bathroom_Thermostat",
"name": "Thermostat Bad unten",
"service": "Thermostat",
"topic": {
"setTargetTemperature": "dispatcher_ng/items/Gnd/Bathroom/Thermostat/temperature",
"statusTargetTemperature": "dispatcher_ng/items/Gnd/Bathroom/Thermostat/temperature/feedback",
"statusCurrentTemperature": "dispatcher_ng/items/Gnd/Bathroom/Thermostat/temperature/feedback"
},
"payload": {}
},
"1st_Bathroom_WindowContact": {
"id": "1st_Bathroom_WindowContact",
"name": "Bad oben",
"service": "ContactSensor",
"topic": {
"statusContactSensorState": "dispatcher_ng/items/1st/Bathroom/WindowContact/state/feedback"
},
"payload": {
"onContactDetected": "CLOSED"
}
},
"1st_Bathroom_Thermostat": {
"id": "1st_Bathroom_Thermostat",
"name": "Thermostat Bad oben",
"service": "Thermostat",
"topic": {
"setTargetTemperature": "dispatcher_ng/items/1st/Bathroom/Thermostat/temperature",
"statusTargetTemperature": "dispatcher_ng/items/1st/Bathroom/Thermostat/temperature/feedback",
"statusCurrentTemperature": "dispatcher_ng/items/1st/Bathroom/Thermostat/temperature/feedback"
},
"payload": {}
},
"Gnd_Kueche_WindowContact1": {
"id": "Gnd_Kueche_WindowContact1",
"name": "Küche Garten",
"service": "ContactSensor",
"topic": {
"statusContactSensorState": "dispatcher_ng/items/Gnd/Kueche/WindowContact1/state/feedback"
},
"payload": {
"onContactDetected": "CLOSED"
}
},
"Gnd_Kueche_WindowContact2": {
"id": "Gnd_Kueche_WindowContact2",
"name": "Küche Terassentür",
"service": "ContactSensor",
"topic": {
"statusContactSensorState": "dispatcher_ng/items/Gnd/Kueche/WindowContact2/state/feedback"
},
"payload": {
"onContactDetected": "CLOSED"
}
},
"Gnd_Kueche_WindowContact3": {
"id": "Gnd_Kueche_WindowContact3",
"name": "Küche Straße 1",
"service": "ContactSensor",
"topic": {
"statusContactSensorState": "dispatcher_ng/items/Gnd/Kueche/WindowContact3/state/feedback"
},
"payload": {
"onContactDetected": "CLOSED"
}
},
"Gnd_Kueche_WindowContact4": {
"id": "Gnd_Kueche_WindowContact4",
"name": "Küche Straße 2",
"service": "ContactSensor",
"topic": {
"statusContactSensorState": "dispatcher_ng/items/Gnd/Kueche/WindowContact4/state/feedback"
},
"payload": {
"onContactDetected": "CLOSED"
}
},
"Gnd_Kueche_Thermostat": {
"id": "Gnd_Kueche_Thermostat",
"name": "Thermostat Küche",
"service": "Thermostat",
"topic": {
"setTargetTemperature": "dispatcher_ng/items/Gnd/Kueche/Thermostat/temperature",
"statusTargetTemperature": "dispatcher_ng/items/Gnd/Kueche/Thermostat/temperature/feedback",
"statusCurrentTemperature": "dispatcher_ng/items/Gnd/Kueche/Thermostat/temperature/feedback"
},
"payload": {}
},
"Gnd_Flur_FrontdoorContact": {
"id": "Gnd_Flur_FrontdoorContact",
"name": "Haustür",
"service": "ContactSensor",
"topic": {
"statusContactSensorState": "dispatcher_ng/items/Gnd/Flur/FrontdoorContact/state/feedback"
},
"payload": {
"onContactDetected": "CLOSED"
}
},
"": {},
"Base_Keller_Light": {
"id": "Base_Keller_Light",
"name": "Werkstatt",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/Base/Keller/Light/state",
"statusOn": "dispatcher_ng/items/Base/Keller/Light/state/feedback"
},
"payload": {
"onTrue": "ON",
"onFalse": "OFF",
"brightnessFactor": "",
"hueFactor": "",
"saturationFactor": ""
},
"config": {}
},
"Base_Keller_SmallLight": {
"id": "Base_Keller_SmallLight",
"name": "Licht einfach",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/Base/Keller/SmallLight/state",
"statusOn": "dispatcher_ng/items/Base/Keller/SmallLight/state/feedback"
},
"payload": {
"onTrue": "ON",
"onFalse": "OFF",
"brightnessFactor": "",
"hueFactor": "",
"saturationFactor": ""
},
"config": {}
},
"Base_Keller_LargeLight": {
"id": "Base_Keller_LargeLight",
"name": "Licht hell",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/Base/Keller/LargeLight/state",
"statusOn": "dispatcher_ng/items/Base/Keller/LargeLight/state/feedback"
},
"payload": {
"onTrue": "ON",
"onFalse": "OFF",
"brightnessFactor": "",
"hueFactor": "",
"saturationFactor": ""
},
"config": {}
},
"Gnd_Szenen_DayLight": {
"id": "Gnd_Szenen_DayLight",
"name": "DayLight",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/Gnd/Szenen/DayLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Szenen/DayLight/state/feedback"
},
"payload": {
"onTrue": "ON",
"onFalse": "OFF",
"brightnessFactor": "",
"hueFactor": "",
"saturationFactor": ""
},
"config": {}
},
"Gnd_Szenen_EcoLight": {
"id": "Gnd_Szenen_EcoLight",
"name": "EcoLight",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/Gnd/Szenen/EcoLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Szenen/EcoLight/state/feedback"
},
"payload": {
"onTrue": "ON",
"onFalse": "OFF",
"brightnessFactor": "",
"hueFactor": "",
"saturationFactor": ""
},
"config": {}
},
"Gnd_Szenen_MorningLight": {
"id": "Gnd_Szenen_MorningLight",
"name": "MorningLight",
"service": "Lightbulb",
"topic": {
"setOn": "dispatcher_ng/items/Gnd/Szenen/MorningLight/state",
"statusOn": "dispatcher_ng/items/Gnd/Szenen/MorningLight/state/feedback"
},
"payload": {
"onTrue": "ON",

780
log Normal file
View File

@ -0,0 +1,780 @@
> dispatcher_ng@1.0.0 start /home/wn/workspace-node/dispatcher_ng
> node dist/main.js "-c" "dispatcher_ng.conf"
18:06:05.642 [ II ] MqttHandler constructed
18:06:05.665 [ II ] Dispatcher starting
18:06:05.666 [ II ] Callback registered for dispatcher_ng/items/1st/Anna/AquariumLight/state
18:06:05.666 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Anna/AquariumLight/state, ON at 00 00 07 * * 1-5
18:06:05.672 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Anna/AquariumLight/state, ON at 00 00 09 * * 6,0
18:06:05.676 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Anna/AquariumLight/state, OFF at 00 00 13 * * *
18:06:05.679 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Anna/AquariumLight/state, ON at 00 00 14 * * *
18:06:05.680 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Anna/AquariumLight/state, OFF at 00 00 22 * * *
18:06:05.682 [ II ] Callback registered for dispatcher_ng/items/1st/Anna/BedLight/state
18:06:05.682 [ II ] Callback registered for dispatcher_ng/items/1st/Anna/WindowContact/state
18:06:05.682 [ II ] Callback registered for homegear/instance1/plain/20/1/STATE
18:06:05.682 [ II ] Callback registered for dispatcher_ng/items/1st/Anna/Thermostat/temperature
18:06:05.682 [ II ] Callback registered for dispatcher_ng/items/1st/Anna/Thermostat/presetTemperature
18:06:05.682 [ II ] Callback registered for homegear/instance1/plain/21/1/SET_TEMPERATURE
18:06:05.682 [ II ] Callback registered for dispatcher_ng/items/1st/Anna/Thermostat/command
18:06:05.683 [ II ] Callback registered for dispatcher_ng/items/heatingMainSwitch
18:06:05.683 [ II ] Callback registered for dispatcher_ng/items/1st/Anna/WindowContact/state/feedback
18:06:05.683 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Anna/Thermostat/command, ON at 00 05 06 * * *
18:06:05.684 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Anna/Thermostat/command, OFF at 00 05 08 * * 1-5
18:06:05.686 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Anna/Thermostat/command, ON at 00 05 16 * * 1
18:06:05.688 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Anna/Thermostat/command, ON at 00 05 14 * * 2
18:06:05.690 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Anna/Thermostat/command, ON at 00 05 14 * * 3
18:06:05.691 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Anna/Thermostat/command, ON at 00 05 16 * * 4
18:06:05.692 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Anna/Thermostat/command, ON at 00 05 14 * * 5
18:06:05.694 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Anna/Thermostat/command, OFF at 00 58 23 * * *
18:06:05.696 [ II ] Callback registered for dispatcher_ng/items/1st/Matthias/StandLight/state
18:06:05.696 [ II ] Callback registered for dispatcher_ng/items/1st/Matthias/BedLight/state
18:06:05.696 [ II ] Callback registered for dispatcher_ng/items/1st/Matthias/Speaker/state
18:06:05.696 [ II ] Callback registered for dispatcher_ng/items/1st/Matthias/WindowContact/state
18:06:05.696 [ II ] Callback registered for homegear/instance1/plain/24/1/STATE
18:06:05.696 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/SmallLight/state
18:06:05.696 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/StandLight/state
18:06:05.696 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/CupboardLight/state
18:06:05.697 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/ShelfLight/state
18:06:05.697 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/state
18:06:05.697 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/bright
18:06:05.697 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/colorTemperature
18:06:05.697 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/hue
18:06:05.697 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/saturation
18:06:05.697 [ II ] Callback registered for homegear/instance1/plain/15/1/STATE
18:06:05.697 [ II ] Callback registered for homegear/instance1/plain/15/1/FAST_BRIGHTNESS
18:06:05.697 [ II ] Callback registered for homegear/instance1/plain/15/1/COLOR_TEMPERATURE
18:06:05.697 [ II ] Callback registered for homegear/instance1/plain/15/1/HUE
18:06:05.697 [ II ] Callback registered for homegear/instance1/plain/15/1/SATURATION
18:06:05.697 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/WindowContact1/state
18:06:05.697 [ II ] Callback registered for homegear/instance1/plain/26/1/STATE
18:06:05.698 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/WindowContact2/state
18:06:05.698 [ II ] Callback registered for homegear/instance1/plain/27/1/STATE
18:06:05.698 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/Thermostat/temperature
18:06:05.698 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/Thermostat/presetTemperature
18:06:05.698 [ II ] Callback registered for homegear/instance1/plain/31/1/SET_TEMPERATURE
18:06:05.698 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/Thermostat/command
18:06:05.698 [ II ] Callback registered for dispatcher_ng/items/heatingMainSwitch
18:06:05.698 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/WindowContact1/state/feedback
18:06:05.698 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/WindowContact2/state/feedback
18:06:05.698 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/LargeLight/state
18:06:05.698 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/SmallLight/state
18:06:05.698 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/Stars/state
18:06:05.698 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/StandLight/state
18:06:05.698 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/WindowContact1/state
18:06:05.698 [ II ] Callback registered for homegear/instance1/plain/28/1/STATE
18:06:05.698 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/WindowContact2/state
18:06:05.698 [ II ] Callback registered for homegear/instance1/plain/29/1/STATE
18:06:05.698 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/Thermostat/temperature
18:06:05.698 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/Thermostat/presetTemperature
18:06:05.698 [ II ] Callback registered for homegear/instance1/plain/30/1/SET_TEMPERATURE
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/Thermostat/command
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/heatingMainSwitch
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/WindowContact1/state/feedback
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/WindowContact2/state/feedback
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/DeskLight/state
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/StandLight/state
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/WardrobeLight/state
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/WindowContact/state
18:06:05.699 [ II ] Callback registered for homegear/instance1/plain/25/1/STATE
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/Thermostat1/temperature
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/Thermostat1/presetTemperature
18:06:05.699 [ II ] Callback registered for homegear/instance1/plain/32/1/SET_TEMPERATURE
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/Thermostat1/command
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/heatingMainSwitch
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/Thermostat2/temperature
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/Thermostat2/presetTemperature
18:06:05.699 [ II ] Callback registered for homegear/instance1/plain/33/1/SET_TEMPERATURE
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/Thermostat2/command
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/heatingMainSwitch
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/WindowLight/state
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/CeilingLight/state
18:06:05.699 [ II ] Callback registered for dispatcher_ng/items/1st/BedRoom/WolfgangsSide/state
18:06:05.700 [ II ] Callback registered for dispatcher_ng/items/1st/BedRoom/WolfgangBedLight/state
18:06:05.700 [ II ] Callback registered for dispatcher_ng/items/1st/BedRoom/WolfgangBedLight/bright
18:06:05.700 [ II ] Callback registered for dispatcher_ng/items/1st/BedRoom/WolfgangBedLight/colorTemperature
18:06:05.700 [ II ] Callback registered for dispatcher_ng/items/1st/BedRoom/WolfgangBedLight/hue
18:06:05.700 [ II ] Callback registered for dispatcher_ng/items/1st/BedRoom/WolfgangBedLight/saturation
18:06:05.700 [ II ] Callback registered for homegear/instance1/plain/16/1/STATE
18:06:05.700 [ II ] Callback registered for homegear/instance1/plain/16/1/FAST_BRIGHTNESS
18:06:05.700 [ II ] Callback registered for homegear/instance1/plain/16/1/COLOR_TEMPERATURE
18:06:05.700 [ II ] Callback registered for homegear/instance1/plain/16/1/HUE
18:06:05.700 [ II ] Callback registered for homegear/instance1/plain/16/1/SATURATION
18:06:05.700 [ II ] Callback registered for dispatcher_ng/items/1st/BedRoom/WolfgangBedLight/dimmerIn
18:06:05.700 [ II ] Callback registered for IoT/TouchSwitch/1st/Bedroom/Wolfgang/#
18:06:05.700 [ II ] Callback registered for dispatcher_ng/items/1st/BedRoom/PattysSide/state
18:06:05.700 [ II ] Callback registered for dispatcher_ng/items/1st/BedRoom/WindowLight/state
18:06:05.701 [ II ] Callback registered for dispatcher_ng/items/1st/BedRoom/WolfgangsSwitch/#
18:06:05.701 [ II ] Callback registered for dispatcher_ng/items/1st/Bedroom/WindowContactStreet/state
18:06:05.701 [ II ] Callback registered for homegear/instance1/plain/17/1/STATE
18:06:05.701 [ II ] Callback registered for dispatcher_ng/items/1st/Bedroom/WindowContact1Garden/state
18:06:05.701 [ II ] Callback registered for homegear/instance1/plain/18/1/STATE
18:06:05.701 [ II ] Callback registered for dispatcher_ng/items/1st/Bedroom/WindowContact2Garden/state
18:06:05.701 [ II ] Callback registered for homegear/instance1/plain/22/1/STATE
18:06:05.701 [ II ] Callback registered for dispatcher_ng/items/1st/Bedroom/Thermostat/temperature
18:06:05.701 [ II ] Callback registered for dispatcher_ng/items/1st/Bedroom/Thermostat/presetTemperature
18:06:05.701 [ II ] Callback registered for homegear/instance1/plain/19/1/SET_TEMPERATURE
18:06:05.701 [ II ] Callback registered for dispatcher_ng/items/1st/Bedroom/Thermostat/command
18:06:05.701 [ II ] Callback registered for dispatcher_ng/items/heatingMainSwitch
18:06:05.701 [ II ] Callback registered for dispatcher_ng/items/1st/Bedroom/WindowContact1Garden/state/feedback
18:06:05.701 [ II ] Callback registered for dispatcher_ng/items/1st/Bedroom/WindowContact2Garden/state/feedback
18:06:05.701 [ II ] Callback registered for dispatcher_ng/items/1st/Bedroom/WindowContactStreet/state/feedback
18:06:05.701 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Bedroom/Thermostat/command, ON at 00 01 06 * * 1-5
18:06:05.703 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Bedroom/Thermostat/command, OFF at 00 01 09 * * 1-5
18:06:05.704 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Bedroom/Thermostat/command, ON at 00 01 08 * * 6,0
18:06:05.705 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Bedroom/Thermostat/command, OFF at 00 01 11 * * 6,0
18:06:05.706 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Bedroom/Thermostat/command, ON at 00 00 17 * * *
18:06:05.709 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Bedroom/Thermostat/command, OFF at 00 59 23 * * *
18:06:05.711 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/DayLight/state
18:06:05.712 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/WindowLight/state/feedback
18:06:05.712 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/CeilingLight/state/feedback
18:06:05.712 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/DeskLight/state/feedback
18:06:05.712 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/StandLight/state/feedback
18:06:05.712 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/WardrobeLight/state/feedback
18:06:05.712 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/SmallLight/state/feedback
18:06:05.712 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/StandLight/state/feedback
18:06:05.712 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/CupboardLight/state/feedback
18:06:05.712 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/ShelfLight/state/feedback
18:06:05.712 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/LargeLight/state/feedback
18:06:05.712 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/SmallLight/state/feedback
18:06:05.712 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/Stars/state/feedback
18:06:05.712 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/StandLight/state/feedback
18:06:05.712 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/state/feedback
18:06:05.712 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/EcoLight/state
18:06:05.712 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/WindowLight/state/feedback
18:06:05.713 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/DeskLight/state/feedback
18:06:05.713 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/WardrobeLight/state/feedback
18:06:05.713 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/SmallLight/state/feedback
18:06:05.713 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/StandLight/state/feedback
18:06:05.713 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/CupboardLight/state/feedback
18:06:05.713 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/ShelfLight/state/feedback
18:06:05.713 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/Stars/state/feedback
18:06:05.713 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/StandLight/state/feedback
18:06:05.713 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/state/feedback
18:06:05.713 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/CeilingLight/state/feedback
18:06:05.713 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/StandLight/state/feedback
18:06:05.713 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/LargeLight/state/feedback
18:06:05.713 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/SmallLight/state/feedback
18:06:05.713 [ II ] Callback registered for homegear/instance1/plain/6/1/PRESS
18:06:05.713 [ II ] Callback registered for homegear/instance1/plain/6/2/PRESS
18:06:05.713 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/MorningLight/state
18:06:05.713 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/WindowLight/state/feedback
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/CeilingLight/state/feedback
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/DeskLight/state/feedback
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/WardrobeLight/state/feedback
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/StandLight/state/feedback
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/SmallLight/state/feedback
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/StandLight/state/feedback
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/CupboardLight/state/feedback
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/ShelfLight/state/feedback
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/Stars/state/feedback
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/StandLight/state/feedback
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/LargeLight/state/feedback
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/SmallLight/state/feedback
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/state/feedback
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/Gnd/Bathroom/WindowContact/state
18:06:05.714 [ II ] Callback registered for homegear/instance1/plain/7/1/STATE
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/Gnd/Bathroom/Thermostat/temperature
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/Gnd/Bathroom/Thermostat/presetTemperature
18:06:05.714 [ II ] Callback registered for homegear/instance1/plain/4/1/SET_TEMPERATURE
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/Gnd/Bathroom/Thermostat/command
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/heatingMainSwitch
18:06:05.714 [ II ] Callback registered for dispatcher_ng/items/Gnd/Bathroom/WindowContact/state/feedback
18:06:05.715 [ II ] Starting cronjob for: dispatcher_ng/items/Gnd/Bathroom/Thermostat/command, ON at 00 02 06 * * 1-5
18:06:05.716 [ II ] Starting cronjob for: dispatcher_ng/items/Gnd/Bathroom/Thermostat/command, ON at 00 02 08 * * 6,0
18:06:05.717 [ II ] Starting cronjob for: dispatcher_ng/items/Gnd/Bathroom/Thermostat/command, OFF at 00 02 11 * * *
18:06:05.718 [ II ] Starting cronjob for: dispatcher_ng/items/Gnd/Bathroom/Thermostat/command, ON at 00 02 19 * * *
18:06:05.719 [ II ] Starting cronjob for: dispatcher_ng/items/Gnd/Bathroom/Thermostat/command, OFF at 00 00 23 * * *
18:06:05.720 [ II ] Callback registered for dispatcher_ng/items/1st/Bathroom/WindowContact/state
18:06:05.720 [ II ] Callback registered for homegear/instance1/plain/2/1/STATE
18:06:05.720 [ II ] Callback registered for dispatcher_ng/items/1st/Bathroom/Thermostat/temperature
18:06:05.720 [ II ] Callback registered for dispatcher_ng/items/1st/Bathroom/Thermostat/presetTemperature
18:06:05.720 [ II ] Callback registered for homegear/instance1/plain/3/1/SET_TEMPERATURE
18:06:05.720 [ II ] Callback registered for dispatcher_ng/items/1st/Bathroom/Thermostat/command
18:06:05.720 [ II ] Callback registered for dispatcher_ng/items/heatingMainSwitch
18:06:05.720 [ II ] Callback registered for dispatcher_ng/items/1st/Bathroom/WindowContact/state/feedback
18:06:05.720 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Bathroom/Thermostat/command, ON at 00 00 06 * * 1-5
18:06:05.721 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Bathroom/Thermostat/command, ON at 00 00 08 * * 6,0
18:06:05.722 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Bathroom/Thermostat/command, OFF at 00 00 11 * * *
18:06:05.724 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Bathroom/Thermostat/command, ON at 00 00 19 * * *
18:06:05.726 [ II ] Starting cronjob for: dispatcher_ng/items/1st/Bathroom/Thermostat/command, OFF at 00 00 23 * * *
18:06:05.728 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/WindowContact1/state
18:06:05.728 [ II ] Callback registered for homegear/instance1/plain/11/1/STATE
18:06:05.728 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/WindowContact2/state
18:06:05.728 [ II ] Callback registered for homegear/instance1/plain/10/1/STATE
18:06:05.728 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/WindowContact3/state
18:06:05.728 [ II ] Callback registered for homegear/instance1/plain/12/1/STATE
18:06:05.728 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/WindowContact4/state
18:06:05.728 [ II ] Callback registered for homegear/instance1/plain/13/1/STATE
18:06:05.728 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/Thermostat/temperature
18:06:05.728 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/Thermostat/presetTemperature
18:06:05.728 [ II ] Callback registered for homegear/instance1/plain/14/1/SET_TEMPERATURE
18:06:05.728 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/Thermostat/command
18:06:05.728 [ II ] Callback registered for dispatcher_ng/items/heatingMainSwitch
18:06:05.729 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/WindowContact1/state/feedback
18:06:05.729 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/WindowContact2/state/feedback
18:06:05.729 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/WindowContact3/state/feedback
18:06:05.729 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/WindowContact4/state/feedback
18:06:05.729 [ II ] Starting cronjob for: dispatcher_ng/items/Gnd/Kitchen/Thermostat/command, ON at 00 00 06 * * 1-5
18:06:05.730 [ II ] Starting cronjob for: dispatcher_ng/items/Gnd/Kitchen/Thermostat/command, ON at 00 00 08 * * 6,0
18:06:05.731 [ II ] Starting cronjob for: dispatcher_ng/items/Gnd/Kitchen/Thermostat/command, OFF at 00 00 10 * * 1-3
18:06:05.733 [ II ] Starting cronjob for: dispatcher_ng/items/Gnd/Kitchen/Thermostat/command, ON at 00 30 13 * * 1-3
18:06:05.735 [ II ] Starting cronjob for: dispatcher_ng/items/Gnd/Kitchen/Thermostat/command, OFF at 00 00 23 * * *
18:06:05.736 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/FrontdoorContact/state
18:06:05.736 [ II ] Callback registered for homegear/instance1/plain/23/1/STATE
18:06:05.736 [ II ] Callback registered for IoT/Status/RelayBox
18:06:05.736 [ II ] Callback registered for dispatcher_ng/items/base/labor/relaybox/state/#
18:06:05.737 [ II ] Callback registered for dispatcher_ng/items/Gnd/House/Heatings/command
18:06:05.737 [ II ] Callback registered for dispatcher_ng/items/1st/Anna/BedLight/state/feedback
18:06:05.737 [ II ] Callback registered for dispatcher_ng/items/1st/Matthias/StandLight/state/feedback
18:06:05.737 [ II ] Callback registered for dispatcher_ng/items/1st/Matthias/BedLight/state/feedback
18:06:05.737 [ II ] Callback registered for dispatcher_ng/items/1st/Matthias/Speaker/state/feedback
18:06:05.737 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/SmallLight/state/feedback
18:06:05.737 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/StandLight/state/feedback
18:06:05.737 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/CupboardLight/state/feedback
18:06:05.737 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/ShelfLight/state/feedback
18:06:05.737 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/state/feedback
18:06:05.737 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/LargeLight/state/feedback
18:06:05.737 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/SmallLight/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/Stars/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/StandLight/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/DeskLight/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/StandLight/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/WardrobeLight/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/WindowLight/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/CeilingLight/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/1st/BedRoom/WolfgangsSide/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/1st/BedRoom/WolfgangBedLight/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/1st/BedRoom/PattysSide/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/1st/BedRoom/WindowLight/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/1st/Anna/WindowContact/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/1st/Matthias/WindowContact/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/WindowContact1/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/Gnd/DiningRoom/WindowContact2/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/WindowContact1/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/Gnd/LivingRoom/WindowContact2/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/WindowContact/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/1st/Bedroom/WindowContactStreet/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/1st/Bedroom/WindowContact1Garden/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/1st/Bedroom/WindowContact2Garden/state/feedback
18:06:05.738 [ II ] Callback registered for dispatcher_ng/items/Gnd/Bathroom/WindowContact/state/feedback
18:06:05.739 [ II ] Callback registered for dispatcher_ng/items/1st/Bathroom/WindowContact/state/feedback
18:06:05.739 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/WindowContact1/state/feedback
18:06:05.739 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/WindowContact2/state/feedback
18:06:05.739 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/WindowContact3/state/feedback
18:06:05.739 [ II ] Callback registered for dispatcher_ng/items/Gnd/Kitchen/WindowContact4/state/feedback
18:06:05.739 [ II ] Callback registered for homegear/instance1/plain/9/#
18:06:05.739 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/Testlight/dimmerIn
18:06:05.739 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/DeskLight/timerIn
18:06:05.739 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/Testlight/state
18:06:05.739 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/Testlight/bright
18:06:05.739 [ II ] Callback registered for homegear/instance1/plain/8/1/ERROR_OVERHEAT
18:06:05.740 [ II ] Callback registered for homegear/instance1/plain/8/1/ERROR_OVERLOAD
18:06:05.740 [ II ] Callback registered for homegear/instance1/plain/8/1/ERROR_REDUCED
18:06:05.740 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/Testlight2/state
18:06:05.740 [ II ] Callback registered for homegear/instance1/plain/5/1/STATE
18:06:05.740 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/TestForwarder/state
18:06:05.740 [ II ] Callback registered for dispatcher_ng/items/Gnd/Hallway/TestScene/state
18:06:05.740 [ II ] Callback registered for dispatcher_ng/items/1st/Anna/AquariumLight/state/feedback
18:06:05.740 [ II ] Callback registered for dispatcher_ng/items/1st/Anna/BedLight/state/feedback
18:06:05.740 [ II ] Callback registered for dispatcher_ng/items/1st/Matthias/StandLight/state/feedback
18:06:05.740 [ II ] Callback registered for dispatcher_ng/items/1st/Matthias/BedLight/state/feedback
18:06:05.742 [ II ] Connecting to mqtt://127.0.0.1:1883
18:06:05.769 [ II ] Dispatcher running
18:06:05.776 [ II ] dispatcher_ng/items/1st/Anna/AquariumLight/state subscribed
18:06:05.776 [ II ] dispatcher_ng/items/1st/Anna/BedLight/state subscribed
18:06:05.776 [ II ] dispatcher_ng/items/1st/Anna/WindowContact/state subscribed
18:06:05.776 [ II ] homegear/instance1/plain/20/1/STATE subscribed
18:06:05.776 [ II ] dispatcher_ng/items/1st/Anna/Thermostat/temperature subscribed
18:06:05.776 [ II ] dispatcher_ng/items/1st/Anna/Thermostat/presetTemperature subscribed
18:06:05.776 [ II ] homegear/instance1/plain/21/1/SET_TEMPERATURE subscribed
18:06:05.776 [ II ] dispatcher_ng/items/1st/Anna/Thermostat/command subscribed
18:06:05.777 [ II ] dispatcher_ng/items/heatingMainSwitch subscribed
18:06:05.777 [ II ] dispatcher_ng/items/1st/Anna/WindowContact/state/feedback subscribed
18:06:05.777 [ II ] dispatcher_ng/items/1st/Matthias/StandLight/state subscribed
18:06:05.777 [ II ] dispatcher_ng/items/1st/Matthias/BedLight/state subscribed
18:06:05.777 [ II ] dispatcher_ng/items/1st/Matthias/Speaker/state subscribed
18:06:05.777 [ II ] dispatcher_ng/items/1st/Matthias/WindowContact/state subscribed
18:06:05.777 [ II ] homegear/instance1/plain/24/1/STATE subscribed
18:06:05.777 [ II ] dispatcher_ng/items/Gnd/DiningRoom/SmallLight/state subscribed
18:06:05.777 [ II ] dispatcher_ng/items/Gnd/DiningRoom/StandLight/state subscribed
18:06:05.777 [ II ] dispatcher_ng/items/Gnd/DiningRoom/CupboardLight/state subscribed
18:06:05.778 [ II ] dispatcher_ng/items/Gnd/DiningRoom/ShelfLight/state subscribed
18:06:05.778 [ II ] dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/state subscribed
18:06:05.778 [ II ] dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/bright subscribed
18:06:05.778 [ II ] dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/colorTemperature subscribed
18:06:05.778 [ II ] dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/hue subscribed
18:06:05.778 [ II ] dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/saturation subscribed
18:06:05.778 [ II ] homegear/instance1/plain/15/1/STATE subscribed
18:06:05.778 [ II ] homegear/instance1/plain/15/1/FAST_BRIGHTNESS subscribed
18:06:05.778 [ II ] homegear/instance1/plain/15/1/COLOR_TEMPERATURE subscribed
18:06:05.779 [ II ] homegear/instance1/plain/15/1/HUE subscribed
18:06:05.779 [ II ] homegear/instance1/plain/15/1/SATURATION subscribed
18:06:05.779 [ II ] dispatcher_ng/items/Gnd/DiningRoom/WindowContact1/state subscribed
18:06:05.779 [ II ] homegear/instance1/plain/26/1/STATE subscribed
18:06:05.779 [ II ] dispatcher_ng/items/Gnd/DiningRoom/WindowContact2/state subscribed
18:06:05.779 [ II ] homegear/instance1/plain/27/1/STATE subscribed
18:06:05.779 [ II ] dispatcher_ng/items/Gnd/DiningRoom/Thermostat/temperature subscribed
18:06:05.779 [ II ] dispatcher_ng/items/Gnd/DiningRoom/Thermostat/presetTemperature subscribed
18:06:05.779 [ II ] homegear/instance1/plain/31/1/SET_TEMPERATURE subscribed
18:06:05.779 [ II ] dispatcher_ng/items/Gnd/DiningRoom/Thermostat/command subscribed
18:06:05.780 [ II ] dispatcher_ng/items/heatingMainSwitch subscribed
18:06:05.780 [ II ] dispatcher_ng/items/Gnd/DiningRoom/WindowContact1/state/feedback subscribed
18:06:05.780 [ II ] dispatcher_ng/items/Gnd/DiningRoom/WindowContact2/state/feedback subscribed
18:06:05.780 [ II ] dispatcher_ng/items/Gnd/LivingRoom/LargeLight/state subscribed
18:06:05.780 [ II ] dispatcher_ng/items/Gnd/LivingRoom/SmallLight/state subscribed
18:06:05.780 [ II ] dispatcher_ng/items/Gnd/LivingRoom/Stars/state subscribed
18:06:05.780 [ II ] dispatcher_ng/items/Gnd/LivingRoom/StandLight/state subscribed
18:06:05.780 [ II ] dispatcher_ng/items/Gnd/LivingRoom/WindowContact1/state subscribed
18:06:05.780 [ II ] homegear/instance1/plain/28/1/STATE subscribed
18:06:05.780 [ II ] dispatcher_ng/items/Gnd/LivingRoom/WindowContact2/state subscribed
18:06:05.781 [ II ] homegear/instance1/plain/29/1/STATE subscribed
18:06:05.781 [ II ] dispatcher_ng/items/Gnd/LivingRoom/Thermostat/temperature subscribed
18:06:05.781 [ II ] dispatcher_ng/items/Gnd/LivingRoom/Thermostat/presetTemperature subscribed
18:06:05.781 [ II ] homegear/instance1/plain/30/1/SET_TEMPERATURE subscribed
18:06:05.781 [ II ] dispatcher_ng/items/Gnd/LivingRoom/Thermostat/command subscribed
18:06:05.781 [ II ] dispatcher_ng/items/heatingMainSwitch subscribed
18:06:05.781 [ II ] dispatcher_ng/items/Gnd/LivingRoom/WindowContact1/state/feedback subscribed
18:06:05.781 [ II ] dispatcher_ng/items/Gnd/LivingRoom/WindowContact2/state/feedback subscribed
18:06:05.781 [ II ] dispatcher_ng/items/Gnd/Hallway/DeskLight/state subscribed
18:06:05.781 [ II ] dispatcher_ng/items/Gnd/Hallway/StandLight/state subscribed
18:06:05.782 [ II ] dispatcher_ng/items/Gnd/Hallway/WardrobeLight/state subscribed
18:06:05.782 [ II ] dispatcher_ng/items/Gnd/Hallway/WindowContact/state subscribed
18:06:05.782 [ II ] homegear/instance1/plain/25/1/STATE subscribed
18:06:05.782 [ II ] dispatcher_ng/items/Gnd/Hallway/Thermostat1/temperature subscribed
18:06:05.782 [ II ] dispatcher_ng/items/Gnd/Hallway/Thermostat1/presetTemperature subscribed
18:06:05.782 [ II ] homegear/instance1/plain/32/1/SET_TEMPERATURE subscribed
18:06:05.782 [ II ] dispatcher_ng/items/Gnd/Hallway/Thermostat1/command subscribed
18:06:05.782 [ II ] dispatcher_ng/items/heatingMainSwitch subscribed
18:06:05.782 [ II ] dispatcher_ng/items/Gnd/Hallway/Thermostat2/temperature subscribed
18:06:05.782 [ II ] dispatcher_ng/items/Gnd/Hallway/Thermostat2/presetTemperature subscribed
18:06:05.782 [ II ] homegear/instance1/plain/33/1/SET_TEMPERATURE subscribed
18:06:05.783 [ II ] dispatcher_ng/items/Gnd/Hallway/Thermostat2/command subscribed
18:06:05.783 [ II ] dispatcher_ng/items/heatingMainSwitch subscribed
18:06:05.783 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowLight/state subscribed
18:06:05.783 [ II ] dispatcher_ng/items/Gnd/Kitchen/CeilingLight/state subscribed
18:06:05.783 [ II ] dispatcher_ng/items/1st/BedRoom/WolfgangsSide/state subscribed
18:06:05.783 [ II ] dispatcher_ng/items/1st/BedRoom/WolfgangBedLight/state subscribed
18:06:05.783 [ II ] dispatcher_ng/items/1st/BedRoom/WolfgangBedLight/bright subscribed
18:06:05.783 [ II ] dispatcher_ng/items/1st/BedRoom/WolfgangBedLight/colorTemperature subscribed
18:06:05.783 [ II ] dispatcher_ng/items/1st/BedRoom/WolfgangBedLight/hue subscribed
18:06:05.783 [ II ] dispatcher_ng/items/1st/BedRoom/WolfgangBedLight/saturation subscribed
18:06:05.784 [ II ] homegear/instance1/plain/16/1/STATE subscribed
18:06:05.784 [ II ] homegear/instance1/plain/16/1/FAST_BRIGHTNESS subscribed
18:06:05.784 [ II ] homegear/instance1/plain/16/1/COLOR_TEMPERATURE subscribed
18:06:05.784 [ II ] homegear/instance1/plain/16/1/HUE subscribed
18:06:05.784 [ II ] homegear/instance1/plain/16/1/SATURATION subscribed
18:06:05.784 [ II ] dispatcher_ng/items/1st/BedRoom/WolfgangBedLight/dimmerIn subscribed
18:06:05.784 [ II ] IoT/TouchSwitch/1st/Bedroom/Wolfgang/# subscribed
18:06:05.784 [ II ] dispatcher_ng/items/1st/BedRoom/PattysSide/state subscribed
18:06:05.784 [ II ] dispatcher_ng/items/1st/BedRoom/WindowLight/state subscribed
18:06:05.784 [ II ] dispatcher_ng/items/1st/BedRoom/WolfgangsSwitch/# subscribed
18:06:05.785 [ II ] dispatcher_ng/items/1st/Bedroom/WindowContactStreet/state subscribed
18:06:05.785 [ II ] homegear/instance1/plain/17/1/STATE subscribed
18:06:05.785 [ II ] dispatcher_ng/items/1st/Bedroom/WindowContact1Garden/state subscribed
18:06:05.785 [ II ] homegear/instance1/plain/18/1/STATE subscribed
18:06:05.785 [ II ] dispatcher_ng/items/1st/Bedroom/WindowContact2Garden/state subscribed
18:06:05.785 [ II ] homegear/instance1/plain/22/1/STATE subscribed
18:06:05.785 [ II ] dispatcher_ng/items/1st/Bedroom/Thermostat/temperature subscribed
18:06:05.785 [ II ] dispatcher_ng/items/1st/Bedroom/Thermostat/presetTemperature subscribed
18:06:05.785 [ II ] homegear/instance1/plain/19/1/SET_TEMPERATURE subscribed
18:06:05.785 [ II ] dispatcher_ng/items/1st/Bedroom/Thermostat/command subscribed
18:06:05.786 [ II ] dispatcher_ng/items/heatingMainSwitch subscribed
18:06:05.786 [ II ] dispatcher_ng/items/1st/Bedroom/WindowContact1Garden/state/feedback subscribed
18:06:05.786 [ II ] dispatcher_ng/items/1st/Bedroom/WindowContact2Garden/state/feedback subscribed
18:06:05.786 [ II ] dispatcher_ng/items/1st/Bedroom/WindowContactStreet/state/feedback subscribed
18:06:05.786 [ II ] dispatcher_ng/items/Gnd/Hallway/DayLight/state subscribed
18:06:05.786 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowLight/state/feedback subscribed
18:06:05.786 [ II ] dispatcher_ng/items/Gnd/Kitchen/CeilingLight/state/feedback subscribed
18:06:05.786 [ II ] dispatcher_ng/items/Gnd/Hallway/DeskLight/state/feedback subscribed
18:06:05.786 [ II ] dispatcher_ng/items/Gnd/Hallway/StandLight/state/feedback subscribed
18:06:05.786 [ II ] dispatcher_ng/items/Gnd/Hallway/WardrobeLight/state/feedback subscribed
18:06:05.787 [ II ] dispatcher_ng/items/Gnd/DiningRoom/SmallLight/state/feedback subscribed
18:06:05.787 [ II ] dispatcher_ng/items/Gnd/DiningRoom/StandLight/state/feedback subscribed
18:06:05.787 [ II ] dispatcher_ng/items/Gnd/DiningRoom/CupboardLight/state/feedback subscribed
18:06:05.787 [ II ] dispatcher_ng/items/Gnd/DiningRoom/ShelfLight/state/feedback subscribed
18:06:05.787 [ II ] dispatcher_ng/items/Gnd/LivingRoom/LargeLight/state/feedback subscribed
18:06:05.787 [ II ] dispatcher_ng/items/Gnd/LivingRoom/SmallLight/state/feedback subscribed
18:06:05.787 [ II ] dispatcher_ng/items/Gnd/LivingRoom/Stars/state/feedback subscribed
18:06:05.787 [ II ] dispatcher_ng/items/Gnd/LivingRoom/StandLight/state/feedback subscribed
18:06:05.787 [ II ] dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/state/feedback subscribed
18:06:05.788 [ II ] dispatcher_ng/items/Gnd/Hallway/EcoLight/state subscribed
18:06:05.788 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowLight/state/feedback subscribed
18:06:05.788 [ II ] dispatcher_ng/items/Gnd/Hallway/DeskLight/state/feedback subscribed
18:06:05.788 [ II ] dispatcher_ng/items/Gnd/Hallway/WardrobeLight/state/feedback subscribed
18:06:05.788 [ II ] dispatcher_ng/items/Gnd/DiningRoom/SmallLight/state/feedback subscribed
18:06:05.788 [ II ] dispatcher_ng/items/Gnd/DiningRoom/StandLight/state/feedback subscribed
18:06:05.788 [ II ] dispatcher_ng/items/Gnd/DiningRoom/CupboardLight/state/feedback subscribed
18:06:05.788 [ II ] dispatcher_ng/items/Gnd/DiningRoom/ShelfLight/state/feedback subscribed
18:06:05.788 [ II ] dispatcher_ng/items/Gnd/LivingRoom/Stars/state/feedback subscribed
18:06:05.788 [ II ] dispatcher_ng/items/Gnd/LivingRoom/StandLight/state/feedback subscribed
18:06:05.788 [ II ] dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/state/feedback subscribed
18:06:05.788 [ II ] dispatcher_ng/items/Gnd/Kitchen/CeilingLight/state/feedback subscribed
18:06:05.788 [ II ] dispatcher_ng/items/Gnd/Hallway/StandLight/state/feedback subscribed
18:06:05.788 [ II ] dispatcher_ng/items/Gnd/LivingRoom/LargeLight/state/feedback subscribed
18:06:05.788 [ II ] dispatcher_ng/items/Gnd/LivingRoom/SmallLight/state/feedback subscribed
18:06:05.788 [ II ] homegear/instance1/plain/6/1/PRESS subscribed
18:06:05.789 [ II ] homegear/instance1/plain/6/2/PRESS subscribed
18:06:05.789 [ II ] dispatcher_ng/items/Gnd/Hallway/MorningLight/state subscribed
18:06:05.789 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowLight/state/feedback subscribed
18:06:05.789 [ II ] dispatcher_ng/items/Gnd/Kitchen/CeilingLight/state/feedback subscribed
18:06:05.789 [ II ] dispatcher_ng/items/Gnd/Hallway/DeskLight/state/feedback subscribed
18:06:05.789 [ II ] dispatcher_ng/items/Gnd/Hallway/WardrobeLight/state/feedback subscribed
18:06:05.789 [ II ] dispatcher_ng/items/Gnd/Hallway/StandLight/state/feedback subscribed
18:06:05.789 [ II ] dispatcher_ng/items/Gnd/DiningRoom/SmallLight/state/feedback subscribed
18:06:05.789 [ II ] dispatcher_ng/items/Gnd/DiningRoom/StandLight/state/feedback subscribed
18:06:05.789 [ II ] dispatcher_ng/items/Gnd/DiningRoom/CupboardLight/state/feedback subscribed
18:06:05.789 [ II ] dispatcher_ng/items/Gnd/DiningRoom/ShelfLight/state/feedback subscribed
18:06:05.789 [ II ] dispatcher_ng/items/Gnd/LivingRoom/Stars/state/feedback subscribed
18:06:05.789 [ II ] dispatcher_ng/items/Gnd/LivingRoom/StandLight/state/feedback subscribed
18:06:05.789 [ II ] dispatcher_ng/items/Gnd/LivingRoom/LargeLight/state/feedback subscribed
18:06:05.789 [ II ] dispatcher_ng/items/Gnd/LivingRoom/SmallLight/state/feedback subscribed
18:06:05.789 [ II ] dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/state/feedback subscribed
18:06:05.789 [ II ] dispatcher_ng/items/Gnd/Bathroom/WindowContact/state subscribed
18:06:05.790 [ II ] homegear/instance1/plain/7/1/STATE subscribed
18:06:05.790 [ II ] dispatcher_ng/items/Gnd/Bathroom/Thermostat/temperature subscribed
18:06:05.790 [ II ] dispatcher_ng/items/Gnd/Bathroom/Thermostat/presetTemperature subscribed
18:06:05.790 [ II ] homegear/instance1/plain/4/1/SET_TEMPERATURE subscribed
18:06:05.790 [ II ] dispatcher_ng/items/Gnd/Bathroom/Thermostat/command subscribed
18:06:05.790 [ II ] dispatcher_ng/items/heatingMainSwitch subscribed
18:06:05.790 [ II ] dispatcher_ng/items/Gnd/Bathroom/WindowContact/state/feedback subscribed
18:06:05.790 [ II ] dispatcher_ng/items/1st/Bathroom/WindowContact/state subscribed
18:06:05.790 [ II ] homegear/instance1/plain/2/1/STATE subscribed
18:06:05.790 [ II ] dispatcher_ng/items/1st/Bathroom/Thermostat/temperature subscribed
18:06:05.790 [ II ] dispatcher_ng/items/1st/Bathroom/Thermostat/presetTemperature subscribed
18:06:05.791 [ II ] homegear/instance1/plain/3/1/SET_TEMPERATURE subscribed
18:06:05.791 [ II ] dispatcher_ng/items/1st/Bathroom/Thermostat/command subscribed
18:06:05.791 [ II ] dispatcher_ng/items/heatingMainSwitch subscribed
18:06:05.796 [ II ] dispatcher_ng/items/1st/Bathroom/WindowContact/state/feedback subscribed
18:06:05.796 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowContact1/state subscribed
18:06:05.797 [ II ] homegear/instance1/plain/11/1/STATE subscribed
18:06:05.797 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowContact2/state subscribed
18:06:05.797 [ II ] homegear/instance1/plain/10/1/STATE subscribed
18:06:05.797 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowContact3/state subscribed
18:06:05.797 [ II ] homegear/instance1/plain/12/1/STATE subscribed
18:06:05.797 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowContact4/state subscribed
18:06:05.797 [ II ] homegear/instance1/plain/13/1/STATE subscribed
18:06:05.797 [ II ] dispatcher_ng/items/Gnd/Kitchen/Thermostat/temperature subscribed
18:06:05.797 [ II ] dispatcher_ng/items/Gnd/Kitchen/Thermostat/presetTemperature subscribed
18:06:05.797 [ II ] homegear/instance1/plain/14/1/SET_TEMPERATURE subscribed
18:06:05.797 [ II ] dispatcher_ng/items/Gnd/Kitchen/Thermostat/command subscribed
18:06:05.798 [ II ] dispatcher_ng/items/heatingMainSwitch subscribed
18:06:05.798 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowContact1/state/feedback subscribed
18:06:05.798 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowContact2/state/feedback subscribed
18:06:05.798 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowContact3/state/feedback subscribed
18:06:05.798 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowContact4/state/feedback subscribed
18:06:05.798 [ II ] dispatcher_ng/items/Gnd/Hallway/FrontdoorContact/state subscribed
18:06:05.798 [ II ] homegear/instance1/plain/23/1/STATE subscribed
18:06:05.798 [ II ] IoT/Status/RelayBox subscribed
18:06:05.798 [ II ] dispatcher_ng/items/base/labor/relaybox/state/# subscribed
18:06:05.798 [ II ] dispatcher_ng/items/Gnd/House/Heatings/command subscribed
18:06:05.798 [ II ] dispatcher_ng/items/1st/Anna/BedLight/state/feedback subscribed
18:06:05.799 [ II ] dispatcher_ng/items/1st/Matthias/StandLight/state/feedback subscribed
18:06:05.799 [ II ] dispatcher_ng/items/1st/Matthias/BedLight/state/feedback subscribed
18:06:05.799 [ II ] dispatcher_ng/items/1st/Matthias/Speaker/state/feedback subscribed
18:06:05.799 [ II ] dispatcher_ng/items/Gnd/DiningRoom/SmallLight/state/feedback subscribed
18:06:05.799 [ II ] dispatcher_ng/items/Gnd/DiningRoom/StandLight/state/feedback subscribed
18:06:05.799 [ II ] dispatcher_ng/items/Gnd/DiningRoom/CupboardLight/state/feedback subscribed
18:06:05.799 [ II ] dispatcher_ng/items/Gnd/DiningRoom/ShelfLight/state/feedback subscribed
18:06:05.799 [ II ] dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/state/feedback subscribed
18:06:05.799 [ II ] dispatcher_ng/items/Gnd/LivingRoom/LargeLight/state/feedback subscribed
18:06:05.799 [ II ] dispatcher_ng/items/Gnd/LivingRoom/SmallLight/state/feedback subscribed
18:06:05.799 [ II ] dispatcher_ng/items/Gnd/LivingRoom/Stars/state/feedback subscribed
18:06:05.799 [ II ] dispatcher_ng/items/Gnd/LivingRoom/StandLight/state/feedback subscribed
18:06:05.799 [ II ] dispatcher_ng/items/Gnd/Hallway/DeskLight/state/feedback subscribed
18:06:05.799 [ II ] dispatcher_ng/items/Gnd/Hallway/StandLight/state/feedback subscribed
18:06:05.799 [ II ] dispatcher_ng/items/Gnd/Hallway/WardrobeLight/state/feedback subscribed
18:06:05.799 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowLight/state/feedback subscribed
18:06:05.799 [ II ] dispatcher_ng/items/Gnd/Kitchen/CeilingLight/state/feedback subscribed
18:06:05.799 [ II ] dispatcher_ng/items/1st/BedRoom/WolfgangsSide/state/feedback subscribed
18:06:05.800 [ II ] dispatcher_ng/items/1st/BedRoom/WolfgangBedLight/state/feedback subscribed
18:06:05.800 [ II ] dispatcher_ng/items/1st/BedRoom/PattysSide/state/feedback subscribed
18:06:05.800 [ II ] dispatcher_ng/items/1st/BedRoom/WindowLight/state/feedback subscribed
18:06:05.800 [ II ] dispatcher_ng/items/1st/Anna/WindowContact/state/feedback subscribed
18:06:05.800 [ II ] dispatcher_ng/items/1st/Matthias/WindowContact/state/feedback subscribed
18:06:05.800 [ II ] dispatcher_ng/items/Gnd/DiningRoom/WindowContact1/state/feedback subscribed
18:06:05.800 [ II ] dispatcher_ng/items/Gnd/DiningRoom/WindowContact2/state/feedback subscribed
18:06:05.800 [ II ] dispatcher_ng/items/Gnd/LivingRoom/WindowContact1/state/feedback subscribed
18:06:05.800 [ II ] dispatcher_ng/items/Gnd/LivingRoom/WindowContact2/state/feedback subscribed
18:06:05.800 [ II ] dispatcher_ng/items/Gnd/Hallway/WindowContact/state/feedback subscribed
18:06:05.800 [ II ] dispatcher_ng/items/1st/Bedroom/WindowContactStreet/state/feedback subscribed
18:06:05.800 [ II ] dispatcher_ng/items/1st/Bedroom/WindowContact1Garden/state/feedback subscribed
18:06:05.800 [ II ] dispatcher_ng/items/1st/Bedroom/WindowContact2Garden/state/feedback subscribed
18:06:05.800 [ II ] dispatcher_ng/items/Gnd/Bathroom/WindowContact/state/feedback subscribed
18:06:05.800 [ II ] dispatcher_ng/items/1st/Bathroom/WindowContact/state/feedback subscribed
18:06:05.801 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowContact1/state/feedback subscribed
18:06:05.801 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowContact2/state/feedback subscribed
18:06:05.801 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowContact3/state/feedback subscribed
18:06:05.801 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowContact4/state/feedback subscribed
18:06:05.801 [ II ] homegear/instance1/plain/9/# subscribed
18:06:05.801 [ II ] dispatcher_ng/items/Gnd/Hallway/Testlight/dimmerIn subscribed
18:06:05.801 [ II ] dispatcher_ng/items/Gnd/Hallway/DeskLight/timerIn subscribed
18:06:05.801 [ II ] dispatcher_ng/items/Gnd/Hallway/Testlight/state subscribed
18:06:05.801 [ II ] dispatcher_ng/items/Gnd/Hallway/Testlight/bright subscribed
18:06:05.801 [ II ] homegear/instance1/plain/8/1/ERROR_OVERHEAT subscribed
18:06:05.801 [ II ] homegear/instance1/plain/8/1/ERROR_OVERLOAD subscribed
18:06:05.801 [ II ] homegear/instance1/plain/8/1/ERROR_REDUCED subscribed
18:06:05.801 [ II ] dispatcher_ng/items/Gnd/Hallway/Testlight2/state subscribed
18:06:05.802 [ II ] homegear/instance1/plain/5/1/STATE subscribed
18:06:05.802 [ II ] dispatcher_ng/items/Gnd/Hallway/TestForwarder/state subscribed
18:06:05.802 [ II ] dispatcher_ng/items/Gnd/Hallway/TestScene/state subscribed
18:06:05.802 [ II ] dispatcher_ng/items/1st/Anna/AquariumLight/state/feedback subscribed
18:06:05.802 [ II ] dispatcher_ng/items/1st/Anna/BedLight/state/feedback subscribed
18:06:05.802 [ II ] dispatcher_ng/items/1st/Matthias/StandLight/state/feedback subscribed
18:06:05.802 [ II ] dispatcher_ng/items/1st/Matthias/BedLight/state/feedback subscribed
18:06:05.802 [ II ] MQTT connection established
18:06:05.803 [ II ] started
18:06:05.803 [ II ] started
18:06:05.803 [ II ] started
18:06:05.803 [ II ] External sending required: dispatcher_ng/items/1st/Anna/Thermostat/presetTemperature 21
18:06:05.803 [ II ] started
18:06:05.803 [ II ] started
18:06:05.803 [ II ] started
18:06:05.803 [ II ] started
18:06:05.803 [ II ] started
18:06:05.803 [ II ] started
18:06:05.803 [ II ] started
18:06:05.803 [ II ] started
18:06:05.803 [ II ] started
18:06:05.804 [ II ] started
18:06:05.804 [ II ] started
18:06:05.804 [ II ] started
18:06:05.804 [ II ] External sending required: dispatcher_ng/items/Gnd/DiningRoom/Thermostat/presetTemperature 21
18:06:05.804 [ II ] started
18:06:05.804 [ II ] started
18:06:05.804 [ II ] started
18:06:05.804 [ II ] started
18:06:05.804 [ II ] started
18:06:05.804 [ II ] started
18:06:05.804 [ II ] started
18:06:05.804 [ II ] External sending required: dispatcher_ng/items/Gnd/LivingRoom/Thermostat/presetTemperature 21
18:06:05.804 [ II ] started
18:06:05.804 [ II ] started
18:06:05.804 [ II ] started
18:06:05.804 [ II ] started
18:06:05.804 [ II ] started
18:06:05.805 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/Thermostat1/presetTemperature 19
18:06:05.805 [ II ] started
18:06:05.805 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/Thermostat2/presetTemperature 5
18:06:05.805 [ II ] started
18:06:05.805 [ II ] started
18:06:05.805 [ II ] started
18:06:05.805 [ II ] started
18:06:05.805 [ II ] started
18:06:05.805 [ II ] started
18:06:05.805 [ II ] started
18:06:05.805 [ II ] started
18:06:05.805 [ II ] started
18:06:05.805 [ II ] started
18:06:05.805 [ II ] started
18:06:05.805 [ II ] started
18:06:05.805 [ II ] started
18:06:05.805 [ II ] External sending required: dispatcher_ng/items/1st/Bedroom/Thermostat/presetTemperature 20
18:06:05.805 [ II ] started
18:06:05.806 [ II ] started
18:06:05.806 [ II ] started
18:06:05.806 [ II ] started
18:06:05.806 [ II ] started
18:06:05.806 [ II ] started
18:06:05.806 [ II ] External sending required: dispatcher_ng/items/Gnd/Bathroom/Thermostat/presetTemperature 20
18:06:05.806 [ II ] started
18:06:05.806 [ II ] started
18:06:05.806 [ II ] External sending required: dispatcher_ng/items/1st/Bathroom/Thermostat/presetTemperature 20
18:06:05.806 [ II ] started
18:06:05.806 [ II ] started
18:06:05.806 [ II ] started
18:06:05.806 [ II ] started
18:06:05.806 [ II ] started
18:06:05.806 [ II ] External sending required: dispatcher_ng/items/Gnd/Kitchen/Thermostat/presetTemperature 20
18:06:05.806 [ II ] started
18:06:05.806 [ II ] started
18:06:05.806 [ II ] started
18:06:05.806 [ II ] started
18:06:05.807 [ II ] started
18:06:05.807 [ II ] started
18:06:05.807 [ II ] started
18:06:05.807 [ II ] started
18:06:05.807 [ II ] started
18:06:05.807 [ II ] started
18:06:05.807 [ II ] started
18:06:05.807 [ II ] started
18:06:05.811 [ II ] External sending required: dispatcher_ng/items/1st/Anna/Thermostat/presetTemperature/feedback 21
18:06:05.811 [ II ] External sending required: dispatcher_ng/items/1st/Anna/Thermostat/temperature/feedback 5
18:06:05.811 [ II ] External sending required: homegear/instance1/set/21/1/SET_TEMPERATURE 5
18:06:05.811 [ II ] 1st_Anna_Thermostat heating main: false
18:06:05.812 [ II ] External sending required: dispatcher_ng/items/1st/Anna/Thermostat/temperature/feedback 5
18:06:05.812 [ II ] External sending required: homegear/instance1/set/21/1/SET_TEMPERATURE 5
18:06:05.812 [ II ] Gnd_DiningRoom_Thermostat heating main: false
18:06:05.812 [ II ] External sending required: dispatcher_ng/items/Gnd/DiningRoom/Thermostat/temperature/feedback 5
18:06:05.812 [ II ] External sending required: homegear/instance1/set/31/1/SET_TEMPERATURE 5
18:06:05.812 [ II ] Gnd_LivingRoom_Thermostat heating main: false
18:06:05.812 [ II ] External sending required: dispatcher_ng/items/Gnd/LivingRoom/Thermostat/temperature/feedback 5
18:06:05.812 [ II ] External sending required: homegear/instance1/set/30/1/SET_TEMPERATURE 5
18:06:05.812 [ II ] Gnd_Hallway_Thermostat1 heating main: false
18:06:05.812 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/Thermostat1/temperature/feedback 5
18:06:05.812 [ II ] External sending required: homegear/instance1/set/32/1/SET_TEMPERATURE 5
18:06:05.813 [ II ] Gnd_Hallway_Thermostat2 heating main: false
18:06:05.813 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/Thermostat2/temperature/feedback 5
18:06:05.813 [ II ] External sending required: homegear/instance1/set/33/1/SET_TEMPERATURE 5
18:06:05.813 [ II ] 1st_Bedroom_Thermostat heating main: false
18:06:05.813 [ II ] External sending required: dispatcher_ng/items/1st/Bedroom/Thermostat/temperature/feedback 5
18:06:05.813 [ II ] External sending required: homegear/instance1/set/19/1/SET_TEMPERATURE 5
18:06:05.813 [ II ] Gnd_Bathroom_Thermostat heating main: false
18:06:05.813 [ II ] External sending required: dispatcher_ng/items/Gnd/Bathroom/Thermostat/temperature/feedback 5
18:06:05.813 [ II ] External sending required: homegear/instance1/set/4/1/SET_TEMPERATURE 5
18:06:05.813 [ II ] 1st_Bathroom_Thermostat heating main: false
18:06:05.813 [ II ] External sending required: dispatcher_ng/items/1st/Bathroom/Thermostat/temperature/feedback 5
18:06:05.813 [ II ] External sending required: homegear/instance1/set/3/1/SET_TEMPERATURE 5
18:06:05.814 [ II ] Gnd_Kitchen_Thermostat heating main: false
18:06:05.814 [ II ] External sending required: dispatcher_ng/items/Gnd/Kitchen/Thermostat/temperature/feedback 5
18:06:05.814 [ II ] External sending required: homegear/instance1/set/14/1/SET_TEMPERATURE 5
18:06:05.814 [ II ] External sending required: dispatcher_ng/items/1st/Anna/Thermostat/temperature/feedback 5
18:06:05.814 [ II ] External sending required: homegear/instance1/set/21/1/SET_TEMPERATURE 5
18:06:05.814 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.815 [ II ] dispatcher_ng/items/1st/Anna/WindowContact/state/feedback, CLOSED
18:06:05.815 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.836 [ II ] External sending required: dispatcher_ng/items/Gnd/DiningRoom/Thermostat/presetTemperature/feedback 21
18:06:05.837 [ II ] External sending required: dispatcher_ng/items/Gnd/LivingRoom/Thermostat/presetTemperature/feedback 21
18:06:05.837 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/Thermostat1/presetTemperature/feedback 19
18:06:05.837 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/Thermostat2/presetTemperature/feedback 5
18:06:05.838 [ II ] External sending required: dispatcher_ng/items/1st/Bedroom/Thermostat/presetTemperature/feedback 20
18:06:05.838 [ II ] External sending required: dispatcher_ng/items/1st/Bedroom/Thermostat/temperature/feedback 5
18:06:05.838 [ II ] External sending required: homegear/instance1/set/19/1/SET_TEMPERATURE 5
18:06:05.838 [ II ] External sending required: dispatcher_ng/items/1st/Bedroom/Thermostat/temperature/feedback 5
18:06:05.838 [ II ] External sending required: homegear/instance1/set/19/1/SET_TEMPERATURE 5
18:06:05.839 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.839 [ II ] dispatcher_ng/items/1st/Bedroom/WindowContact1Garden/state/feedback, OPEN
18:06:05.839 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.839 [ II ] External sending required: dispatcher_ng/items/1st/Bedroom/Thermostat/temperature/feedback 5
18:06:05.839 [ II ] External sending required: homegear/instance1/set/19/1/SET_TEMPERATURE 5
18:06:05.839 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.839 [ II ] dispatcher_ng/items/1st/Bedroom/WindowContact2Garden/state/feedback, CLOSED
18:06:05.839 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.840 [ II ] External sending required: dispatcher_ng/items/1st/Bedroom/Thermostat/temperature/feedback 5
18:06:05.840 [ II ] External sending required: homegear/instance1/set/19/1/SET_TEMPERATURE 5
18:06:05.840 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.840 [ II ] dispatcher_ng/items/1st/Bedroom/WindowContactStreet/state/feedback, CLOSED
18:06:05.840 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.840 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/DayLight/state/feedback OFF
18:06:05.840 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/EcoLight/state/feedback OFF
18:06:05.841 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/MorningLight/state/feedback OFF
18:06:05.841 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowLight/state/feedback, OFF
18:06:05.841 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.841 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.841 [ II ] dispatcher_ng/items/Gnd/Kitchen/CeilingLight/state/feedback, OFF
18:06:05.841 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.841 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.841 [ II ] dispatcher_ng/items/Gnd/Hallway/DeskLight/state/feedback, OFF
18:06:05.842 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.842 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.842 [ II ] dispatcher_ng/items/Gnd/Hallway/StandLight/state/feedback, OFF
18:06:05.842 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.842 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.842 [ II ] dispatcher_ng/items/Gnd/Hallway/WardrobeLight/state/feedback, OFF
18:06:05.842 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.842 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.843 [ II ] dispatcher_ng/items/Gnd/DiningRoom/SmallLight/state/feedback, OFF
18:06:05.843 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.843 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.843 [ II ] dispatcher_ng/items/Gnd/DiningRoom/StandLight/state/feedback, OFF
18:06:05.843 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.843 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.843 [ II ] dispatcher_ng/items/Gnd/DiningRoom/CupboardLight/state/feedback, OFF
18:06:05.843 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.843 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.844 [ II ] dispatcher_ng/items/Gnd/DiningRoom/ShelfLight/state/feedback, OFF
18:06:05.844 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.844 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.844 [ II ] dispatcher_ng/items/Gnd/LivingRoom/LargeLight/state/feedback, OFF
18:06:05.844 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.844 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.844 [ II ] dispatcher_ng/items/Gnd/LivingRoom/SmallLight/state/feedback, OFF
18:06:05.844 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.844 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.845 [ II ] dispatcher_ng/items/Gnd/LivingRoom/Stars/state/feedback, OFF
18:06:05.845 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.845 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.845 [ II ] dispatcher_ng/items/Gnd/LivingRoom/StandLight/state/feedback, OFF
18:06:05.845 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.845 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.845 [ II ] dispatcher_ng/items/Gnd/DiningRoom/NaehkaestchenLight/state/feedback, OFF
18:06:05.845 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.845 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.846 [ II ] External sending required: dispatcher_ng/items/Gnd/Bathroom/Thermostat/temperature/feedback 25
18:06:05.846 [ II ] External sending required: homegear/instance1/set/4/1/SET_TEMPERATURE 25
18:06:05.846 [ II ] External sending required: dispatcher_ng/items/Gnd/Bathroom/Thermostat/presetTemperature/feedback 20
18:06:05.846 [ II ] External sending required: dispatcher_ng/items/Gnd/Bathroom/Thermostat/temperature/feedback 5
18:06:05.846 [ II ] External sending required: homegear/instance1/set/4/1/SET_TEMPERATURE 5
18:06:05.846 [ II ] External sending required: dispatcher_ng/items/Gnd/Bathroom/Thermostat/temperature/feedback 5
18:06:05.847 [ II ] External sending required: homegear/instance1/set/4/1/SET_TEMPERATURE 5
18:06:05.847 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.847 [ II ] dispatcher_ng/items/Gnd/Bathroom/WindowContact/state/feedback, CLOSED
18:06:05.847 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.847 [ II ] External sending required: dispatcher_ng/items/1st/Bathroom/Thermostat/presetTemperature/feedback 20
18:06:05.847 [ II ] External sending required: dispatcher_ng/items/1st/Bathroom/Thermostat/temperature/feedback 5
18:06:05.847 [ II ] External sending required: homegear/instance1/set/3/1/SET_TEMPERATURE 5
18:06:05.847 [ II ] External sending required: dispatcher_ng/items/1st/Bathroom/Thermostat/temperature/feedback 5
18:06:05.848 [ II ] External sending required: homegear/instance1/set/3/1/SET_TEMPERATURE 5
18:06:05.848 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.848 [ II ] dispatcher_ng/items/1st/Bathroom/WindowContact/state/feedback, CLOSED
18:06:05.848 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.848 [ II ] External sending required: dispatcher_ng/items/Gnd/Kitchen/Thermostat/presetTemperature/feedback 20
18:06:05.848 [ II ] External sending required: dispatcher_ng/items/Gnd/Kitchen/Thermostat/temperature/feedback 5
18:06:05.848 [ II ] External sending required: homegear/instance1/set/14/1/SET_TEMPERATURE 5
18:06:05.849 [ II ] External sending required: dispatcher_ng/items/Gnd/Kitchen/Thermostat/temperature/feedback 5
18:06:05.849 [ II ] External sending required: homegear/instance1/set/14/1/SET_TEMPERATURE 5
18:06:05.849 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.849 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowContact1/state/feedback, CLOSED
18:06:05.849 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.849 [ II ] External sending required: dispatcher_ng/items/Gnd/Kitchen/Thermostat/temperature/feedback 5
18:06:05.849 [ II ] External sending required: homegear/instance1/set/14/1/SET_TEMPERATURE 5
18:06:05.849 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.849 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowContact2/state/feedback, CLOSED
18:06:05.849 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.850 [ II ] External sending required: dispatcher_ng/items/Gnd/Kitchen/Thermostat/temperature/feedback 5
18:06:05.850 [ II ] External sending required: homegear/instance1/set/14/1/SET_TEMPERATURE 5
18:06:05.850 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.850 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowContact3/state/feedback, CLOSED
18:06:05.850 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.850 [ II ] External sending required: dispatcher_ng/items/Gnd/Kitchen/Thermostat/temperature/feedback 5
18:06:05.850 [ II ] External sending required: homegear/instance1/set/14/1/SET_TEMPERATURE 5
18:06:05.850 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.850 [ II ] dispatcher_ng/items/Gnd/Kitchen/WindowContact4/state/feedback, CLOSED
18:06:05.850 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.851 [ II ] dispatcher_ng/items/1st/Anna/BedLight/state/feedback, OFF
18:06:05.851 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.851 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.851 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TestScene/state/feedback OFF
18:06:05.852 [ II ] dispatcher_ng/items/1st/Matthias/StandLight/state/feedback, OFF
18:06:05.852 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.852 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.852 [ II ] dispatcher_ng/items/1st/Matthias/BedLight/state/feedback, OFF
18:06:05.852 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.852 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.852 [ II ] dispatcher_ng/items/1st/Matthias/Speaker/state/feedback, OFF
18:06:05.852 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.852 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.853 [ II ] dispatcher_ng/items/1st/BedRoom/WolfgangsSide/state/feedback, OFF
18:06:05.853 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.853 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.853 [ II ] dispatcher_ng/items/1st/BedRoom/WolfgangBedLight/state/feedback, OFF
18:06:05.854 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.854 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.854 [ II ] dispatcher_ng/items/1st/BedRoom/PattysSide/state/feedback, OFF
18:06:05.854 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 red
18:06:05.854 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.855 [ II ] dispatcher_ng/items/1st/BedRoom/WindowLight/state/feedback, OFF
18:06:05.855 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 green
18:06:05.855 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.855 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led1 green
18:06:05.855 [ II ] dispatcher_ng/items/1st/Matthias/WindowContact/state/feedback, CLOSED
18:06:05.855 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/TwoLedSignal1/led2 red
18:06:05.856 [ II ] External sending required: dispatcher_ng/items/1st/Anna/Thermostat/presetTemperature/feedback 21
18:06:05.856 [ II ] External sending required: dispatcher_ng/items/Gnd/DiningRoom/Thermostat/presetTemperature/feedback 21
18:06:05.856 [ II ] External sending required: dispatcher_ng/items/Gnd/LivingRoom/Thermostat/presetTemperature/feedback 21
18:06:05.856 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/Thermostat1/presetTemperature/feedback 19
18:06:05.857 [ II ] External sending required: dispatcher_ng/items/Gnd/Hallway/Thermostat2/presetTemperature/feedback 5
18:06:05.857 [ II ] External sending required: dispatcher_ng/items/1st/Bedroom/Thermostat/presetTemperature/feedback 20
18:06:05.857 [ II ] External sending required: dispatcher_ng/items/Gnd/Bathroom/Thermostat/presetTemperature/feedback 20
18:06:05.857 [ II ] External sending required: dispatcher_ng/items/1st/Bathroom/Thermostat/presetTemperature/feedback 20
18:06:05.857 [ II ] External sending required: dispatcher_ng/items/Gnd/Kitchen/Thermostat/presetTemperature/feedback 20

View File

@ -1,20 +1,70 @@
Switch 1st.Anna.AquariumLight {mqtt=">[localbroker:dispatcher_ng/items/1st/Anna/AquariumLight/state:command:*:default]", mqtt="<[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]", mqtt="<[localbroker:dispatcher_ng/items/1st/Anna/BedLight/state/feedback:state:default]"}
Switch 1st.Matthias.Stehlampen Matthias {mqtt=">[localbroker:dispatcher_ng/items/1st/Matthias/Stehlampen Matthias/state:command:*:default]", mqtt="<[localbroker:dispatcher_ng/items/1st/Matthias/Stehlampen Matthias/state/feedback:state:default]"}
Switch 1st.Matthias.BedLight {mqtt=">[localbroker:dispatcher_ng/items/1st/Matthias/BedLight/state:command:*:default]", mqtt="<[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]", mqtt="<[localbroker:dispatcher_ng/items/1st/Matthias/Speaker/state/feedback:state:default]"}
Switch Gnd.DiningRoom.SmallLight {mqtt=">[localbroker:dispatcher_ng/items/Gnd/DiningRoom/SmallLight/state:command:*:default]", mqtt="<[localbroker:dispatcher_ng/items/Gnd/DiningRoom/SmallLight/state/feedback:state:default]"}
Switch Gnd.DiningRoom.StandLight {mqtt=">[localbroker:dispatcher_ng/items/Gnd/DiningRoom/StandLight/state:command:*:default]", mqtt="<[localbroker:dispatcher_ng/items/Gnd/DiningRoom/StandLight/state/feedback:state:default]"}
Switch Gnd.DiningRoom.CupboardLight {mqtt=">[localbroker:dispatcher_ng/items/Gnd/DiningRoom/CupboardLight/state:command:*:default]", mqtt="<[localbroker:dispatcher_ng/items/Gnd/DiningRoom/CupboardLight/state/feedback:state:default]"}
Switch Gnd.LivingRoom.LargeLight {mqtt=">[localbroker:dispatcher_ng/items/Gnd/LivingRoom/LargeLight/state:command:*:default]", mqtt="<[localbroker:dispatcher_ng/items/Gnd/LivingRoom/LargeLight/state/feedback:state:default]"}
Switch Gnd.LivingRoom.SmallLight {mqtt=">[localbroker:dispatcher_ng/items/Gnd/LivingRoom/SmallLight/state:command:*:default]", mqtt="<[localbroker:dispatcher_ng/items/Gnd/LivingRoom/SmallLight/state/feedback:state:default]"}
Switch Gnd.LivingRoom.Stars {mqtt=">[localbroker:dispatcher_ng/items/Gnd/LivingRoom/Stars/state:command:*:default]", mqtt="<[localbroker:dispatcher_ng/items/Gnd/LivingRoom/Stars/state/feedback:state:default]"}
Switch Gnd.LivingRoom.StandLight {mqtt=">[localbroker:dispatcher_ng/items/Gnd/LivingRoom/StandLight/state:command:*:default]", mqtt="<[localbroker:dispatcher_ng/items/Gnd/LivingRoom/StandLight/state/feedback:state:default]"}
Switch Gnd.Hallway.DeskLight {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Hallway/DeskLight/state:command:*:default]", mqtt="<[localbroker:dispatcher_ng/items/Gnd/Hallway/DeskLight/state/feedback:state:default]"}
Switch Gnd.Hallway.StandLight {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Hallway/StandLight/state:command:*:default]", mqtt="<[localbroker:dispatcher_ng/items/Gnd/Hallway/StandLight/state/feedback:state:default]"}
Switch Gnd.Hallway.StandLight {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Hallway/StandLight/state:command:*:default]", mqtt="<[localbroker:dispatcher_ng/items/Gnd/Hallway/StandLight/state/feedback:state:default]"}
Switch Gnd.Kitchen.WindowLight {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Kitchen/WindowLight/state:command:*:default]", mqtt="<[localbroker:dispatcher_ng/items/Gnd/Kitchen/WindowLight/state/feedback:state:default]"}
Switch Gnd.Kitchen.CeilingLight {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Kitchen/CeilingLight/state:command:*:default]", mqtt="<[localbroker:dispatcher_ng/items/Gnd/Kitchen/CeilingLight/state/feedback:state:default]"}
Switch 1st.BedRoom.WolfgangsSide {mqtt=">[localbroker:dispatcher_ng/items/1st/BedRoom/WolfgangsSide/state:command:*:default]", mqtt="<[localbroker:dispatcher_ng/items/1st/BedRoom/WolfgangsSide/state/feedback:state:default]"}
Switch 1st.BedRoom.PattysSide {mqtt=">[localbroker:dispatcher_ng/items/1st/BedRoom/PattysSide/state:command:*:default]", mqtt="<[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]", mqtt="<[localbroker:dispatcher_ng/items/1st/BedRoom/WindowLight/state/feedback:state:default]"}
Switch 1st_Anna_AquariumLight "Aquarium"{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 "Bettlicht"{mqtt=">[localbroker:dispatcher_ng/items/1st/Anna/BedLight/state:command:*:default],<[localbroker:dispatcher_ng/items/1st/Anna/BedLight/state/feedback:state:default]"}
Contact 1st_Anna_WindowContact "Anna" {mqtt="<[localbroker:dispatcher_ng/items/1st/Anna/WindowContact/state/feedback:state:default]"}
Number 1st_Anna_Thermostat "Thermostat Anna [%.1f °C]" {mqtt=">[localbroker:dispatcher_ng/items/1st/Anna/Thermostat/temperature:command:*:default],<[localbroker:dispatcher_ng/items/1st/Anna/Thermostat/temperature/feedback:state:default]"}
Number Preset_1st_Anna_Thermostat "Preset_Thermostat Anna [%.1f °C]" {mqtt=">[localbroker:dispatcher_ng/items/1st/Anna/Thermostat/presetTemperature:command:*:default],<[localbroker:dispatcher_ng/items/1st/Anna/Thermostat/presetTemperature/feedback:state:default]"}
Switch 1st_Matthias_StandLight "Stehlampen"{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 "Bettlicht"{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 "Lautsprecher"{mqtt=">[localbroker:dispatcher_ng/items/1st/Matthias/Speaker/state:command:*:default],<[localbroker:dispatcher_ng/items/1st/Matthias/Speaker/state/feedback:state:default]"}
Contact 1st_Matthias_WindowContact "Matthias" {mqtt="<[localbroker:dispatcher_ng/items/1st/Matthias/WindowContact/state/feedback:state:default]"}
Switch Gnd_Esszimmer_SmallLight "kleine Lampe"{mqtt=">[localbroker:dispatcher_ng/items/Gnd/Esszimmer/SmallLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Esszimmer/SmallLight/state/feedback:state:default]"}
Switch Gnd_Esszimmer_StandLight "Stehlampe"{mqtt=">[localbroker:dispatcher_ng/items/Gnd/Esszimmer/StandLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Esszimmer/StandLight/state/feedback:state:default]"}
Switch Gnd_Esszimmer_CupboardLight "Schranklicht"{mqtt=">[localbroker:dispatcher_ng/items/Gnd/Esszimmer/CupboardLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Esszimmer/CupboardLight/state/feedback:state:default]"}
Contact Gnd_Esszimmer_WindowContact1 "Essz. links" {mqtt="<[localbroker:dispatcher_ng/items/Gnd/Esszimmer/WindowContact1/state/feedback:state:default]"}
Contact Gnd_Esszimmer_WindowContact2 "Essz. rechts" {mqtt="<[localbroker:dispatcher_ng/items/Gnd/Esszimmer/WindowContact2/state/feedback:state:default]"}
Number Gnd_Esszimmer_Thermostat "Thermostat Esszimmer [%.1f °C]" {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Esszimmer/Thermostat/temperature:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Esszimmer/Thermostat/temperature/feedback:state:default]"}
Number Preset_Gnd_Esszimmer_Thermostat "Preset_Thermostat Esszimmer [%.1f °C]" {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Esszimmer/Thermostat/presetTemperature:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Esszimmer/Thermostat/presetTemperature/feedback:state:default]"}
Switch Gnd_Wohnzimmer_LargeLight "große Lampe"{mqtt=">[localbroker:dispatcher_ng/items/Gnd/Wohnzimmer/LargeLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Wohnzimmer/LargeLight/state/feedback:state:default]"}
Switch Gnd_Wohnzimmer_SmallLight "kleine Lampe"{mqtt=">[localbroker:dispatcher_ng/items/Gnd/Wohnzimmer/SmallLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Wohnzimmer/SmallLight/state/feedback:state:default]"}
Switch Gnd_Wohnzimmer_Stars "Sterne"{mqtt=">[localbroker:dispatcher_ng/items/Gnd/Wohnzimmer/Stars/state:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Wohnzimmer/Stars/state/feedback:state:default]"}
Switch Gnd_Wohnzimmer_StandLight "Stehlampe"{mqtt=">[localbroker:dispatcher_ng/items/Gnd/Wohnzimmer/StandLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Wohnzimmer/StandLight/state/feedback:state:default]"}
Contact Gnd_Wohnzimmer_WindowContact1 "Wohnz. rechts" {mqtt="<[localbroker:dispatcher_ng/items/Gnd/Wohnzimmer/WindowContact1/state/feedback:state:default]"}
Contact Gnd_Wohnzimmer_WindowContact2 "Wohnz. links" {mqtt="<[localbroker:dispatcher_ng/items/Gnd/Wohnzimmer/WindowContact2/state/feedback:state:default]"}
Number Gnd_Wohnzimmer_Thermostat "Thermostat Wohnzimmer [%.1f °C]" {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Wohnzimmer/Thermostat/temperature:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Wohnzimmer/Thermostat/temperature/feedback:state:default]"}
Number Preset_Gnd_Wohnzimmer_Thermostat "Preset_Thermostat Wohnzimmer [%.1f °C]" {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Wohnzimmer/Thermostat/presetTemperature:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Wohnzimmer/Thermostat/presetTemperature/feedback:state:default]"}
Switch Gnd_Flur_DeskLight "Schreibtischlampe"{mqtt=">[localbroker:dispatcher_ng/items/Gnd/Flur/DeskLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Flur/DeskLight/state/feedback:state:default]"}
Switch Gnd_Flur_StandLight "Stehlampe"{mqtt=">[localbroker:dispatcher_ng/items/Gnd/Flur/StandLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Flur/StandLight/state/feedback:state:default]"}
Switch Gnd_Flur_WardrobeLight "Schranklicht"{mqtt=">[localbroker:dispatcher_ng/items/Gnd/Flur/WardrobeLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Flur/WardrobeLight/state/feedback:state:default]"}
Contact Gnd_Flur_WindowContact "Flur" {mqtt="<[localbroker:dispatcher_ng/items/Gnd/Flur/WindowContact/state/feedback:state:default]"}
Number Gnd_Flur_Thermostat1 "Thermostat Flur vorne [%.1f °C]" {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Flur/Thermostat1/temperature:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Flur/Thermostat1/temperature/feedback:state:default]"}
Number Preset_Gnd_Flur_Thermostat1 "Preset_Thermostat Flur vorne [%.1f °C]" {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Flur/Thermostat1/presetTemperature:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Flur/Thermostat1/presetTemperature/feedback:state:default]"}
Number Gnd_Flur_Thermostat2 "Thermostat Flur hinten [%.1f °C]" {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Flur/Thermostat2/temperature:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Flur/Thermostat2/temperature/feedback:state:default]"}
Number Preset_Gnd_Flur_Thermostat2 "Preset_Thermostat Flur hinten [%.1f °C]" {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Flur/Thermostat2/presetTemperature:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Flur/Thermostat2/presetTemperature/feedback:state:default]"}
Switch Gnd_Kueche_WindowLight "Fensterbanklicht"{mqtt=">[localbroker:dispatcher_ng/items/Gnd/Kueche/WindowLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Kueche/WindowLight/state/feedback:state:default]"}
Switch Gnd_Kueche_CeilingLight "Deckenlampe"{mqtt=">[localbroker:dispatcher_ng/items/Gnd/Kueche/CeilingLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Kueche/CeilingLight/state/feedback:state:default]"}
Switch 1st_Schlafzimmer_WolfgangsSide "Wolfgangs Seite"{mqtt=">[localbroker:dispatcher_ng/items/1st/Schlafzimmer/WolfgangsSide/state:command:*:default],<[localbroker:dispatcher_ng/items/1st/Schlafzimmer/WolfgangsSide/state/feedback:state:default]"}
Switch 1st_Schlafzimmer_PattysSide "Pattys Seite"{mqtt=">[localbroker:dispatcher_ng/items/1st/Schlafzimmer/PattysSide/state:command:*:default],<[localbroker:dispatcher_ng/items/1st/Schlafzimmer/PattysSide/state/feedback:state:default]"}
Switch 1st_Schlafzimmer_WindowLight "Fensterbanklicht"{mqtt=">[localbroker:dispatcher_ng/items/1st/Schlafzimmer/WindowLight/state:command:*:default],<[localbroker:dispatcher_ng/items/1st/Schlafzimmer/WindowLight/state/feedback:state:default]"}
Contact 1st_Bedroom_WindowContactStreet "Schlafz. Strasse" {mqtt="<[localbroker:dispatcher_ng/items/1st/Bedroom/WindowContactStreet/state/feedback:state:default]"}
Contact 1st_Bedroom_WindowContact1Garden "Schlafz. Garten 1" {mqtt="<[localbroker:dispatcher_ng/items/1st/Bedroom/WindowContact1Garden/state/feedback:state:default]"}
Contact 1st_Bedroom_WindowContact2Garden "Schlafz. Garten 2" {mqtt="<[localbroker:dispatcher_ng/items/1st/Bedroom/WindowContact2Garden/state/feedback:state:default]"}
Number 1st_Bedroom_Thermostat "Thermostat Schlafzimmer [%.1f °C]" {mqtt=">[localbroker:dispatcher_ng/items/1st/Bedroom/Thermostat/temperature:command:*:default],<[localbroker:dispatcher_ng/items/1st/Bedroom/Thermostat/temperature/feedback:state:default]"}
Number Preset_1st_Bedroom_Thermostat "Preset_Thermostat Schlafzimmer [%.1f °C]" {mqtt=">[localbroker:dispatcher_ng/items/1st/Bedroom/Thermostat/presetTemperature:command:*:default],<[localbroker:dispatcher_ng/items/1st/Bedroom/Thermostat/presetTemperature/feedback:state:default]"}
Contact Gnd_Bathroom_WindowContact "Bad unten" {mqtt="<[localbroker:dispatcher_ng/items/Gnd/Bathroom/WindowContact/state/feedback:state:default]"}
Number Gnd_Bathroom_Thermostat "Thermostat Bad unten [%.1f °C]" {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Bathroom/Thermostat/temperature:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Bathroom/Thermostat/temperature/feedback:state:default]"}
Number Preset_Gnd_Bathroom_Thermostat "Preset_Thermostat Bad unten [%.1f °C]" {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Bathroom/Thermostat/presetTemperature:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Bathroom/Thermostat/presetTemperature/feedback:state:default]"}
Contact 1st_Bathroom_WindowContact "Bad oben" {mqtt="<[localbroker:dispatcher_ng/items/1st/Bathroom/WindowContact/state/feedback:state:default]"}
Number 1st_Bathroom_Thermostat "Thermostat Bad oben [%.1f °C]" {mqtt=">[localbroker:dispatcher_ng/items/1st/Bathroom/Thermostat/temperature:command:*:default],<[localbroker:dispatcher_ng/items/1st/Bathroom/Thermostat/temperature/feedback:state:default]"}
Number Preset_1st_Bathroom_Thermostat "Preset_Thermostat Bad oben [%.1f °C]" {mqtt=">[localbroker:dispatcher_ng/items/1st/Bathroom/Thermostat/presetTemperature:command:*:default],<[localbroker:dispatcher_ng/items/1st/Bathroom/Thermostat/presetTemperature/feedback:state:default]"}
Contact Gnd_Kueche_WindowContact1 "Küche Garten" {mqtt="<[localbroker:dispatcher_ng/items/Gnd/Kueche/WindowContact1/state/feedback:state:default]"}
Contact Gnd_Kueche_WindowContact2 "Küche Terassentür" {mqtt="<[localbroker:dispatcher_ng/items/Gnd/Kueche/WindowContact2/state/feedback:state:default]"}
Contact Gnd_Kueche_WindowContact3 "Küche Straße 1" {mqtt="<[localbroker:dispatcher_ng/items/Gnd/Kueche/WindowContact3/state/feedback:state:default]"}
Contact Gnd_Kueche_WindowContact4 "Küche Straße 2" {mqtt="<[localbroker:dispatcher_ng/items/Gnd/Kueche/WindowContact4/state/feedback:state:default]"}
Number Gnd_Kueche_Thermostat "Thermostat Küche [%.1f °C]" {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Kueche/Thermostat/temperature:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Kueche/Thermostat/temperature/feedback:state:default]"}
Number Preset_Gnd_Kueche_Thermostat "Preset_Thermostat Küche [%.1f °C]" {mqtt=">[localbroker:dispatcher_ng/items/Gnd/Kueche/Thermostat/presetTemperature:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Kueche/Thermostat/presetTemperature/feedback:state:default]"}
Contact Gnd_Flur_FrontdoorContact "Haustür" {mqtt="<[localbroker:dispatcher_ng/items/Gnd/Flur/FrontdoorContact/state/feedback:state:default]"}
Switch base_labor_relaybox0 "Küche" {mqtt=">[localbroker:dispatcher_ng/items/base/labor/relaybox/state/0:command:*:default],<[localbroker:dispatcher_ng/items/base/labor/relaybox/feedback/0:state:default]"}
String base_labor_relaybox0Conflict "Küche [%s]" {mqtt="<[localbroker:dispatcher_ng/items/base/labor/relaybox/conflict/0:state:default]"}
Switch base_labor_relaybox1 "Herd" {mqtt=">[localbroker:dispatcher_ng/items/base/labor/relaybox/state/1:command:*:default],<[localbroker:dispatcher_ng/items/base/labor/relaybox/feedback/1:state:default]"}
String base_labor_relaybox1Conflict "Herd [%s]" {mqtt="<[localbroker:dispatcher_ng/items/base/labor/relaybox/conflict/1:state:default]"}
Switch base_labor_relaybox2 "Waschküche" {mqtt=">[localbroker:dispatcher_ng/items/base/labor/relaybox/state/2:command:*:default],<[localbroker:dispatcher_ng/items/base/labor/relaybox/feedback/2:state:default]"}
String base_labor_relaybox2Conflict "Waschküche [%s]" {mqtt="<[localbroker:dispatcher_ng/items/base/labor/relaybox/conflict/2:state:default]"}
Switch Base_Keller_Light "Werkstatt"{mqtt=">[localbroker:dispatcher_ng/items/Base/Keller/Light/state:command:*:default],<[localbroker:dispatcher_ng/items/Base/Keller/Light/state/feedback:state:default]"}
Switch Base_Keller_SmallLight "Licht einfach"{mqtt=">[localbroker:dispatcher_ng/items/Base/Keller/SmallLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Base/Keller/SmallLight/state/feedback:state:default]"}
Switch Base_Keller_LargeLight "Licht hell"{mqtt=">[localbroker:dispatcher_ng/items/Base/Keller/LargeLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Base/Keller/LargeLight/state/feedback:state:default]"}
Switch Gnd_Szenen_DayLight "DayLight"{mqtt=">[localbroker:dispatcher_ng/items/Gnd/Szenen/DayLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Szenen/DayLight/state/feedback:state:default]"}
Switch Gnd_Szenen_EcoLight "EcoLight"{mqtt=">[localbroker:dispatcher_ng/items/Gnd/Szenen/EcoLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Szenen/EcoLight/state/feedback:state:default]"}
Switch Gnd_Szenen_MorningLight "MorningLight"{mqtt=">[localbroker:dispatcher_ng/items/Gnd/Szenen/MorningLight/state:command:*:default],<[localbroker:dispatcher_ng/items/Gnd/Szenen/MorningLight/state/feedback:state:default]"}
Switch HeatingMainSwitch "Heizung Hauptschalter" {mqtt=">[localbroker:dispatcher_ng/items/heatingMainSwitch:command:*:default],<[localbroker:dispatcher_ng/items/heatingMainSwitch:state:default]"}

22
package-lock.json generated
View File

@ -19,6 +19,12 @@
"integrity": "sha512-lLN/Rtud+SONdclROGc8CnZeZ/ujQ69U4otFMtoCfCdLfs2x2R2lJFSy583uI9dnnsd6I9Pdy/Mw3efqxO/2bg==",
"dev": true
},
"@types/cron": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@types/cron/-/cron-1.2.1.tgz",
"integrity": "sha1-lcHkMtYQbKNMkvB0Nji8eGwHP6o=",
"dev": true
},
"@types/moment": {
"version": "2.13.0",
"resolved": "https://registry.npmjs.org/@types/moment/-/moment-2.13.0.tgz",
@ -166,6 +172,14 @@
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"cron": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/cron/-/cron-1.3.0.tgz",
"integrity": "sha512-K/SF7JlgMmNjcThWxkKvsHhey2EDB4CeOEWJ9aXWj3fbQJppsvTPIeyLdHfNq5IbbsMUUjRW1nr5dSO95f2E4w==",
"requires": {
"moment-timezone": "0.5.14"
}
},
"duplexify": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.1.tgz",
@ -382,6 +396,14 @@
"resolved": "https://registry.npmjs.org/moment/-/moment-2.20.1.tgz",
"integrity": "sha1-1usaRsvMFKKy+UNBEsH/iQfzE/0="
},
"moment-timezone": {
"version": "0.5.14",
"resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.14.tgz",
"integrity": "sha1-TrOP+VOLgBCLpGekWPPtQmjM/LE=",
"requires": {
"moment": "2.20.1"
}
},
"mqtt": {
"version": "2.15.0",
"resolved": "https://registry.npmjs.org/mqtt/-/mqtt-2.15.0.tgz",

View File

@ -21,6 +21,7 @@
"dependencies": {
"chalk": "^2.3.0",
"command-line-args": "^4.0.7",
"cron": "^1.3.0",
"moment": "^2.20.1",
"mqtt": "^2.15.0",
"nodemailer": "^4.4.1",
@ -29,6 +30,7 @@
"devDependencies": {
"@types/chalk": "^2.2.0",
"@types/command-line-args": "^4.0.2",
"@types/cron": "^1.2.1",
"@types/moment": "^2.13.0",
"@types/mqtt": "^2.5.0",
"@types/node": "^8.5.8",

253
smartclient.json Normal file
View File

@ -0,0 +1,253 @@
{
"switches": [
{
"room": "Anna",
"switches": [
{
"label": "Bettlicht",
"actionTopic": "dispatcher_ng/items/1st/Anna/BedLight/state",
"feedbackTopic": "dispatcher_ng/items/1st/Anna/BedLight/state/feedback"
}
]
},
{
"room": "Matthias",
"switches": [
{
"label": "Stehlampen",
"actionTopic": "dispatcher_ng/items/1st/Matthias/StandLight/state",
"feedbackTopic": "dispatcher_ng/items/1st/Matthias/StandLight/state/feedback"
},
{
"label": "Bettlicht",
"actionTopic": "dispatcher_ng/items/1st/Matthias/BedLight/state",
"feedbackTopic": "dispatcher_ng/items/1st/Matthias/BedLight/state/feedback"
},
{
"label": "Lautsprecher",
"actionTopic": "dispatcher_ng/items/1st/Matthias/Speaker/state",
"feedbackTopic": "dispatcher_ng/items/1st/Matthias/Speaker/state/feedback"
}
]
},
{
"room": "Esszimmer",
"switches": [
{
"label": "kleine Lampe",
"actionTopic": "dispatcher_ng/items/Gnd/Esszimmer/SmallLight/state",
"feedbackTopic": "dispatcher_ng/items/Gnd/Esszimmer/SmallLight/state/feedback"
},
{
"label": "Stehlampe",
"actionTopic": "dispatcher_ng/items/Gnd/Esszimmer/StandLight/state",
"feedbackTopic": "dispatcher_ng/items/Gnd/Esszimmer/StandLight/state/feedback"
},
{
"label": "Schranklicht",
"actionTopic": "dispatcher_ng/items/Gnd/Esszimmer/CupboardLight/state",
"feedbackTopic": "dispatcher_ng/items/Gnd/Esszimmer/CupboardLight/state/feedback"
},
{
"label": "Regallicht",
"actionTopic": "dispatcher_ng/items/Gnd/Esszimmer/ShelfLight/state",
"feedbackTopic": "dispatcher_ng/items/Gnd/Esszimmer/ShelfLight/state/feedback"
},
{
"label": "Nähkästchen",
"actionTopic": "dispatcher_ng/items/Gnd/Esszimmer/NaehkaestchenLight/state",
"feedbackTopic": "dispatcher_ng/items/Gnd/Esszimmer/NaehkaestchenLight/state/feedback"
}
]
},
{
"room": "Wohnzimmer",
"switches": [
{
"label": "große Lampe",
"actionTopic": "dispatcher_ng/items/Gnd/Wohnzimmer/LargeLight/state",
"feedbackTopic": "dispatcher_ng/items/Gnd/Wohnzimmer/LargeLight/state/feedback"
},
{
"label": "kleine Lampe",
"actionTopic": "dispatcher_ng/items/Gnd/Wohnzimmer/SmallLight/state",
"feedbackTopic": "dispatcher_ng/items/Gnd/Wohnzimmer/SmallLight/state/feedback"
},
{
"label": "Sterne",
"actionTopic": "dispatcher_ng/items/Gnd/Wohnzimmer/Stars/state",
"feedbackTopic": "dispatcher_ng/items/Gnd/Wohnzimmer/Stars/state/feedback"
},
{
"label": "Stehlampe",
"actionTopic": "dispatcher_ng/items/Gnd/Wohnzimmer/StandLight/state",
"feedbackTopic": "dispatcher_ng/items/Gnd/Wohnzimmer/StandLight/state/feedback"
}
]
},
{
"room": "Flur",
"switches": [
{
"label": "Schreibtischlampe",
"actionTopic": "dispatcher_ng/items/Gnd/Flur/DeskLight/state",
"feedbackTopic": "dispatcher_ng/items/Gnd/Flur/DeskLight/state/feedback"
},
{
"label": "Stehlampe",
"actionTopic": "dispatcher_ng/items/Gnd/Flur/StandLight/state",
"feedbackTopic": "dispatcher_ng/items/Gnd/Flur/StandLight/state/feedback"
},
{
"label": "Schranklicht",
"actionTopic": "dispatcher_ng/items/Gnd/Flur/WardrobeLight/state",
"feedbackTopic": "dispatcher_ng/items/Gnd/Flur/WardrobeLight/state/feedback"
}
]
},
{
"room": "Kueche",
"switches": [
{
"label": "Fensterbanklicht",
"actionTopic": "dispatcher_ng/items/Gnd/Kueche/WindowLight/state",
"feedbackTopic": "dispatcher_ng/items/Gnd/Kueche/WindowLight/state/feedback"
},
{
"label": "Deckenlampe",
"actionTopic": "dispatcher_ng/items/Gnd/Kueche/CeilingLight/state",
"feedbackTopic": "dispatcher_ng/items/Gnd/Kueche/CeilingLight/state/feedback"
}
]
},
{
"room": "Schlafzimmer",
"switches": [
{
"label": "Wolfgangs Seite",
"actionTopic": "dispatcher_ng/items/1st/Schlafzimmer/WolfgangsSide/state",
"feedbackTopic": "dispatcher_ng/items/1st/Schlafzimmer/WolfgangsSide/state/feedback"
},
{
"label": "Wolfgangs Bettlicht",
"actionTopic": "dispatcher_ng/items/1st/Schlafzimmer/WolfgangBedLight/state",
"feedbackTopic": "dispatcher_ng/items/1st/Schlafzimmer/WolfgangBedLight/state/feedback"
},
{
"label": "Pattys Seite",
"actionTopic": "dispatcher_ng/items/1st/Schlafzimmer/PattysSide/state",
"feedbackTopic": "dispatcher_ng/items/1st/Schlafzimmer/PattysSide/state/feedback"
},
{
"label": "Fensterbanklicht",
"actionTopic": "dispatcher_ng/items/1st/Schlafzimmer/WindowLight/state",
"feedbackTopic": "dispatcher_ng/items/1st/Schlafzimmer/WindowLight/state/feedback"
}
]
},
{
"room": "Keller",
"switches": [
{
"label": "Werkstatt",
"actionTopic": "dispatcher_ng/items/Base/Keller/Light/state",
"feedbackTopic": "dispatcher_ng/items/Base/Keller/Light/state/feedback"
},
{
"label": "Licht einfach",
"actionTopic": "dispatcher_ng/items/Base/Keller/SmallLight/state",
"feedbackTopic": "dispatcher_ng/items/Base/Keller/SmallLight/state/feedback"
},
{
"label": "Licht hell",
"actionTopic": "dispatcher_ng/items/Base/Keller/LargeLight/state",
"feedbackTopic": "dispatcher_ng/items/Base/Keller/LargeLight/state/feedback"
}
]
}
],
"scenes": [
{
"label": "DayLight",
"actionTopic": "dispatcher_ng/items/Gnd/Szenen/DayLight/state"
},
{
"label": "EcoLight",
"actionTopic": "dispatcher_ng/items/Gnd/Szenen/EcoLight/state"
},
{
"label": "MorningLight",
"actionTopic": "dispatcher_ng/items/Gnd/Szenen/MorningLight/state"
},
{
"label": "Alle Lampen",
"actionTopic": "dispatcher_ng/items/Gnd/Szenen/AllLights/state"
}
],
"windows": [
{
"label": "Anna",
"topic": "dispatcher_ng/items/1st/Anna/WindowContact/state/feedback"
},
{
"label": "Matthias",
"topic": "dispatcher_ng/items/1st/Matthias/WindowContact/state/feedback"
},
{
"label": "Essz. links",
"topic": "dispatcher_ng/items/Gnd/Esszimmer/WindowContact1/state/feedback"
},
{
"label": "Essz. rechts",
"topic": "dispatcher_ng/items/Gnd/Esszimmer/WindowContact2/state/feedback"
},
{
"label": "Wohnz. rechts",
"topic": "dispatcher_ng/items/Gnd/Wohnzimmer/WindowContact1/state/feedback"
},
{
"label": "Wohnz. links",
"topic": "dispatcher_ng/items/Gnd/Wohnzimmer/WindowContact2/state/feedback"
},
{
"label": "Flur",
"topic": "dispatcher_ng/items/Gnd/Flur/WindowContact/state/feedback"
},
{
"label": "Schlafz. Strasse",
"topic": "dispatcher_ng/items/1st/Bedroom/WindowContactStreet/state/feedback"
},
{
"label": "Schlafz. Garten 1",
"topic": "dispatcher_ng/items/1st/Bedroom/WindowContact1Garden/state/feedback"
},
{
"label": "Schlafz. Garten 2",
"topic": "dispatcher_ng/items/1st/Bedroom/WindowContact2Garden/state/feedback"
},
{
"label": "Bad unten",
"topic": "dispatcher_ng/items/Gnd/Bathroom/WindowContact/state/feedback"
},
{
"label": "Bad oben",
"topic": "dispatcher_ng/items/1st/Bathroom/WindowContact/state/feedback"
},
{
"label": "Küche Garten",
"topic": "dispatcher_ng/items/Gnd/Kueche/WindowContact1/state/feedback"
},
{
"label": "Küche Terassentür",
"topic": "dispatcher_ng/items/Gnd/Kueche/WindowContact2/state/feedback"
},
{
"label": "Küche Straße 1",
"topic": "dispatcher_ng/items/Gnd/Kueche/WindowContact3/state/feedback"
},
{
"label": "Küche Straße 2",
"topic": "dispatcher_ng/items/Gnd/Kueche/WindowContact4/state/feedback"
}
]
}

View File

@ -1,7 +1,7 @@
import { AItem } from './AItem'
export abstract class AHomematicItem extends AItem {
export abstract class AHomegearItem extends AItem {
protected deviceTopicPre: string;
protected actionTopicPre: string;
protected homegearTopicPre: string;

View File

@ -1,23 +1,51 @@
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { ExportType } from './Export'
import * as Events from 'events'
export abstract class AItem {
export interface HasStateTopic {
getStateTopic() : string
}
export interface HasStateAndFeedbackTopic extends HasStateTopic {
getStateFeedbackTopic() : string
}
export interface HasStateAndFeedbackTopicAndLabel extends HasFeedbackTopic {
getLabel() : string
}
export interface HasStateAndFeedbackTopicAndLabelAndRoom extends HasStateAndFeedbackTopic {
getLabel() : string
getRoom() : string
}
export interface HasFeedbackTopic {
getStateFeedbackTopic() : string
}
export interface HasInTopic {
getInTopic() : string
}
export abstract class AItem extends Events.EventEmitter {
protected topicFirstPart: string
protected itemId: string
protected label: string
private item: string
private room: string
private floor: string
protected item: string
protected room: string
protected floor: string
protected subscribeTopics: string[]
constructor(floor: string, room: string, item: string, label: string = '') {
super()
this.floor = floor
this.room = room
this.item = item
this.itemId = `${this.floor}.${this.room}.${this.item}`
this.itemId = `${this.floor}_${this.room}_${this.item}`
if (label == '') {
this.label = this.itemId
} else {
@ -28,14 +56,18 @@ export abstract class AItem {
abstract processMessage(topic: string, payload: string) : void
startFunc() : void {
}
exportItem() : ExportType|null {
return null
}
start() : void {
mqttHandler.register(this.subscribeTopics, (topic: string, payload: string) : void => {
logger.info(`item ${this.itemId}: ${topic}, ${payload}`)
// logger.info(`item ${this.itemId}: ${topic}, ${payload}`)
this.processMessage(topic, payload)
})
}, () => { this.startFunc() })
}
}

33
src/Cron.ts Normal file
View File

@ -0,0 +1,33 @@
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { HasInTopic } from './AItem'
import * as cron from 'cron'
type CronEntry = {
output: string
cronTime: string
cronJob?: cron.CronJob
}
export class Cron {
private crontab: CronEntry[]
private targetTopic: string
private name: string
constructor(name: string, target: HasInTopic, crontab: CronEntry[]) {
this.name = name
this.targetTopic = target.getInTopic()
this.crontab = crontab
}
start() : void {
this.crontab.forEach((cronEntry) => {
logger.info(`Starting cronjob for: ${this.targetTopic}, ${cronEntry.output} at ${cronEntry.cronTime}`)
cronEntry.cronJob = new cron.CronJob(cronEntry.cronTime, () => {
logger.info(`Firing ${this.targetTopic}, ${cronEntry.output}`)
mqttHandler.send(this.targetTopic, cronEntry.output)
}, undefined, true, 'Europe/Berlin')
})
}
}

View File

@ -1,9 +1,8 @@
import { AItem } from './AItem'
import { AItem, HasInTopic } from './AItem'
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
export class DimmerAdaptor extends AItem {
export class DimmerAdaptor extends AItem implements HasInTopic {
private brightDirection: number
private bright: number
private state: string
@ -22,6 +21,11 @@ export class DimmerAdaptor extends AItem {
this.brightDirection = -1
}
getInTopic() : string {
return this.inTopic
}
processMessage(topic: string, payload: string) : void {
switch (topic) {
case this.inTopic:

4
src/Disabler.ts Normal file
View File

@ -0,0 +1,4 @@
export interface Disabler {
transform(payload: string) : string
getStateFeedbackTopic(): string
}

View File

@ -1,6 +1,6 @@
export type ExportType = {
'homekit': HomekitExportType,
'openhab': string
'openhab': string | string[]
}
export type HomekitExportType = {
@ -27,6 +27,48 @@ export function SwitchExport(itemId: string, label: string, stateTopic: string,
return { 'homekit': homekitOut, 'openhab': openhabOut }
}
export function ThermostatExport(itemId: string, label: string, temperatureTopic: string, temperatureFeedbackTopic: string, presetTemperatureTopic: string, presetTemperatureFeedbackTopic: string) : ExportType {
return {'homekit': ThermostatHomekitExport(itemId, label, temperatureTopic, temperatureFeedbackTopic), 'openhab': ThermostatOpenHAPExport(itemId, label, temperatureTopic, temperatureFeedbackTopic, presetTemperatureTopic, presetTemperatureFeedbackTopic)}
}
export function ContactExport(itemId: string, label: string, status: string) : ExportType {
return {'homekit': ContactHomekitExport(itemId, label, status), 'openhab': ContactOpenHABExport(itemId, label, status)}
}
export function HueColorLightExport(itemId: string, label: string,
stateTopic: string, stateFeedbackTopic: string,
brightnessTopic: string, brightnessFeedbackTopic: string,
hueTopic: string, hueFeedbackTopic: string,
saturationTopic: string, saturationFeedbackTopic: string,
colorTemperatureTopic: string, colorTemperatureFeedbackTopic: string) {
return {'homekit': HueColorLightHomekitExport(itemId, label, stateTopic, stateFeedbackTopic,
brightnessTopic, brightnessFeedbackTopic, hueTopic, hueFeedbackTopic,
saturationTopic, saturationFeedbackTopic, colorTemperatureTopic, colorTemperatureFeedbackTopic), 'openhab': ''}
}
export function RelayBoxExport(itemId: string, stateTopicPre: string, feedbackTopicPre: string, conflictTopicPre: string, itemNames: string[]) : ExportType {
return {'homekit': RelayBoxHomekitExport(itemId, stateTopicPre, feedbackTopicPre, conflictTopicPre, itemNames),
'openhab': RelayBoxOpenHABExport(itemId, stateTopicPre, feedbackTopicPre, conflictTopicPre, itemNames)}
}
export function HeatingMainSwitchExport(topic: string) : ExportType {
return {'homekit': {'id':'', 'object': {}},
'openhab': `Switch HeatingMainSwitch "Heizung Hauptschalter" {mqtt=">[localbroker:${topic}:command:*:default],<[localbroker:${topic}:state:default]"}`}
}
function RelayBoxHomekitExport(itemId: string, stateTopicPre: string, feedbackTopicPre: string, conflictTopicPre: string, itemNames: string[]) : HomekitExportType{
return {'id': '', 'object': {}}
}
function RelayBoxOpenHABExport(itemId: string, stateTopicPre: string, feedbackTopicPre: string, conflictTopicPre: string, itemNames: string[]) : string[] {
let o : string[] = []
itemNames.forEach((label: string, index: number) => {
o.push(`Switch ${itemId}${index} "${label}" {mqtt=">[localbroker:${stateTopicPre}/${index}:command:*:default],<[localbroker:${feedbackTopicPre}/${index}:state:default]"}`)
o.push(`String ${itemId}${index}Conflict "${label} [%s]" {mqtt="<[localbroker:${conflictTopicPre}/${index}:state:default]"}`)
})
return o
}
function SwitchHomekitBulbExport(id: string, label: string, setOn: string, statusOn: string) : HomekitExportType {
let o : any = {
@ -67,8 +109,85 @@ function SwitchHomekitOutletExport(id: string, label: string, setOn: string, sta
return { 'id': id, 'object': o }
}
function ThermostatHomekitExport(id: string, label: string, setTemperature: string, statusTemperature: string) : HomekitExportType {
let o : any = {
"id": id,
"name": label,
"service": "Thermostat",
"topic": {
"setTargetTemperature": setTemperature,
"statusTargetTemperature": statusTemperature,
"statusCurrentTemperature": statusTemperature
},
"payload": {}
}
return { 'id': id, 'object': o }
}
function ContactHomekitExport(id: string, label: string, status: string) : HomekitExportType {
let o : any = {
"id": id,
"name": label,
"service": "ContactSensor",
"topic": {
"statusContactSensorState": status
},
"payload": {
"onContactDetected": "CLOSED"
}
}
return { 'id': id, 'object': o }
}
function SwitchOpenHABExport(id: string, label: string, setOn: string, statusOn: string): string {
// Switch windowLightKitchen {mqtt=">[localbroker:nodered/items/windowLightKitchen:command:*:default]", mqtt="<[localbroker:nodered/items/windowLightKitchen/feedback:state:default]"}
return `Switch ${id} {mqtt=">[localbroker:${setOn}:command:*:default]", mqtt="<[localbroker:${statusOn}:state:default]"}`
}
return `Switch ${id} "${label}"{mqtt=">[localbroker:${setOn}:command:*:default],<[localbroker:${statusOn}:state:default]"}`
}
function ContactOpenHABExport(id: string, label: string, status: string): string {
// Switch windowLightKitchen {mqtt=">[localbroker:nodered/items/windowLightKitchen:command:*:default]", mqtt="<[localbroker:nodered/items/windowLightKitchen/feedback:state:default]"}
return `Contact ${id} "${label}" {mqtt="<[localbroker:${status}:state:default]"}`
}
function ThermostatOpenHAPExport(id: string, label: string, setTemperature: string, statusTemperature: string, presetTemperature: string, presetStatusTemperature: string) : string[] {
let o : string[] = []
o.push(`Number ${id} "${label} [%.1f °C]" {mqtt=">[localbroker:${setTemperature}:command:*:default],<[localbroker:${statusTemperature}:state:default]"}`)
o.push(`Number Preset_${id} "Preset_${label} [%.1f °C]" {mqtt=">[localbroker:${presetTemperature}:command:*:default],<[localbroker:${presetStatusTemperature}:state:default]"}`)
return o
}
function HueColorLightHomekitExport(id: string, label: string,
stateTopic: string, stateFeedbackTopic: string,
brightnessTopic: string, brightnessFeedbackTopic: string,
hueTopic: string, hueFeedbackTopic: string,
saturationTopic: string, saturationFeedbackTopic: string,
colorTemperatureTopic: string, colorTemperatureFeedbackTopic: string) {
let o: any = {
"id": id,
"name": label,
"service": "Lightbulb",
"manufacturer": "hue2mqtt - Hue",
"model": "color light",
"topic": {
"setOn": stateTopic,
"statusOn": stateFeedbackTopic,
"setBrightness": brightnessTopic,
"statusBrightness": brightnessFeedbackTopic,
"setHue": hueTopic,
"statusHue": hueFeedbackTopic,
"setSaturation": saturationTopic,
"statusSaturation": saturationFeedbackTopic,
"setColorTemperature": colorTemperatureTopic,
"statusColorTemperature": colorTemperatureFeedbackTopic
},
"payload": {
"onTrue": "ON",
"onFalse": "OFF",
"brightnessFactor": 1,
"hueFactor": 1,
"saturationFactor": 1
}
}
return { 'id': id, 'object': o}
}

View File

@ -1,12 +1,18 @@
import { AItem } from './AItem'
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { HasInTopic } from './AItem';
export class Forwarder extends AItem {
export class Forwarder extends AItem implements HasInTopic {
private targetTopics: string[]
private inTopic: string
getInTopic() : string {
return this.inTopic
}
constructor(floor: string, room: string, item: string, topicLastPart: string, label: string, targetTopics: string[]) {
super(floor, room, item, label)
this.inTopic = `${this.topicFirstPart}/${topicLastPart}`

16
src/HeatingScene.ts Normal file
View File

@ -0,0 +1,16 @@
import { Forwarder } from './Forwarder'
import { HasInTopic } from './AItem'
export class HeatingScene extends Forwarder {
constructor(floor: string, room: string, item: string, label: string,
targetItems: HasInTopic[]) {
let inTopics: string[] = []
targetItems.forEach((item: HasInTopic) => {
inTopics.push(item.getInTopic())
})
super(floor, room, item, "command", label, inTopics)
}
}

View File

@ -1,9 +1,9 @@
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { AHomematicItem } from './AHomematicItem'
import { AHomegearItem } from './AHomegearItem'
export class HomematicDimmerItem extends AHomematicItem {
export class HomematicDimmerItem extends AHomegearItem {
private oldBright: number|undefined
private bright: number
private oldState: string|undefined

View File

@ -1,6 +1,6 @@
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { AHomematicItem } from './AHomematicItem'
import { AHomegearItem } from './AHomegearItem'
export class HomematicFourButtonSingleItem {
@ -29,7 +29,7 @@ export class HomematicFourButtonSingleItem {
}
}
export class HomematicFourButtonThing extends AHomematicItem {
export class HomematicFourButtonThing extends AHomegearItem {
private itemObjs: HomematicFourButtonSingleItem[]
constructor(floor: string, room: string, item: string, hmId: number, itemObjs: HomematicFourButtonSingleItem[]) {

View File

@ -1,9 +1,10 @@
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { AHomematicItem } from './AHomematicItem'
import { AHomegearItem } from './AHomegearItem'
import { SwitchExport, ExportType } from './Export'
import { HasStateAndFeedbackTopicAndLabelAndRoom } from './AItem';
export class HomematicSwitchItem extends AHomematicItem {
export class HomematicSwitchItem extends AHomegearItem implements HasStateAndFeedbackTopicAndLabelAndRoom {
private oldState: string|undefined
private state: string
private actionTopic: string
@ -11,13 +12,35 @@ export class HomematicSwitchItem extends AHomematicItem {
private stateFeedbackTopic: string
private stateTopic: string
private type: string
private partId: number
constructor(floor: string, room: string, item: string, label: string, hmId: number, type: string = 'bulb') {
getLabel(): string {
return this.label
}
getRoom() : string {
return this.room
}
getStateTopic() : string {
return this.stateTopic
}
getStateFeedbackTopic() : string {
return this.stateFeedbackTopic
}
getState() : string {
return this.state
}
constructor(floor: string, room: string, item: string, label: string, hmId: number, partId: number = 1, type: string = 'bulb') {
super(floor, room, item, label, hmId)
this.partId = partId
this.stateTopic = `${this.topicFirstPart}/state`
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`
this.deviceFeedbackTopic = `${this.deviceTopicPre}/1/STATE`
this.actionTopic = `${this.actionTopicPre}/1/STATE`
this.deviceFeedbackTopic = `${this.deviceTopicPre}/${this.partId}/STATE`
this.actionTopic = `${this.actionTopicPre}/${this.partId}/STATE`
this.subscribeTopics = [
this.stateTopic,
this.deviceFeedbackTopic
@ -55,5 +78,6 @@ export class HomematicSwitchItem extends AHomematicItem {
mqttHandler.send(this.stateFeedbackTopic, this.state)
break
}
this.emit('somethingChanged')
}
}

166
src/HueColorBulbItem.ts Normal file
View File

@ -0,0 +1,166 @@
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { AHomegearItem } from './AHomegearItem'
import { HueColorLightExport, ExportType } from './Export'
import { HasStateAndFeedbackTopic, HasInTopic, HasStateAndFeedbackTopicAndLabelAndRoom } from './AItem'
export class HueColorBulbItem extends AHomegearItem implements HasStateAndFeedbackTopicAndLabelAndRoom {
private readonly BRIGHT_FACTOR: number = 2.54
private readonly HUE_FACTOR: number = (65535 / 360)
private readonly SATURATION_FACTOR: number = 2.54
private bright: number
private colorTemperature: number
private hue: number
private saturation: number
private state: string
private stateActionTopic: string
private brightActionTopic: string
private colorTemperatureActionTopic: string
private hueActionTopic: string
private saturationActionTopic: string
private brightFeedbackTopic: string
private stateFeedbackTopic: string
private colorTemperatureFeedbackTopic: string
private hueFeedbackTopic: string
private saturationFeedbackTopic: string
private brightTopic: string
private stateTopic: string
private hueTopic: string
private saturationTopic: string
private colorTemperatureTopic: string
private stateDeviceTopic: string
private brightDeviceTopic: string
private colorTemperatureDeviceTopic: string
private hueDeviceTopic: string
private saturationDeviceTopic: string
getLabel() : string {
return this.label
}
getRoom() : string {
return this.room
}
getStateTopic() : string {
return this.stateTopic
}
getInTopic() : string {
return this.stateTopic
}
getStateFeedbackTopic() : string {
return this.stateFeedbackTopic
}
constructor(floor: string, room: string, item: string, label: string, hmId: number) {
super(floor, room, item, label, hmId)
this.stateTopic = `${this.topicFirstPart}/state`
this.brightTopic = `${this.topicFirstPart}/bright`
this.colorTemperatureTopic = `${this.topicFirstPart}/colorTemperature`
this.hueTopic = `${this.topicFirstPart}/hue`
this.saturationTopic = `${this.topicFirstPart}/saturation`
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`
this.brightFeedbackTopic = `${this.topicFirstPart}/bright/feedback`
this.hueFeedbackTopic = `${this.topicFirstPart}/bright/hue`
this.saturationFeedbackTopic = `${this.topicFirstPart}/bright/saturation`
this.colorTemperatureFeedbackTopic = `${this.topicFirstPart}/colorTemperature/feedback`
this.stateActionTopic = `${this.actionTopicPre}/1/STATE`
this.brightActionTopic = `${this.actionTopicPre}/1/FAST_BRIGHTNESS`
this.hueActionTopic = `${this.actionTopicPre}/1/HUE`
this.saturationActionTopic = `${this.actionTopicPre}/1/SATURATION`
this.colorTemperatureActionTopic = `${this.actionTopicPre}/1/COLOR_TEMPERATURE`
this.stateDeviceTopic = `${this.deviceTopicPre}/1/STATE`
this.brightDeviceTopic = `${this.deviceTopicPre}/1/FAST_BRIGHTNESS`
this.hueDeviceTopic = `${this.deviceTopicPre}/1/HUE`
this.saturationDeviceTopic = `${this.deviceTopicPre}/1/SATURATION`
this.colorTemperatureDeviceTopic = `${this.deviceTopicPre}/1/COLOR_TEMPERATURE`
this.subscribeTopics = [
this.stateTopic,
this.brightTopic,
this.colorTemperatureTopic,
this.hueTopic,
this.saturationTopic,
this.stateDeviceTopic,
this.brightDeviceTopic,
this.colorTemperatureDeviceTopic,
this.hueDeviceTopic,
this.saturationDeviceTopic
]
this.state = 'OFF'
this.bright = 0
this.colorTemperature = 0
this.hue = 0
this.saturation = 0
}
exportItem() : ExportType|null {
return HueColorLightExport(this.itemId, this.label,
this.stateTopic, this.stateFeedbackTopic,
this.brightTopic, this.brightFeedbackTopic,
this.hueTopic, this.hueFeedbackTopic,
this.saturationTopic, this.saturationFeedbackTopic,
this.colorTemperatureTopic, this.colorTemperatureFeedbackTopic)
}
processMessage(topic: string, payload: string) : void {
switch (topic) {
case this.stateTopic:
this.state = payload
mqttHandler.send(this.stateFeedbackTopic, this.state)
if (this.state == "ON") {
mqttHandler.send(this.stateActionTopic, "true")
} else {
mqttHandler.send(this.stateActionTopic, "false")
}
break
case this.stateDeviceTopic:
this.state = payload
if (payload == "true") {
this.state = "ON"
} else {
this.state = "OFF"
}
mqttHandler.send(this.stateFeedbackTopic, this.state)
break
case this.brightTopic:
this.bright = parseFloat(payload)
mqttHandler.send(this.brightFeedbackTopic, `${this.bright}`)
mqttHandler.send(this.brightActionTopic, `${this.bright * this.BRIGHT_FACTOR}`)
break
case this.brightDeviceTopic:
this.bright = parseFloat(payload) / this.BRIGHT_FACTOR
mqttHandler.send(this.brightFeedbackTopic, `${this.bright}`)
break
case this.hueTopic:
this.hue = parseFloat(payload)
mqttHandler.send(this.hueFeedbackTopic, `${this.hue}`)
mqttHandler.send(this.hueActionTopic, `${this.hue * this.HUE_FACTOR}`)
break
case this.hueDeviceTopic:
this.hue = parseFloat(payload) / this.HUE_FACTOR
mqttHandler.send(this.hueFeedbackTopic, `${this.hue}`)
break
case this.saturationTopic:
this.saturation = parseFloat(payload)
mqttHandler.send(this.saturationFeedbackTopic, `${this.saturation}`)
mqttHandler.send(this.saturationActionTopic, `${this.saturation * this.SATURATION_FACTOR}`)
break
case this.saturationDeviceTopic:
this.saturation = parseFloat(payload) / this.SATURATION_FACTOR
mqttHandler.send(this.saturationFeedbackTopic, `${this.saturation}`)
break
case this.colorTemperatureTopic:
this.colorTemperature = parseInt(payload)
mqttHandler.send(this.colorTemperatureFeedbackTopic, `${this.colorTemperature}`)
mqttHandler.send(this.colorTemperatureActionTopic, `${this.colorTemperature}`)
break
case this.colorTemperatureDeviceTopic:
this.colorTemperature = parseInt(payload)
mqttHandler.send(this.colorTemperatureFeedbackTopic, `${this.colorTemperature}`)
break
}
}
}

View File

@ -1,19 +1,39 @@
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { AItem } from './AItem'
import { AItem, HasStateAndFeedbackTopicAndLabelAndRoom, HasInTopic, HasStateAndFeedbackTopic } from './AItem'
import { SwitchExport, ExportType } from './Export'
export class M433SwitchItem extends AItem {
export class M433SwitchItem extends AItem implements HasStateAndFeedbackTopicAndLabelAndRoom {
private offCode: string
private onCode: string
private oldState: string|undefined
private state: string
private actionTopic: string
private stateFeedbackTopic: string
public stateTopic: string
private stateTopic: string
private type: string
getLabel() : string {
return this.label
}
getRoom() : string {
return this.room
}
getStateTopic() : string {
return this.stateTopic
}
getInTopic() : string {
return this.stateTopic
}
getStateFeedbackTopic() : string {
return this.stateFeedbackTopic
}
constructor(floor: string, room: string, item: string, label: string, onCode: string, offCode: string, type: string = 'bulb') {
super(floor, room, item, label)
this.stateTopic = `${this.topicFirstPart}/state`

66
src/MaxEcoSwitch.ts Normal file
View File

@ -0,0 +1,66 @@
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { AHomegearItem } from './AHomegearItem'
import { LightScene } from './Scene'
export class MaxEcoSwitch extends AHomegearItem {
private ecoTopic: string
private mainTopic: string
private mainButtonTopic: string
private ecoButtonTopic: string
private state: string
constructor(floor: string, room: string, item: string, label: string, hmId: number,
mainScene: LightScene, ecoScene: LightScene) {
super(floor, room, item, label, hmId)
this.mainButtonTopic = `${this.deviceTopicPre}/1/PRESS`
this.ecoButtonTopic = `${this.deviceTopicPre}/2/PRESS`
this.subscribeTopics = [ this.mainButtonTopic, this.ecoButtonTopic ]
this.mainTopic = mainScene.getStateTopic()
this.ecoTopic = ecoScene.getStateTopic()
this.state = 'OFF'
}
processMessage(topic: string, payload: string) : void {
switch(this.state) {
case 'OFF':
if (topic == this.mainButtonTopic) {
this.state = 'ON'
} else if (topic == this.ecoButtonTopic) {
this.state = 'ECO'
}
break
case 'ON':
if (topic == this.mainButtonTopic) {
this.state = 'OFF'
} else if (topic == this.ecoButtonTopic) {
this.state = 'ECO'
}
break
case 'ECO':
if (topic == this.mainButtonTopic) {
this.state = 'ON'
} else if (topic == this.ecoButtonTopic) {
this.state = 'OFF'
}
break
}
switch(this.state) {
case 'OFF':
mqttHandler.send(this.mainTopic, 'OFF')
break
case 'ON':
mqttHandler.send(this.mainTopic, 'ON')
break
case 'ECO':
mqttHandler.send(this.ecoTopic, 'ON')
break
}
}
}

131
src/MaxThermostat.ts Normal file
View File

@ -0,0 +1,131 @@
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { HasInTopic } from './AItem'
import { AHomegearItem } from './AHomegearItem'
// import { MaxWindowContact } from './MaxWindowContact';
import { ThermostatExport, HeatingMainSwitchExport, ExportType } from './Export'
import { Disabler } from './Disabler'
const DISABLED_TEMPERATURE: number = 5.0
type DisabledHolder = {
disabler : Disabler
state : string
}
export class MaxThermostat extends AHomegearItem implements HasInTopic {
private actionTopic: string
private deviceFeedbackTopic: string
private temperatureFeedbackTopic: string
private temperatureTopic: string
private temperature: number
private presetTemperatureFeedbackTopic: string
private presetTemperatureTopic: string
private presetTemperature: number
private hardDisablerMap: { [key:string]: DisabledHolder }
private hardDisabled: boolean
private commandTopic: string
static heatingMainSwitchTopic : string = 'dispatcher_ng/items/heatingMainSwitch'
private heatingMainFlag: boolean = false
// Thermostat: homegear/instance1/set/3/1/SET_TEMPERATURE
getInTopic() : string {
return this.commandTopic
}
exportItem() : ExportType|null {
return ThermostatExport(this.itemId, this.label, this.temperatureTopic, this.temperatureFeedbackTopic, this.presetTemperatureTopic, this.presetTemperatureFeedbackTopic)
}
static exportHeatingMainSwitchItem() : ExportType|null {
return HeatingMainSwitchExport(MaxThermostat.heatingMainSwitchTopic)
}
constructor(floor: string, room: string, item: string, label: string, hmId: number, hardDisablers: Disabler[]) {
super(floor, room, item, label, hmId)
this.temperatureTopic = `${this.topicFirstPart}/temperature`
this.temperatureFeedbackTopic = `${this.topicFirstPart}/temperature/feedback`
this.presetTemperatureTopic = `${this.topicFirstPart}/presetTemperature`
this.presetTemperatureFeedbackTopic = `${this.topicFirstPart}/presetTemperature/feedback`
this.deviceFeedbackTopic = `${this.deviceTopicPre}/1/SET_TEMPERATURE`
this.actionTopic = `${this.actionTopicPre}/1/SET_TEMPERATURE`
this.commandTopic = `${this.topicFirstPart}/command`
this.subscribeTopics = [
this.temperatureTopic,
this.presetTemperatureTopic,
this.deviceFeedbackTopic,
this.commandTopic,
MaxThermostat.heatingMainSwitchTopic
]
this.hardDisabled = false
this.hardDisablerMap = {}
hardDisablers.forEach((hardDisabler) => {
this.subscribeTopics.push(hardDisabler.getStateFeedbackTopic())
this.hardDisablerMap[hardDisabler.getStateFeedbackTopic()] = { disabler: hardDisabler, state: 'unknown' }
})
}
setPresetTemperature(presetTemperature: number) {
this.presetTemperature = presetTemperature
}
startFunc() : void {
mqttHandler.send(this.presetTemperatureTopic, `${this.presetTemperature}`)
}
processMessage(topic: string, payload: string) : void {
let setTemperature : boolean = false
if (topic == this.temperatureTopic) {
this.temperature = parseFloat(payload)
setTemperature = true
} else if (topic == this.commandTopic) {
if ((payload == 'ON') && this.heatingMainFlag) {
this.temperature = this.presetTemperature
setTemperature = true
} else if (payload == 'OFF') {
this.temperature = DISABLED_TEMPERATURE
setTemperature = true
} else if (payload == 'FORCE_ON') {
this.temperature = this.presetTemperature
setTemperature = true
}
} else if (topic == MaxThermostat.heatingMainSwitchTopic) {
this.heatingMainFlag = (payload == 'ON')
logger.info(`${this.itemId} heating main: ${this.heatingMainFlag}`)
if (! this.heatingMainFlag) {
this.temperature = DISABLED_TEMPERATURE
mqttHandler.send(this.temperatureFeedbackTopic, `${this.temperature}`)
mqttHandler.send(this.actionTopic, `${this.temperature}`)
}
} else if (topic == this.presetTemperatureTopic) {
this.presetTemperature = parseFloat(payload)
mqttHandler.send(this.presetTemperatureFeedbackTopic, `${this.presetTemperature}`)
} else if (topic == this.deviceFeedbackTopic) {
// this.temperature = parseFloat(payload)
setTemperature = false
} else if (topic in this.hardDisablerMap) {
this.hardDisablerMap[topic].state = this.hardDisablerMap[topic].disabler.transform(payload)
this.hardDisabled = false
Object.values(this.hardDisablerMap).forEach((w) => {
if (w.state == 'DISABLE') {
this.hardDisabled = true
}
})
setTemperature = true
}
if (setTemperature) {
if (! this.hardDisabled) {
mqttHandler.send(this.temperatureFeedbackTopic, `${this.temperature}`)
mqttHandler.send(this.actionTopic, `${this.temperature}`)
} else {
mqttHandler.send(this.temperatureFeedbackTopic, `${DISABLED_TEMPERATURE}`)
mqttHandler.send(this.actionTopic, `${DISABLED_TEMPERATURE}`)
}
}
}
}

58
src/MaxWindowContact.ts Normal file
View File

@ -0,0 +1,58 @@
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { AHomegearItem } from './AHomegearItem'
import { ContactExport, ExportType } from './Export'
import { Disabler } from './Disabler'
import { HasFeedbackTopic, HasStateAndFeedbackTopicAndLabel } from './AItem'
export class MaxWindowContact extends AHomegearItem implements Disabler, HasStateAndFeedbackTopicAndLabel {
private deviceFeedbackTopic: string
private stateFeedbackTopic: string
private stateTopic: string
private state: string
getStateFeedbackTopic(): string {
return this.stateFeedbackTopic
}
getLabel() {
return this.label
}
transform(payload: string) : string {
let res: string
if (payload == 'OPEN') {
res = 'DISABLE'
} else if (payload == 'CLOSED') {
res = 'ENABLE'
} else {
res = 'UNKNOWN'
}
return res
}
constructor(floor: string, room: string, item: string, label: string, hmId: number) {
super(floor, room, item, label, hmId)
this.stateTopic = `${this.topicFirstPart}/state`
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`
this.deviceFeedbackTopic = `${this.deviceTopicPre}/1/STATE`
this.subscribeTopics = [
this.stateTopic,
this.deviceFeedbackTopic
]
}
exportItem() : ExportType|null {
return ContactExport(this.itemId, this.label, this.stateFeedbackTopic)
}
processMessage(topic: string, payload: string) : void {
if (payload == 'true') {
this.state = 'OPEN'
} else {
this.state = 'CLOSED'
}
mqttHandler.send(this.stateFeedbackTopic, this.state)
}
}

View File

@ -2,10 +2,12 @@ import * as logger from './log'
import * as Mqtt from 'mqtt'
import * as fs from 'fs'
import * as config from './config'
import { IClientPublishOptions } from 'mqtt';
export type TopicCallbackFunc = (topic: string, payload: string) => void
export type StartCallbackFunc = () => void
export interface TopicHandler {
topic: string,
@ -13,14 +15,17 @@ export interface TopicHandler {
}
class MqttHandler {
private mqttClient: Mqtt.Client
private mqttOptions: Mqtt.IClientOptions = {}
private mqttBrokerUrl: string
private topicHandlers: TopicHandler[]
private startCallbacks: StartCallbackFunc[]
constructor() {
this.mqttBrokerUrl = config.dict.brokerUrl
this.mqttOptions.clientId = 'dispatcher'
if (config.dict.brokerUser && config.dict.brokerPass) {
this.mqttOptions.username = config.dict.brokerUser
this.mqttOptions.password = config.dict.brokerPass
@ -32,15 +37,17 @@ class MqttHandler {
}
this.topicHandlers = []
this.startCallbacks = []
logger.info("MqttHandler constructed")
}
register(topics: string[], cb: TopicCallbackFunc) : void {
register(topics: string[], cb: TopicCallbackFunc, startCb: StartCallbackFunc) : void {
topics.forEach((topic) => {
this.topicHandlers.push({topic: topic, callback: cb})
logger.info(`Callback registered for ${topic}`)
})
this.startCallbacks.push(startCb)
}
exec() : void {
@ -58,13 +65,17 @@ class MqttHandler {
logger.info(`${topicHandler.topic} subscribed`)
})
logger.info('MQTT connection established')
this.startCallbacks.forEach((cb) => {
cb()
logger.info("started")
})
})
this.mqttClient.on('message', (topic: string, payload: Buffer, packet : Mqtt.IPublishPacket): void => {
if (! packet.retain) {
// if (! packet.retain) {
let payloadStr : string = payload.toString('UTF-8')
logger.info(`Message received on topic ${topic}: ${payload}`)
// logger.info(`Message received on topic ${topic}: ${payload}`)
this.processMessage(topic, payloadStr)
}
// }
})
}
@ -90,17 +101,18 @@ class MqttHandler {
}
send(topic: string, payload: string, internalFirst: boolean = false) : void {
let sent = false
if (internalFirst) {
logger.info(`Try internal sending: ${topic}`)
sent = this.processMessage(topic, payload)
}
if (! sent) {
logger.info(`External sending required: ${topic}`)
this.mqttClient.publish(topic, payload)
} else {
logger.info(`Internally delivered: ${topic}`)
}
//let sent = false
//if (internalFirst) {
// logger.info(`Try internal sending: ${topic}`)
// sent = this.processMessage(topic, payload)
//}
//if (! sent) {
logger.info(`External sending required: ${topic} ${payload}`)
let options : IClientPublishOptions = { retain: true, qos: 0 }
this.mqttClient.publish(topic, payload, options)
//} else {
// logger.info(`Internally delivered: ${topic}`)
//}
}
}

56
src/MySwitchThing.ts Normal file
View File

@ -0,0 +1,56 @@
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { AItem } from './AItem'
export class MySwitchSingleItem {
private actionTopic: string
constructor(actionTopic: string) {
this.actionTopic = actionTopic
}
processMessage(topic: string, payload: string) {
switch(payload) {
case 'PRESS_SHORT':
mqttHandler.send(this.actionTopic, 'SHORT', true)
break
case 'PRESS_LONG_START':
case 'PRESS_LONG_CONT':
mqttHandler.send(this.actionTopic, 'LONG_HOLD', true)
break
case 'PRESS_LONG_END':
mqttHandler.send(this.actionTopic, 'LONG_END', true)
break
default:
logger.warn(`HM4BSI: no handling available for ${topic}`)
break
}
}
}
export class MySwitchThing extends AItem {
private itemObjs: MySwitchSingleItem[]
constructor(floor: string, room: string, item: string, itemObjs: MySwitchSingleItem[]) {
super(floor, room, item, '')
this.itemObjs = itemObjs
if (this.itemObjs.length != 3) {
throw new Error('itemObjs for MySwitchThing must have three elements')
}
this.subscribeTopics = [
`${this.topicFirstPart}/#`
]
}
processMessage(topic: string, payload: string) {
logger.info(`MyT: ${topic}, ${payload}`)
let buttonIdx = parseInt(topic.substring(this.topicFirstPart.length+1))
if (buttonIdx >= 1 && buttonIdx <= 3) {
this.itemObjs[buttonIdx-1].processMessage('', payload)
} else {
logger.warn(`MyT: no handling available for ${topic}, ${buttonIdx}`)
}
}
}

View File

@ -1,28 +0,0 @@
let mqtt = require('./mqttHandler');
let logger = require('./log');
class Switch {
}
class RelayBox {
constructor(switches) {
this.switches = switches;
}
start() {
mqtt.register(this.subscribeTopics, (topic, payload) => {
logger.info(`item ${this.itemId}: ${topic}, ${payload}`)
this.processMessage(topic, payload);
});
}
}
module.exports = {
RelayBox,
Switch
};

82
src/RelayBox.ts Normal file
View File

@ -0,0 +1,82 @@
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { AItem } from './AItem'
import { RelayBoxExport, ExportType } from './Export'
export class RelayBoxThing extends AItem {
private itemNames: string[]
private readonly deviceCommandTopic: string
private readonly deviceStatusTopic: string
private readonly stateTopicPre: string
private readonly feedbackTopicPre: string
private readonly conflictTopicPre: string
private status : any
private switchStates : string
private oldSwitchStates : string
constructor(floor: string, room: string, item: string, deviceCommandTopic: string,
deviceStatusTopic: string, itemNames: string[]) {
super(floor, room, item, '')
this.itemNames = itemNames
this.deviceCommandTopic = deviceCommandTopic
this.deviceStatusTopic = deviceStatusTopic
this.stateTopicPre = `${this.topicFirstPart}/state`
this.feedbackTopicPre = `${this.topicFirstPart}/feedback`
this.conflictTopicPre = `${this.topicFirstPart}/conflict`
this.subscribeTopics = [
`${this.deviceStatusTopic}`,
`${this.stateTopicPre}/#`
]
this.oldSwitchStates = ''
}
exportItem() : ExportType|null {
return RelayBoxExport(this.itemId, this.stateTopicPre, this.feedbackTopicPre, this.conflictTopicPre, this.itemNames)
}
processMessage(topic: string, payload: string) {
// logger.info(`RT: ${topic}, ${payload}`)
if (topic == this.deviceStatusTopic) {
// logger.info(`RT: status received`)
this.status = JSON.parse(payload)
let statusParsed = JSON.stringify(this.status)
this.switchStates = JSON.stringify(this.status.data.switchStates)
if (this.switchStates != this.oldSwitchStates) {
this.oldSwitchStates = this.switchStates
logger.info(`RT: status parsed: ${statusParsed}`)
logger.info(`RT: device: ${this.status.metadata.device}`)
logger.info(`RT: uptime: ${this.status.data.uptime}`)
for (let i : number = 0; i < this.itemNames.length; i ++) {
if (this.status.data.switchStates[i].feedbackState == '0') {
mqttHandler.send(`${this.feedbackTopicPre}/${i}`, 'OFF')
} else {
mqttHandler.send(`${this.feedbackTopicPre}/${i}`, 'ON')
}
if (this.status.data.switchStates[i].stateConflict == '0') {
mqttHandler.send(`${this.conflictTopicPre}/${i}`, 'CLEAR')
} else {
mqttHandler.send(`${this.conflictTopicPre}/${i}`, 'CONFLICT')
}
}
}
} else {
logger.info(`RT: ${topic}, ${payload}`)
let thingRelatedPart = topic.substring(this.stateTopicPre.length+1)
let itemIdx = parseInt(thingRelatedPart)
logger.info(`RT: pre: ${this.stateTopicPre}, thingRelatedPart: ${thingRelatedPart}, itemIdx: ${itemIdx}`)
if (itemIdx >= 0 && itemIdx < this.itemNames.length) {
if (payload == 'ON') {
mqttHandler.send(this.deviceCommandTopic, `switch ${itemIdx} on`)
} else {
mqttHandler.send(this.deviceCommandTopic, `switch ${itemIdx} off`)
}
} else {
logger.warn(`RT: no handling available for ${topic}`)
}
}
}
}

113
src/Scene.ts Normal file
View File

@ -0,0 +1,113 @@
import { AItem, HasStateAndFeedbackTopic, HasStateAndFeedbackTopicAndLabelAndRoom } from './AItem'
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { ExportType, SwitchExport } from './Export'
export class LightScene extends AItem implements HasStateAndFeedbackTopicAndLabelAndRoom {
private onFeedbackTopics: string[]
private offFeedbackTopics: string[]
private onTopics: string[]
private offTopics: string[]
private onFeedbackMap: { [key:string]:string }
private offFeedbackMap: { [key:string]:string }
private state: string
private stateFeedbackTopic: string
private stateTopic: string
private offItems: HasStateAndFeedbackTopic[]
private onItems: HasStateAndFeedbackTopic[]
private myLastFeedbackState: string
getLabel() {
return this.label
}
getRoom() {
return this.room
}
getStateTopic() {
return this.stateTopic
}
getStateFeedbackTopic() {
return this.stateFeedbackTopic
}
constructor(floor: string, room: string, item: string, label: string = '',
onItems: HasStateAndFeedbackTopic[], offItems: HasStateAndFeedbackTopic[]) {
super(floor, room, item, label)
this.onItems = onItems
this.offItems = offItems
this.stateTopic = `${this.topicFirstPart}/state`
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`
this.subscribeTopics = []
this.subscribeTopics.push(this.stateTopic)
this.onFeedbackTopics = []
this.onTopics = []
this.onFeedbackMap = {}
this.onItems.forEach((item: HasStateAndFeedbackTopic) => {
this.subscribeTopics.push(item.getStateFeedbackTopic())
this.onFeedbackTopics.push(item.getStateFeedbackTopic())
this.onTopics.push(item.getStateTopic())
this.onFeedbackMap[item.getStateFeedbackTopic()] = '-'
})
this.offFeedbackTopics = []
this.offTopics = []
this.offFeedbackMap = {}
this.offItems.forEach((item: HasStateAndFeedbackTopic) => {
this.subscribeTopics.push(item.getStateFeedbackTopic())
this.offFeedbackTopics.push(item.getStateFeedbackTopic())
this.offTopics.push(item.getStateTopic())
this.offFeedbackMap[item.getStateFeedbackTopic()] = '-'
})
this.state = 'OFF'
this.myLastFeedbackState = '-'
}
exportItem() : ExportType|null {
return SwitchExport(this.itemId, this.label, this.stateTopic, this.stateFeedbackTopic, 'bulb')
}
processMessage(topic: string, payload: string) : void {
if (topic == this.stateTopic) {
this.state = payload
if (this.state == 'ON') {
this.onTopics.forEach((topic2: string) => {
mqttHandler.send(topic2, 'ON')
})
this.offTopics.forEach((topic2: string) => {
mqttHandler.send(topic2, 'OFF')
})
} else {
this.onTopics.forEach((topic2: string) => {
mqttHandler.send(topic2, 'OFF')
})
this.offTopics.forEach((topic2: string) => {
mqttHandler.send(topic2, 'OFF')
})
}
} else if (this.onFeedbackTopics.some((x) => { return x == topic })) {
let feedbackState = payload
this.onFeedbackMap[topic] = feedbackState
} else if (this.offFeedbackTopics.some((x) => { return x == topic })) {
let feedbackState = payload
this.offFeedbackMap[topic] = feedbackState
}
let myFeedbackState = 'ON'
Object.values(this.onFeedbackMap).forEach((v: string) => {
if (v != 'ON') {
myFeedbackState = 'OFF'
}
})
Object.values(this.offFeedbackMap).forEach((v: string) => {
if (v != 'OFF') {
myFeedbackState = 'OFF'
}
})
if (myFeedbackState != this.myLastFeedbackState) {
mqttHandler.send(this.stateFeedbackTopic, myFeedbackState)
this.myLastFeedbackState = myFeedbackState
}
}
}

View File

@ -0,0 +1,70 @@
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { AItem } from './AItem'
import { SwitchExport, ExportType } from './Export'
import { HasStateAndFeedbackTopicAndLabelAndRoom } from './AItem';
export class SimpleTopicSwitchItem extends AItem implements HasStateAndFeedbackTopicAndLabelAndRoom {
private oldState: string|undefined
private state: string
private actionTopic: string
private deviceFeedbackTopic: string
private stateFeedbackTopic: string
private stateTopic: string
private type: string
private partId: number
getLabel(): string {
return this.label
}
getRoom() : string {
return this.room
}
getStateTopic() : string {
return this.stateTopic
}
getStateFeedbackTopic() : string {
return this.stateFeedbackTopic
}
getState() : string {
return this.state
}
constructor(floor: string, room: string, item: string, label: string, actionTopic: string) {
super(floor, room, item, label)
this.stateTopic = `${this.topicFirstPart}/state`
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`
this.actionTopic = actionTopic
this.subscribeTopics = [
this.stateTopic
]
this.state = 'OFF'
this.oldState = undefined
}
exportItem() : ExportType|null {
return SwitchExport(this.itemId, this.label, this.stateTopic, this.stateFeedbackTopic, this.type)
}
processMessage(topic: string, payload: string) : void {
switch (topic) {
case this.stateTopic:
this.state = payload
mqttHandler.send(this.stateFeedbackTopic, this.state)
if (this.state != this.oldState) {
if (this.state == 'ON') {
mqttHandler.send(this.actionTopic, 'ON')
} else {
mqttHandler.send(this.actionTopic, 'OFF')
}
this.oldState = this.state
}
break
}
this.emit('somethingChanged')
}
}

28
src/SwitchOffAdaptor.ts Normal file
View File

@ -0,0 +1,28 @@
import { AItem, HasInTopic } from './AItem'
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
export class SwitchOffAdaptor extends AItem implements HasInTopic {
private inTopic: string
private actionStateTopic: string
constructor(floor: string, room: string, item: string) {
super(floor, room, item)
this.actionStateTopic = `${this.topicFirstPart}/state`
this.inTopic = `${this.topicFirstPart}/in`
this.subscribeTopics = [ this.inTopic ]
}
getInTopic() : string {
return this.inTopic
}
processMessage(topic: string, payload: string) : void {
if ((topic == this.inTopic) && (payload == 'SHORT')) {
mqttHandler.send(this.actionStateTopic, 'OFF', true)
}
}
}

View File

@ -0,0 +1,58 @@
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { AItem } from './AItem'
export class TouchSwitchButtonSingleItem {
private actionTopic: string
constructor(actionTopic: string) {
this.actionTopic = actionTopic
}
processMessage(topic: string, payload: string) {
switch(payload) {
case 'SHORT':
mqttHandler.send(this.actionTopic, 'SHORT', true)
break
case 'LONG_BEGIN':
case 'LONG_CONT':
mqttHandler.send(this.actionTopic, 'LONG_HOLD', true)
break
case 'LONG_END':
mqttHandler.send(this.actionTopic, 'LONG_END', true)
break
default:
logger.warn(`TWBSI: no handling available for ${topic}`)
break
}
}
}
export class TouchSwitchMultiButtonThing extends AItem {
private itemObjs: TouchSwitchButtonSingleItem[]
private readonly deviceTopicPre: string
constructor(floor: string, room: string, item: string, itemObjs: TouchSwitchButtonSingleItem[]) {
super(floor, room, item, '')
this.itemObjs = itemObjs
this.deviceTopicPre = `IoT/TouchSwitch/${this.floor}/${this.room}/${this.item}`
this.subscribeTopics = [
`${this.deviceTopicPre}/#`
]
}
processMessage(topic: string, payload: string) {
logger.info(`TSMBT: ${topic}, ${payload}`)
let buttonRelatedPart = topic.substring(this.deviceTopicPre.length+1)
let buttonIdx = parseInt(buttonRelatedPart)
logger.info(`TSMBT: pre: ${this.deviceTopicPre}, buttonRelatedPart: ${buttonRelatedPart}, buttonIdx: ${buttonIdx}`)
if (buttonIdx >= 1 && buttonIdx <= this.itemObjs.length) {
this.itemObjs[buttonIdx-1].processMessage('-', payload)
} else {
logger.warn(`TSMBT: no handling available for ${topic}`)
}
}
}

90
src/TwoLedSignal.ts Normal file
View File

@ -0,0 +1,90 @@
import { AItem, HasFeedbackTopic } from './AItem'
import { mqttHandler } from './MqttDispatcher'
import * as logger from './log'
enum SignalState {
SIGNAL_RED,
SIGNAL_GREEN,
SIGNAL_UNKNOWN,
}
class SignalItem {
private item: HasFeedbackTopic
private signalState: SignalState
private redToken: string
private greenToken: string
constructor(item: HasFeedbackTopic, redToken: string, greenToken: string) {
this.item = item
this.signalState = SignalState.SIGNAL_UNKNOWN
this.redToken = redToken
this.greenToken = greenToken
}
getSignalState() : SignalState {
return this.signalState
}
processMessage(topic: string, payload: string): void {
if (topic == this.item.getStateFeedbackTopic()) {
logger.info(`${topic}, ${payload}`)
if (payload == this.greenToken) {
this.signalState = SignalState.SIGNAL_GREEN
} else if (payload == this.redToken) {
this.signalState = SignalState.SIGNAL_RED
} else {
this.signalState = SignalState.SIGNAL_UNKNOWN
}
// logger.info(`DBG: SignalItem: ${topic}, ${payload}, ${this.signalState}`)
}
}
}
export class TwoLedSignal extends AItem {
private led1Items: SignalItem[] = []
private led2Items: SignalItem[] = []
constructor(floor: string, room: string, item: string, label: string,
led1Items: HasFeedbackTopic[], led1GreenToken: string, led1RedToken: string,
led2Items: HasFeedbackTopic[], led2GreenToken: string, led2RedToken: string) {
super(floor, room, item, label)
this.subscribeTopics = []
led1Items.forEach((item: HasFeedbackTopic) => {
this.led1Items.push(new SignalItem(item, led1RedToken, led1GreenToken))
this.subscribeTopics.push(item.getStateFeedbackTopic())
})
led2Items.forEach((item: HasFeedbackTopic) => {
this.led2Items.push(new SignalItem(item, led2RedToken, led2GreenToken))
this.subscribeTopics.push(item.getStateFeedbackTopic())
})
}
processMessage(topic: string, payload: string) : void {
let reds : number = 0
const RED_VALUES : SignalState[] = [SignalState.SIGNAL_RED, SignalState.SIGNAL_UNKNOWN]
this.led1Items.forEach((item: SignalItem) => {
item.processMessage(topic, payload)
if (RED_VALUES.indexOf(item.getSignalState()) != -1) {
reds++
}
// logger.info(`DBG: TwoLedSignal ${item.getSignalState()}, ${reds}`)
})
let msg = (reds > 0) ? "red" : "green"
mqttHandler.send(`${this.topicFirstPart}/led1`, msg)
reds = 0
this.led2Items.forEach((item: SignalItem) => {
item.processMessage(topic, payload)
if (RED_VALUES.indexOf(item.getSignalState()) != -1) {
reds++
}
// logger.info(`DBG: TwoLedSignal ${item.getSignalState()}, ${reds}`)
})
msg = (reds > 0) ? "red" : "green"
mqttHandler.send(`${this.topicFirstPart}/led2`, msg)
}
}

60
src/UrlSwitchItem.ts Normal file
View File

@ -0,0 +1,60 @@
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { AItem, HasStateAndFeedbackTopic } from './AItem'
import { SwitchExport, ExportType } from './Export'
import * as http from 'http'
export class UrlSwitchItem extends AItem implements HasStateAndFeedbackTopic {
private offUrl: string
private onUrl: string
private oldState: string|undefined
private state: string
private actionTopic: string
private stateFeedbackTopic: string
private stateTopic: string
private type: string
getStateTopic() : string {
return this.stateTopic
}
getStateFeedbackTopic() : string {
return this.stateFeedbackTopic
}
constructor(floor: string, room: string, item: string, label: string, onUrl: string, offUrl: string, type: string = 'bulb') {
super(floor, room, item, label)
this.stateTopic = `${this.topicFirstPart}/state`
this.subscribeTopics = [this.stateTopic]
this.stateFeedbackTopic = `${this.topicFirstPart}/state/feedback`
this.actionTopic = 'IoT/Mqtt433Gateway/Message'
this.state = 'OFF'
this.oldState = undefined
this.onUrl = onUrl
this.offUrl = offUrl
this.type = type
}
exportItem() : ExportType|null {
return SwitchExport(this.itemId, this.label, this.stateTopic, this.stateFeedbackTopic, this.type)
}
processMessage(topic: string, payload: string) {
this.state = payload;
mqttHandler.send(this.stateFeedbackTopic, this.state);
if (this.state != this.oldState) {
try {
if (this.state == 'ON') {
http.get(this.onUrl,)
} else {
http.get(this.offUrl)
}
this.oldState = this.state;
} catch {
logger.error(`Failed to handle ${this.onUrl} or ${this.offUrl}`)
}
}
}
}

View File

@ -4,219 +4,632 @@ import * as config from './config'
import * as logger from './log'
import { mqttHandler } from './MqttDispatcher'
import { AItem } from './AItem'
import { AItem, HasInTopic, HasFeedbackTopic, HasStateAndFeedbackTopic, HasStateAndFeedbackTopicAndLabelAndRoom, HasStateAndFeedbackTopicAndLabel } from './AItem'
import { HomekitExportType, ExportType } from './Export'
import { M433SwitchItem } from './M433SwitchItem'
import { HomematicFourButtonThing, HomematicFourButtonSingleItem } from './HomematicFourButtonThing'
import { DimmerAdaptor } from './DimmerAdaptor'
import { TimerAdaptor } from './TimerAdaptor'
import { SwitchOffAdaptor } from './SwitchOffAdaptor'
import { HomematicDimmerItem } from './HomematicDimmerItem'
import { HomematicSwitchItem } from './HomematicSwitchItem'
import { Forwarder } from './Forwarder'
import { LightScene } from './Scene'
import { MaxEcoSwitch } from './MaxEcoSwitch'
import { MaxThermostat } from './MaxThermostat'
import { MaxWindowContact } from './MaxWindowContact'
import { UrlSwitchItem } from './UrlSwitchItem'
import { Cron } from './Cron'
import { HueColorBulbItem } from './HueColorBulbItem'
import { TouchSwitchMultiButtonThing, TouchSwitchButtonSingleItem } from './TouchSwitchMultiButtonThing'
import { RelayBoxThing } from './RelayBox'
import { HeatingScene } from './HeatingScene'
import { TwoLedSignal } from './TwoLedSignal'
import { MySwitchThing, MySwitchSingleItem } from './MySwitchThing'
import { SimpleTopicSwitchItem } from './SimpleTopicSwitchItem'
logger.info("Dispatcher starting")
let allLabeledItems : Array<AItem> = new Array<AItem>()
let allLabeledItems : Array<AItem> = new Array()
let allThermostatItems : Array<HasInTopic> = new Array()
let allWindows : Array<HasFeedbackTopic> = new Array()
let allRelevantLights: Array<HasFeedbackTopic> = new Array()
let allLights: Array<HasStateAndFeedbackTopicAndLabelAndRoom> = new Array();
let allLightScenes: Array<HasStateAndFeedbackTopicAndLabelAndRoom> = new Array();
// Anna -----------------------------------------------------------------------------------------------------
// Anna Aquarium 14665044 24 1 14665041 24 1
let aquariumLight = new M433SwitchItem('1st', 'Anna', 'AquariumLight', 'Aquariumlicht', '14665044 24 1', '14665041 24 1')
let aquariumLight = new M433SwitchItem('1st', 'Anna', 'AquariumLight', 'Aquarium', '14665044 24 1', '14665041 24 1')
aquariumLight.start()
allLabeledItems.push(aquariumLight)
let aquariumLightCron = new Cron('aquariumLightCron', aquariumLight, [
{cronTime: '00 00 07 * * 1-5', output: 'ON'},
{cronTime: '00 00 09 * * 6,0', output: 'ON'},
{cronTime: '00 00 13 * * *', output: 'OFF'},
{cronTime: '00 00 14 * * *', output: 'ON'},
{cronTime: '00 00 22 * * *', output: 'OFF'}
])
aquariumLightCron.start()
// Anna Bett 14668116 24 1 14668113 24 1
let annaBedLight = new M433SwitchItem('1st', 'Anna', 'BedLight', 'Bettlicht Anna', '14668116 24 1', '14668113 24 1')
let annaBedLight = new M433SwitchItem('1st', 'Anna', 'BedLight', 'Bettlicht', '14668116 24 1', '14668113 24 1')
annaBedLight.start()
allLabeledItems.push(annaBedLight)
allRelevantLights.push(annaBedLight)
allLights.push(annaBedLight)
let windowContactAnna1st = new MaxWindowContact('1st', 'Anna', 'WindowContact', 'Anna', 20)
windowContactAnna1st.start()
allLabeledItems.push(windowContactAnna1st)
allWindows.push(windowContactAnna1st)
let thermostatAnna1st = new MaxThermostat('1st', 'Anna', 'Thermostat', 'Thermostat Anna', 21, [windowContactAnna1st])
thermostatAnna1st.start()
thermostatAnna1st.setPresetTemperature(21.0)
allLabeledItems.push(thermostatAnna1st)
allThermostatItems.push(thermostatAnna1st)
let thermostatAnna1stCron = new Cron('thermostatAnna1stCron', thermostatAnna1st, [
{cronTime: '00 05 06 * * *', output: 'ON'},
{cronTime: '00 05 08 * * 1-5', output: 'OFF'},
{cronTime: '00 05 16 * * 1', output: 'ON'},
{cronTime: '00 05 14 * * 2', output: 'ON'},
{cronTime: '00 05 14 * * 3', output: 'ON'},
{cronTime: '00 05 16 * * 4', output: 'ON'},
{cronTime: '00 05 14 * * 5', output: 'ON'},
{cronTime: '00 58 23 * * *', output: 'OFF'}
])
thermostatAnna1stCron.start()
// Matthias -------------------------------------------------------------------------------------------------
// Matthias Stehlampen 7 24 1 6 24 1
let matthiasStandLights = new M433SwitchItem('1st', 'Matthias', 'Stehlampen Matthias', 'StandLight', '7 24 1', '6 24 1')
let matthiasStandLights = new M433SwitchItem('1st', 'Matthias', 'StandLight', 'Stehlampen', '7 24 1', '6 24 1')
matthiasStandLights.start()
allLabeledItems.push(matthiasStandLights)
allRelevantLights.push(matthiasStandLights)
allLights.push(matthiasStandLights)
// Matthias Bett 15 24 1 14 24 1
let matthiasBedLight = new M433SwitchItem('1st', 'Matthias', 'BedLight', 'Bettlicht Matthias', '15 24 1', '14 24 1')
let matthiasBedLight = new M433SwitchItem('1st', 'Matthias', 'BedLight', 'Bettlicht', '15 24 1', '14 24 1')
matthiasBedLight.start()
allLabeledItems.push(matthiasBedLight)
allRelevantLights.push(matthiasBedLight)
allLights.push(matthiasBedLight)
// Matthias Lautsprecher 11 24 1 10 24 1
let matthiasSpeaker = new M433SwitchItem('1st', 'Matthias', 'Speaker', 'Lautsprecher Matthias', '11 24 1', '10 24 1', 'outlet')
let matthiasSpeaker = new M433SwitchItem('1st', 'Matthias', 'Speaker', 'Lautsprecher', '11 24 1', '10 24 1', 'outlet')
matthiasSpeaker.start()
allLabeledItems.push(matthiasSpeaker)
allRelevantLights.push(matthiasSpeaker)
allLights.push(matthiasSpeaker)
let windowContactMatthias = new MaxWindowContact('1st', 'Matthias', 'WindowContact', 'Matthias', 24)
windowContactMatthias.start()
allLabeledItems.push(windowContactMatthias)
allWindows.push(windowContactMatthias)
// Esszimmer ------------------------------------------------------------------------------------------------
// Esszimmer kleine Lampe 69653 24 1 69652 24 1
let diningRoomSmallLight = new M433SwitchItem('Gnd', 'DiningRoom', 'SmallLight', 'kleine Lampe Esszimmer', '69653 24 1', '69652 24 1')
let diningRoomSmallLight = new M433SwitchItem('Gnd', 'Esszimmer', 'SmallLight', 'kleine Lampe', '69653 24 1', '69652 24 1')
diningRoomSmallLight.start()
allLabeledItems.push(diningRoomSmallLight)
allRelevantLights.push(diningRoomSmallLight)
allLights.push(diningRoomSmallLight)
// Esszimmer Stehlampe 86037 24 1 86036 24 1
let diningRoomStandLight = new M433SwitchItem('Gnd', 'DiningRoom', 'StandLight', 'Stehlampe Esszimmer', '86037 24 1', '86036 24 1')
let diningRoomStandLight = new M433SwitchItem('Gnd', 'Esszimmer', 'StandLight', 'Stehlampe', '86037 24 1', '86036 24 1')
diningRoomStandLight.start()
allLabeledItems.push(diningRoomStandLight)
allRelevantLights.push(diningRoomStandLight)
allLights.push(diningRoomStandLight)
// Esszimmer Schranklicht 65813 24 1 65812 24 1
let diningRoomCupboardLight = new M433SwitchItem('Gnd', 'DiningRoom', 'CupboardLight', 'Schranklicht Esszimmer', '65813 24 1', '65812 24 1')
let diningRoomCupboardLight = new M433SwitchItem('Gnd', 'Esszimmer', 'CupboardLight', 'Schranklicht', '65813 24 1', '65812 24 1')
diningRoomCupboardLight.start()
allLabeledItems.push(diningRoomCupboardLight)
allRelevantLights.push(diningRoomCupboardLight)
allLights.push(diningRoomCupboardLight)
// Esszimmer Regallicht
let diningRoomShelfLight = new SimpleTopicSwitchItem('Gnd', 'Esszimmer', 'ShelfLight', 'Regallicht', 'IoT/WifiRelay1/State')
diningRoomShelfLight.start()
allLabeledItems.push(diningRoomShelfLight)
allRelevantLights.push(diningRoomShelfLight)
allLights.push(diningRoomShelfLight)
let diningRoomNaehkaestchenLight = new HueColorBulbItem('Gnd', 'Esszimmer', 'NaehkaestchenLight', 'Nähkästchen', 15)
diningRoomNaehkaestchenLight.start()
allLabeledItems.push(diningRoomNaehkaestchenLight)
allRelevantLights.push(diningRoomNaehkaestchenLight)
allLights.push(diningRoomNaehkaestchenLight)
let windowContactDiningRoom1 = new MaxWindowContact('Gnd', 'Esszimmer', 'WindowContact1', 'Essz. links', 26)
windowContactDiningRoom1.start()
allLabeledItems.push(windowContactDiningRoom1)
allWindows.push(windowContactDiningRoom1)
let windowContactDiningRoom2 = new MaxWindowContact('Gnd', 'Esszimmer', 'WindowContact2', 'Essz. rechts', 27)
windowContactDiningRoom2.start()
allLabeledItems.push(windowContactDiningRoom2)
allWindows.push(windowContactDiningRoom2)
let thermostatDiningRoom = new MaxThermostat('Gnd', 'Esszimmer', 'Thermostat', 'Thermostat Esszimmer', 31, [windowContactDiningRoom1, windowContactDiningRoom2])
thermostatDiningRoom.start()
thermostatDiningRoom.setPresetTemperature(21.0)
allLabeledItems.push(thermostatDiningRoom)
allThermostatItems.push(thermostatDiningRoom)
// Wohnzimmer -----------------------------------------------------------------------------------------------
// Wohnzimmer grosse Lampe 65557 24 1 65556 24 1
let livingRoomLargeLight = new M433SwitchItem('Gnd', 'LivingRoom', 'LargeLight', 'große Lampe Wohnzimmer', '65557 24 1', '65556 24 1')
let livingRoomLargeLight = new M433SwitchItem('Gnd', 'Wohnzimmer', 'LargeLight', 'große Lampe', '65557 24 1', '65556 24 1')
livingRoomLargeLight.start()
allLabeledItems.push(livingRoomLargeLight)
allRelevantLights.push(livingRoomLargeLight)
allLights.push(livingRoomLargeLight)
// Wohnzimmer kleine Lampe 87061 24 1 87060 24 1
let livingRoomSmallLight = new M433SwitchItem('Gnd', 'LivingRoom', 'SmallLight', 'kleine Lampe Wohnzimmer', '87061 24 1', '87060 24 1')
let livingRoomSmallLight = new M433SwitchItem('Gnd', 'Wohnzimmer', 'SmallLight', 'kleine Lampe', '87061 24 1', '87060 24 1')
livingRoomSmallLight.start()
allLabeledItems.push(livingRoomSmallLight)
allRelevantLights.push(livingRoomSmallLight)
allLights.push(livingRoomSmallLight)
// Wohnzimmer Sterne 69909 24 1 69908 24 1
let livingRoomStars = new M433SwitchItem('Gnd', 'LivingRoom', 'Stars', 'Sterne Wohnzimmer', '69909 24 1', '69908 24 1')
let livingRoomStars = new M433SwitchItem('Gnd', 'Wohnzimmer', 'Stars', 'Sterne', '69909 24 1', '69908 24 1')
livingRoomStars.start()
allLabeledItems.push(livingRoomStars)
allRelevantLights.push(livingRoomStars)
allLights.push(livingRoomStars)
// Wohnzimmer kleine Stehlampe 81941 24 1 81940 24 1
let livingRoomStandLight = new M433SwitchItem('Gnd', 'LivingRoom', 'StandLight', 'Stehlampe Wohnzimmer', '81941 24 1', '81940 24 1')
let livingRoomStandLight = new M433SwitchItem('Gnd', 'Wohnzimmer', 'StandLight', 'Stehlampe', '81941 24 1', '81940 24 1')
livingRoomStandLight.start()
allLabeledItems.push(livingRoomStandLight)
allRelevantLights.push(livingRoomStandLight)
allLights.push(livingRoomStandLight)
let windowContactLivingRoom1 = new MaxWindowContact('Gnd', 'Wohnzimmer', 'WindowContact1', 'Wohnz. rechts', 28)
windowContactLivingRoom1.start()
allLabeledItems.push(windowContactLivingRoom1)
allWindows.push(windowContactLivingRoom1)
let windowContactLivingRoom2 = new MaxWindowContact('Gnd', 'Wohnzimmer', 'WindowContact2', 'Wohnz. links', 29)
windowContactLivingRoom2.start()
allLabeledItems.push(windowContactLivingRoom2)
allWindows.push(windowContactLivingRoom2)
let thermostatLivingRoom = new MaxThermostat('Gnd', 'Wohnzimmer', 'Thermostat', 'Thermostat Wohnzimmer', 30, [windowContactLivingRoom1, windowContactLivingRoom2])
thermostatLivingRoom.start()
thermostatLivingRoom.setPresetTemperature(21.0)
allLabeledItems.push(thermostatLivingRoom)
allThermostatItems.push(thermostatLivingRoom)
// Flur -----------------------------------------------------------------------------------------------------
// Flur Schreibtisch 83221 24 1 83220 24 1
let hallwayDeskLight = new M433SwitchItem('Gnd', 'Hallway', 'DeskLight', 'Schreibtischlampe Flur', '83221 24 1', '83220 24 1')
let hallwayDeskLight = new M433SwitchItem('Gnd', 'Flur', 'DeskLight', 'Schreibtischlampe', '83221 24 1', '83220 24 1')
hallwayDeskLight.start()
allLabeledItems.push(hallwayDeskLight)
allRelevantLights.push(hallwayDeskLight)
allLights.push(hallwayDeskLight)
// Flur Stehlampe 8704914 24 5 8793154 24 5
let hallwayStandLight = new M433SwitchItem('Gnd', 'Hallway', 'StandLight', 'Stehlampe Flur', '8704914 24 5', '8793154 24 5')
let hallwayStandLight = new M433SwitchItem('Gnd', 'Flur', 'StandLight', 'Stehlampe', '8704914 24 5', '8793154 24 5')
hallwayStandLight.start()
allLabeledItems.push(hallwayStandLight)
allRelevantLights.push(hallwayStandLight)
allLights.push(hallwayStandLight)
// Flur Schranklicht 66581 24 1 66580 24 1
let hallwayWardrobeLight = new M433SwitchItem('Gnd', 'Hallway', 'WardrobeLight', 'Schranklicht Flur', '66581 24 1', '66580 24 1')
let hallwayWardrobeLight = new M433SwitchItem('Gnd', 'Flur', 'WardrobeLight', 'Schranklicht', '66581 24 1', '66580 24 1')
hallwayWardrobeLight.start()
allLabeledItems.push(hallwayWardrobeLight)
allRelevantLights.push(hallwayWardrobeLight)
allLights.push(hallwayWardrobeLight)
let windowContactHallway = new MaxWindowContact('Gnd', 'Flur', 'WindowContact', 'Flur', 25)
windowContactHallway.start()
allLabeledItems.push(windowContactHallway)
allWindows.push(windowContactHallway)
let thermostatHallway1 = new MaxThermostat('Gnd', 'Flur', 'Thermostat1', 'Thermostat Flur vorne', 32, [])
thermostatHallway1.start()
thermostatHallway1.setPresetTemperature(19.0)
allLabeledItems.push(thermostatHallway1)
allThermostatItems.push(thermostatHallway1)
let thermostatHallway2 = new MaxThermostat('Gnd', 'Flur', 'Thermostat2', 'Thermostat Flur hinten', 33, [])
thermostatHallway2.start()
thermostatHallway2.setPresetTemperature(5.0)
allLabeledItems.push(thermostatHallway2)
allThermostatItems.push(thermostatHallway2)
// Küche ----------------------------------------------------------------------------------------------------
// Küche Fensterbank 66837 24 1 66836 24 1
let kitchenWindowLight = new M433SwitchItem('Gnd', 'Kitchen', 'WindowLight', 'Fensterbanklicht Küche', '66837 24 1', '66836 24 1')
let kitchenWindowLight = new M433SwitchItem('Gnd', 'Kueche', 'WindowLight', 'Fensterbanklicht', '66837 24 1', '66836 24 1')
kitchenWindowLight.start()
allLabeledItems.push(kitchenWindowLight)
allRelevantLights.push(kitchenWindowLight)
allLights.push(kitchenWindowLight)
// Küche Deckenlampe 82197 24 1 82196 24 1
let kitchenCeilingLight = new M433SwitchItem('Gnd', 'Kitchen', 'CeilingLight', 'Deckenlampe Küche', '82197 24 1', '82196 24 1')
let kitchenCeilingLight = new M433SwitchItem('Gnd', 'Kueche', 'CeilingLight', 'Deckenlampe', '82197 24 1', '82196 24 1')
kitchenCeilingLight.start()
allLabeledItems.push(kitchenCeilingLight)
allRelevantLights.push(kitchenCeilingLight)
allLights.push(kitchenCeilingLight)
// Schlafzimmer ---------------------------------------------------------------------------------------------
// Schlafzimmer Wolfgangs Seite 13976916 24 1 13976913 24 1
let bedRoomWolfgangsSide = new M433SwitchItem('1st', 'BedRoom', 'WolfgangsSide', 'Wolfgangs Seite Schlafzimmer', '13976916 24 1', '13976913 24 1')
let bedRoomWolfgangsSide = new M433SwitchItem('1st', 'Schlafzimmer', 'WolfgangsSide', 'Wolfgangs Seite', '13976916 24 1', '13976913 24 1')
bedRoomWolfgangsSide.start()
allLabeledItems.push(bedRoomWolfgangsSide)
allRelevantLights.push(bedRoomWolfgangsSide)
allLights.push(bedRoomWolfgangsSide)
let bedRoomWolfgangBedLight = new HueColorBulbItem('1st', 'Schlafzimmer', 'WolfgangBedLight', 'Wolfgangs Bettlicht', 16)
bedRoomWolfgangBedLight.start()
allLabeledItems.push(bedRoomWolfgangBedLight)
allRelevantLights.push(bedRoomWolfgangBedLight)
allLights.push(bedRoomWolfgangBedLight)
let bedRoomWolfgangBedLightDimmerAdaptor = new DimmerAdaptor('1st', 'Schlafzimmer', 'WolfgangBedLight')
bedRoomWolfgangBedLightDimmerAdaptor.start()
let touchSwitchMultiButtonThing = new TouchSwitchMultiButtonThing('1st', 'Bedroom', 'Wolfgang',
[ new TouchSwitchButtonSingleItem(bedRoomWolfgangBedLightDimmerAdaptor.getInTopic())])
touchSwitchMultiButtonThing.start()
// Schlafzimmer Pattys Seite 13980756 24 1 13980753 24 1
let bedRoomPattysSide = new M433SwitchItem('1st', 'BedRoom', 'PattysSide', 'Pattys Seite Schlafzimmer', '13980756 24 1', '13980753 24 1')
let bedRoomPattysSide = new M433SwitchItem('1st', 'Schlafzimmer', 'PattysSide', 'Pattys Seite', '13980756 24 1', '13980753 24 1')
bedRoomPattysSide.start()
allLabeledItems.push(bedRoomPattysSide)
allRelevantLights.push(bedRoomPattysSide)
allLights.push(bedRoomPattysSide)
// Schlafzimmer Fensterbank 13979988 24 1 13979985 24 1
let bedRoomWindowLight = new M433SwitchItem('1st', 'BedRoom', 'WindowLight', 'Fensterbanklicht Schlafzimmer', '13979988 24 1', '13979985 24 1')
let bedRoomWindowLight = new M433SwitchItem('1st', 'Schlafzimmer', 'WindowLight', 'Fensterbanklicht', '13979988 24 1', '13979985 24 1')
bedRoomWindowLight.start()
allLabeledItems.push(bedRoomWindowLight)
allRelevantLights.push(bedRoomWindowLight)
allLights.push(bedRoomWindowLight)
let windowContactBedroomStreet1st = new MaxWindowContact('1st', 'Bedroom', 'WindowContactStreet', 'Schlafz. Strasse', 17)
windowContactBedroomStreet1st.start()
allLabeledItems.push(windowContactBedroomStreet1st)
allWindows.push(windowContactBedroomStreet1st)
let windowContact1BedroomGarden1st = new MaxWindowContact('1st', 'Bedroom', 'WindowContact1Garden', 'Schlafz. Garten 1', 18)
windowContact1BedroomGarden1st.start()
allLabeledItems.push(windowContact1BedroomGarden1st)
allWindows.push(windowContact1BedroomGarden1st)
let windowContact2BedroomGarden1st = new MaxWindowContact('1st', 'Bedroom', 'WindowContact2Garden', 'Schlafz. Garten 2', 22)
windowContact2BedroomGarden1st.start()
allLabeledItems.push(windowContact2BedroomGarden1st)
allWindows.push(windowContact2BedroomGarden1st)
let thermostatBedroom1st = new MaxThermostat('1st', 'Bedroom', 'Thermostat', 'Thermostat Schlafzimmer', 19, [windowContact1BedroomGarden1st, windowContact2BedroomGarden1st, windowContactBedroomStreet1st])
thermostatBedroom1st.start()
thermostatBedroom1st.setPresetTemperature(20.0)
allLabeledItems.push(thermostatBedroom1st)
allThermostatItems.push(thermostatBedroom1st)
let thermostatBedroom1stCron = new Cron('thermostatBedroom1stCron', thermostatBedroom1st, [
{cronTime: '00 01 06 * * 1-5', output: 'ON'},
{cronTime: '00 01 09 * * 1-5', output: 'OFF'},
{cronTime: '00 01 08 * * 6,0', output: 'ON'},
{cronTime: '00 01 11 * * 6,0', output: 'OFF'},
{cronTime: '00 00 17 * * *', output: 'ON'},
{cronTime: '00 59 23 * * *', output: 'OFF'}
])
thermostatBedroom1stCron.start()
// ---------------------------------------------------------------------------------------------------------
let morningLightForwarder = new Forwarder('Gnd', 'Hallway', 'MorningLight', 'state', 'MorningLight', [
kitchenWindowLight.stateTopic,
kitchenCeilingLight.stateTopic,
hallwayDeskLight.stateTopic,
hallwayStandLight.stateTopic,
hallwayWardrobeLight.stateTopic
])
morningLightForwarder.start()
let windowContactBathroomGnd = new MaxWindowContact('Gnd', 'Bathroom', 'WindowContact', 'Bad unten', 7)
windowContactBathroomGnd.start()
allLabeledItems.push(windowContactBathroomGnd)
allWindows.push(windowContactBathroomGnd)
let dayLightForwarder = new Forwarder('Gnd', 'Hallway', 'DayLight', 'state', 'DayLight', [
kitchenWindowLight.stateTopic,
kitchenCeilingLight.stateTopic,
hallwayDeskLight.stateTopic,
hallwayStandLight.stateTopic,
hallwayWardrobeLight.stateTopic,
diningRoomSmallLight.stateTopic,
diningRoomStandLight.stateTopic,
diningRoomCupboardLight.stateTopic,
livingRoomLargeLight.stateTopic,
livingRoomSmallLight.stateTopic,
livingRoomStars.stateTopic,
livingRoomStandLight.stateTopic
])
dayLightForwarder.start()
let thermostatBathroomGnd = new MaxThermostat('Gnd', 'Bathroom', 'Thermostat', 'Thermostat Bad unten', 4, [windowContactBathroomGnd])
thermostatBathroomGnd.start()
thermostatBathroomGnd.setPresetTemperature(20.0)
allLabeledItems.push(thermostatBathroomGnd)
allThermostatItems.push(thermostatBathroomGnd)
let ecoLightForwarder = new Forwarder('Gnd', 'Hallway', 'EcoLight', 'state', 'EcoLight', [
kitchenWindowLight.stateTopic,
hallwayDeskLight.stateTopic,
hallwayWardrobeLight.stateTopic,
diningRoomSmallLight.stateTopic,
diningRoomStandLight.stateTopic,
diningRoomCupboardLight.stateTopic,
livingRoomStars.stateTopic,
livingRoomStandLight.stateTopic
let thermostatBathroomGndCron = new Cron('thermostatBathroomGndCron', thermostatBathroomGnd, [
{cronTime: '00 02 06 * * 1-5', output: 'ON'},
{cronTime: '00 02 08 * * 6,0', output: 'ON'},
{cronTime: '00 02 11 * * *', output: 'OFF'},
{cronTime: '00 02 19 * * *', output: 'ON'},
{cronTime: '00 00 23 * * *', output: 'OFF'}
])
ecoLightForwarder.start()
thermostatBathroomGndCron.start()
let windowContactBathroom1st = new MaxWindowContact('1st', 'Bathroom', 'WindowContact', 'Bad oben', 2)
windowContactBathroom1st.start()
allLabeledItems.push(windowContactBathroom1st)
allWindows.push(windowContactBathroom1st)
let thermostatBathroom1st = new MaxThermostat('1st', 'Bathroom', 'Thermostat', 'Thermostat Bad oben', 3, [windowContactBathroom1st])
thermostatBathroom1st.start()
thermostatBathroom1st.setPresetTemperature(20.0)
allLabeledItems.push(thermostatBathroom1st)
allThermostatItems.push(thermostatBathroom1st)
let thermostatBathroom1stCron = new Cron('thermostatBathroom1stCron', thermostatBathroom1st, [
{cronTime: '00 00 06 * * 1-5', output: 'ON'},
{cronTime: '00 00 08 * * 6,0', output: 'ON'},
{cronTime: '00 00 11 * * *', output: 'OFF'},
{cronTime: '00 00 19 * * *', output: 'ON'},
{cronTime: '00 00 23 * * *', output: 'OFF'}
])
thermostatBathroom1stCron.start()
let windowContactKitchen1 = new MaxWindowContact('Gnd', 'Kueche', 'WindowContact1', 'Küche Garten', 11)
windowContactKitchen1.start()
allLabeledItems.push(windowContactKitchen1)
allWindows.push(windowContactKitchen1)
let windowContactKitchen2 = new MaxWindowContact('Gnd', 'Kueche', 'WindowContact2', 'Küche Terassentür', 10)
windowContactKitchen2.start()
allLabeledItems.push(windowContactKitchen2)
allWindows.push(windowContactKitchen2)
let windowContactKitchen3 = new MaxWindowContact('Gnd', 'Kueche', 'WindowContact3', 'Küche Straße 1', 12)
windowContactKitchen3.start()
allLabeledItems.push(windowContactKitchen3)
allWindows.push(windowContactKitchen3)
let windowContactKitchen4 = new MaxWindowContact('Gnd', 'Kueche', 'WindowContact4', 'Küche Straße 2', 13)
windowContactKitchen4.start()
allLabeledItems.push(windowContactKitchen4)
allWindows.push(windowContactKitchen4)
let thermostatKitchen = new MaxThermostat('Gnd', 'Kueche', 'Thermostat', 'Thermostat Küche', 14, [
windowContactKitchen1, windowContactKitchen2, windowContactKitchen3, windowContactKitchen4])
thermostatKitchen.start()
thermostatKitchen.setPresetTemperature(20.0)
allLabeledItems.push(thermostatKitchen)
allThermostatItems.push(thermostatKitchen)
let thermostatKitchenCron = new Cron('thermostatKitchenCron', thermostatKitchen, [
{cronTime: '00 00 06 * * 1-5', output: 'ON'},
{cronTime: '00 00 08 * * 6,0', output: 'ON'},
{cronTime: '00 00 10 * * 1-3', output: 'OFF'},
{cronTime: '00 30 13 * * 1-3', output: 'ON'},
{cronTime: '00 00 23 * * *', output: 'OFF'}
])
thermostatKitchenCron.start()
// ----------------------------------------------------------------------------------------------------------
let testFourButton = new HomematicFourButtonThing('Gnd', 'Hallway', 'TestButton', 9, [
new HomematicFourButtonSingleItem('dispatcher_ng/items/Gnd/Hallway/Testlight/dimmerIn'),
new HomematicFourButtonSingleItem('dispatcher_ng/items/Gnd/Hallway/DeskLight/timerIn'),
let windowContactFrontdoor = new MaxWindowContact('Gnd', 'Flur', 'FrontdoorContact', 'Haustür', 23)
windowContactFrontdoor.start()
allLabeledItems.push(windowContactFrontdoor)
// ----------------------------------------------------------------------------------------------------------
let relayBox = new RelayBoxThing('base', 'labor', 'relaybox', 'IoT/Command/RelayBox', 'IoT/Status/RelayBox', [
"Küche", "Herd", "Waschküche"
])
relayBox.start()
allLabeledItems.push(relayBox)
// ----------------------------------------------------------------------------------------------------------
let heatingSceneAll = new HeatingScene('Gnd', 'House', 'Heatings', 'Alle Heizungen', allThermostatItems)
heatingSceneAll.start()
// ----------------------------------------------------------------------------------------------------------
// Basement
let workshopLight = new HomematicSwitchItem('Base', 'Keller', 'Light', 'Werkstatt', 5)
workshopLight.start()
allLabeledItems.push(workshopLight)
allRelevantLights.push(workshopLight)
allLights.push(workshopLight)
let basementSmallLight = new HomematicSwitchItem('Base', 'Keller', 'SmallLight', 'Licht einfach', 35, 1)
basementSmallLight.start()
allLabeledItems.push(basementSmallLight)
allRelevantLights.push(basementSmallLight)
allLights.push(basementSmallLight)
basementSmallLight.on('somethingChanged', () => {
if (basementSmallLight.getState() == 'ON') {
setTimeout(() => {
if (basementLargeLight.getState() == 'OFF') {
mqttHandler.send(basementSmallLight.getStateTopic(), 'OFF')
}
}, (3 * 60 * 1000))
}
if ((basementLargeLight.getState() == 'ON') && (basementSmallLight.getState() == 'OFF')) {
mqttHandler.send(basementLargeLight.getStateTopic(), 'OFF')
}
})
let basementLargeLight = new HomematicSwitchItem('Base', 'Keller', 'LargeLight', 'Licht hell', 35, 2)
basementLargeLight.start()
allLabeledItems.push(basementLargeLight)
allRelevantLights.push(basementLargeLight)
allLights.push(basementLargeLight)
basementLargeLight.on('somethingChanged', () => {
if (basementLargeLight.getState() == 'ON') {
mqttHandler.send(basementSmallLight.getStateTopic(), 'ON')
} else if (basementLargeLight.getState() == 'OFF') {
mqttHandler.send(basementSmallLight.getStateTopic(), 'OFF')
}
})
let basementForwarder = new Forwarder('Base', 'All', 'Forwarder', 'state', 'BasementForwarder', [
basementLargeLight.getStateTopic(),
basementSmallLight.getStateTopic(),
workshopLight.getStateTopic()
])
basementForwarder.start()
let basementForwarderSwitchOffAdaptor = new SwitchOffAdaptor('Base', 'All', 'Forwarder')
basementForwarderSwitchOffAdaptor.start()
// ----------------------------------------------------------------------------------------------------------
let twoLedSignal1 = new TwoLedSignal('Gnd', 'Flur', 'TwoLedSignal1', 'Licht- und Fenster-Anzeiger',
allRelevantLights, "OFF", "ON",
allWindows, "CLOSED", "OPEN")
twoLedSignal1.start()
// MySwitchTHing
let mySwitchThingWolfgang = new MySwitchThing('1st', 'Schlafzimmer', 'WolfgangsSwitch', [
new MySwitchSingleItem(bedRoomWolfgangBedLightDimmerAdaptor.getInTopic()),
new MySwitchSingleItem(basementForwarderSwitchOffAdaptor.getInTopic()),
new MySwitchSingleItem('IoT/InsLeere/2'),
])
mySwitchThingWolfgang.start()
// ----------------------------------------------------------------------------------------------------------
let testFourButton = new HomematicFourButtonThing('Gnd', 'Flur', 'TestButton', 9, [
new HomematicFourButtonSingleItem('dispatcher_ng/items/Gnd/Flur/Testlight/dimmerIn'),
new HomematicFourButtonSingleItem('dispatcher_ng/items/Gnd/Flur/DeskLight/timerIn'),
new HomematicFourButtonSingleItem('test/button/3'),
new HomematicFourButtonSingleItem('test/button/4')
])
testFourButton.start()
let testDimmerAdaptor = new DimmerAdaptor('Gnd', 'Hallway', 'Testlight')
let testDimmerAdaptor = new DimmerAdaptor('Gnd', 'Flur', 'Testlight')
testDimmerAdaptor.start()
let testTimerAdaptor = new TimerAdaptor('Gnd', 'Hallway', 'DeskLight', 10)
let testTimerAdaptor = new TimerAdaptor('Gnd', 'Flur', 'DeskLight', 10)
testTimerAdaptor.start()
let testLight = new HomematicDimmerItem('Gnd', 'Hallway', 'Testlight', 'Testlampe mit Dimmer', 8)
let testLight = new HomematicDimmerItem('Gnd', 'Flur', 'Testlight', 'Testlampe mit Dimmer', 8)
testLight.start()
let testLight2 = new HomematicSwitchItem('Gnd', 'Hallway', 'Testlight2', 'Testlampe ohne Dimmer', 5)
testLight2.start()
let testForwarder = new Forwarder('Gnd', 'Hallway', 'TestForwarder', 'state', 'TestForwarder', [
'dispatcher_ng/items/Gnd/Hallway/Testlight2/state',
'dispatcher_ng/items/Gnd/Hallway/DeskLight/state'
let testForwarder = new Forwarder('Gnd', 'Flur', 'TestForwarder', 'state', 'TestForwarder', [
'dispatcher_ng/items/Gnd/Flur/Testlight2/state',
'dispatcher_ng/items/Gnd/Flur/DeskLight/state'
])
testForwarder.start()
let testScene = new LightScene('Gnd', 'Flur', 'TestScene', 'TestScene',
[aquariumLight, annaBedLight],
[matthiasStandLights, matthiasBedLight]
)
testScene.start()
// ----------------------------------------------------------------------------------------------------------
// Homekit export
let homekitObject : { [key:string]:{} } = {}
let openhabList : string[] = []
allLabeledItems.forEach((item: AItem) => {
let exportData : ExportType|null = item.exportItem()
if (exportData != null) {
if ('id' in exportData['homekit']) {
homekitObject[exportData['homekit']['id']] = exportData['homekit']['object']
}
openhabList.push(exportData['openhab'])
let dayLightScene = new LightScene('Gnd', 'Szenen', 'DayLight', 'DayLight',
[
kitchenWindowLight, kitchenCeilingLight, hallwayDeskLight, hallwayStandLight, hallwayWardrobeLight,
diningRoomSmallLight, diningRoomStandLight, diningRoomCupboardLight, diningRoomShelfLight,
livingRoomLargeLight, livingRoomSmallLight, livingRoomStars, livingRoomStandLight, diningRoomNaehkaestchenLight
],
[]
)
dayLightScene.start()
allLabeledItems.push(dayLightScene)
allLightScenes.push(dayLightScene)
let ecoLightScene = new LightScene('Gnd', 'Szenen', 'EcoLight', 'EcoLight',
[
kitchenWindowLight, hallwayDeskLight, hallwayWardrobeLight,
diningRoomSmallLight, diningRoomStandLight, diningRoomCupboardLight, diningRoomShelfLight,
livingRoomStars, livingRoomStandLight, diningRoomNaehkaestchenLight
],
[
kitchenCeilingLight, hallwayStandLight,
livingRoomLargeLight, livingRoomSmallLight
]
)
ecoLightScene.start()
allLabeledItems.push(ecoLightScene)
allLightScenes.push(ecoLightScene)
let ecoSwitch = new MaxEcoSwitch('Gnd', 'Szenen', 'EcoSwitch', 'EcoSwitch', 6, dayLightScene, ecoLightScene)
ecoSwitch.start()
let morningLightScene = new LightScene('Gnd', 'Szenen', 'MorningLight', 'MorningLight',
[
kitchenWindowLight, kitchenCeilingLight, hallwayDeskLight, hallwayWardrobeLight,
hallwayStandLight
],
[
diningRoomSmallLight, diningRoomStandLight, diningRoomCupboardLight, diningRoomShelfLight,
livingRoomStars, livingRoomStandLight, livingRoomLargeLight, livingRoomSmallLight, diningRoomNaehkaestchenLight
]
)
morningLightScene.start()
allLabeledItems.push(morningLightScene)
allLightScenes.push(morningLightScene)
let sceneOfAllLights = new LightScene('Gnd', 'Szenen', 'AllLights', 'Alle Lampen', allLights, [])
sceneOfAllLights.start()
allLightScenes.push(sceneOfAllLights)
// ----------------------------------------------------------------------------------------------------------
// heartbeat
let heartbeatCounter = 0
let heartbeatTimer = setInterval(() => {
heartbeatCounter += 1
mqttHandler.send(config.dict.heartbeatTopic, `${heartbeatCounter}`)
}, config.dict.heartbeatInterval)
// watchdog
let watchdogCounter = 0
let watchdogTimer = setInterval(() => {
watchdogCounter += 1
mqttHandler.send(config.dict.watchdogTopic, `${config.dict.watchdogMessage} ${watchdogCounter}`)
}, config.dict.watchdogInterval)
// ----------------------------------------------------------------------------------------------------------
let roomSwitches: any = {}
allLights.forEach((item: HasStateAndFeedbackTopicAndLabelAndRoom) => {
let switchItem = {'label': item.getLabel(), 'actionTopic': item.getStateTopic(), 'feedbackTopic': item.getStateFeedbackTopic()}
if (item.getRoom() in roomSwitches) {
roomSwitches[item.getRoom()].push(switchItem)
} else {
roomSwitches[item.getRoom()] = [ switchItem ]
}
})
fs.writeFileSync(config.dict.homekitFile, JSON.stringify(homekitObject, null, 4))
fs.writeFileSync(config.dict.openhabItemFile, openhabList.join('\n'))
let smartClientConfiguration : any = {}
smartClientConfiguration['switches'] = []
for (let key in roomSwitches) {
let item : any = { 'room': key, 'switches': roomSwitches[key]}
smartClientConfiguration['switches'].push(item)
}
smartClientConfiguration['scenes'] = []
allLightScenes.forEach((scene : HasStateAndFeedbackTopicAndLabelAndRoom) => {
let item : any = { 'label': scene.getLabel(), 'actionTopic': scene.getStateTopic() }
smartClientConfiguration['scenes'].push(item)
})
smartClientConfiguration['windows'] = []
allWindows.forEach((window : HasStateAndFeedbackTopicAndLabel) => {
let item : any = { 'label': window.getLabel(), 'topic': window.getStateFeedbackTopic() }
smartClientConfiguration['windows'].push(item)
})
fs.writeFileSync('smartclient.json', JSON.stringify(smartClientConfiguration, null, 4))
// ----------------------------------------------------------------------------------------------------------
mqttHandler.exec()
logger.info("Dispatcher running")
mqttHandler.send('smartclient/configuration', JSON.stringify(smartClientConfiguration, null, 4))

View File

@ -1,10 +1,10 @@
{
"compilerOptions": {
"target": "es6",
"target": "es2017",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"lib": ["es6"],
"lib": ["es2017"],
"strictNullChecks": true,
"noImplicitAny": true,
"noEmitOnError": true,