-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.js
35 lines (23 loc) · 842 Bytes
/
main.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
// load interfaces table
// listen for events on interfaces
//
// set up delayed action table
// some "special" interfaces
var app = require("./app"),
evactions = require("./evactions"),
argv = require('minimist')(process.argv.slice(2)),
g = require("./globals");
g.argv = argv;
var sun = require("./plugins/sunInterface.js");
sun.initialize("San Jose, Calif.");
evactions.Init()
.then(function() {
g.executeAction({do: 'device', name: 'keypad', value: 'on'},null);
// for testing
//g.executeAction({do: 'device', name: "arm state", value: "armed"}, null);
// normally on
//g.executeAction({do: 'device', name: 'keypad', value: 'off'},null);
//g.executeAction({do: 'device', name: "devlast", value: "Back door"}, null);
g.log(g.LOG_TRACE, "start server port 82");
app.listen(82);
});