forked from LRuesink-WebArray/homey-matic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
35 lines (26 loc) · 720 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
'use strict';
const Homey = require('homey');
const HomeMaticDiscovery = require('./lib/HomeMaticDiscovery');
class Homematic extends Homey.App {
onInit() {
this.logmodule = require("./lib/logmodule");
this.logmodule.log('info', 'Started homematic...');
var self = this;
Homey.ManagerCloud.getLocalAddress()
.then((address) => {
self.homeyIP = address.split(':')[0]
})
self.settings = self.getSettings();
self.discovery = new HomeMaticDiscovery();
this.bridges = {};
}
getSettings() {
return {
"use_mqtt": Homey.ManagerSettings.get('use_mqtt'),
}
}
getLogLines() {
return this.logmodule.getLogLines();
}
}
module.exports = Homematic;