forked from NodeAlarmProxy/NodeAlarmProxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnap-example.js
34 lines (28 loc) · 853 Bytes
/
nap-example.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
var nap = require('./nodealarmproxy.js');
var config = require('./config.js'); //comment this out
var alarm = nap.initConfig({ password:config.password, //replace config.* with appropriate items
serverpassword:config.serverpassword,
actualhost:config.host,
actualport:config.port,
serverhost:'0.0.0.0',
serverport:config.port,
zone:7,
partition:1,
proxyenable:true,
atomicEvents:false
});
alarm.on('data', function(data) {
console.log('npmtest data:',data);
});
alarm.on('zoneupdate', function(data) {
console.log('npmtest zoneupdate:',data);
});
alarm.on('partitionupdate', function(data) {
console.log('npmtest partitionupdate:',data);
});
alarm.on('partitionuserupdate', function(data) {
console.log('npmtest partitionuserupdate:',data);
});
alarm.on('systemupdate', function(data) {
console.log('npmtest systemupdate:',data);
});