-
Notifications
You must be signed in to change notification settings - Fork 14
/
raumserver.js
43 lines (34 loc) · 1.31 KB
/
raumserver.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
36
37
38
39
40
41
42
'use strict';
var Config = require('config');
var Raumserver = require('./lib/lib.raumserver');
var raumserver = new Raumserver();
setConfiguration("raumserver", "port");
setConfiguration("raumserver", "loglevel");
setConfiguration("raumfeld", "raumfeldHost");
setConfiguration("raumfeld", "raumfeldHostRequestPort");
setConfiguration("raumfeld", "raumfeldManufacturerId");
setConfiguration("raumfeld", "raumfeldVirtualMediaPlayerModelDescription");
setConfiguration("raumfeld", "alivePingerIntervall");
setConfiguration("raumfeld", "ssdpDiscovertimeout");
setConfiguration("raumfeld", "bonjourDiscoverTimeout");
setConfiguration("raumfeld", "uriMetaDataTemplateFile");
setConfiguration("raumfeld", "rendererStateTriggerConfirmationTimout");
setConfiguration("raumfeld", "zoneTriggerConfirmationTimout");
//raumserver.createLogger(4);
raumserver.init();
function setConfiguration(_object, _key) {
try
{
if(_object == "raumserver")
raumserver.settings[_key] = Config.get(_object + '.' + _key);
else
raumserver.raumkernel.settings[_key] = Config.get(_object + '.' + _key);
}
catch(_exception)
{
raumserver.logError("Configuration key '" + _object + "." + _key + "' not set! Using default!", _exception);
}
}
function execute() {
}
setInterval(execute,1000);