-
-
Save sescandell/4fe3b7f7f70a29641e46fcd9003411b5 to your computer and use it in GitHub Desktop.
ZWave Hank Four-Key Scene Controler logs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Initialising OpenZWave 1.4.3319 binary addon for Node.JS. | |
OpenZWave Security API is ENABLED | |
ZWave device db : /usr/local/etc/openzwave | |
User settings path : /home/pi/tests/zwave/ozw/node_modules/openzwave-shared/build/Release/../../ | |
Option Overrides : --ConsoleOutput false --Logging true --SaveConfiguration false --DriverMaxAttempts 3 --PollInterval 500 --SuppressValueRefresh false | |
connecting to /dev/ttyACM0 | |
=================== DRIVER READY! ==================== | |
scanning homeid=0xe256ae43... | |
=================== NODE ADDED! ==================== | |
value added 1 32 { value_id: '1-32-1-0', | |
node_id: 1, | |
class_id: 32, | |
type: 'byte', | |
genre: 'basic', | |
instance: 1, | |
index: 0, | |
label: 'Basic', | |
units: '', | |
help: '', | |
read_only: false, | |
write_only: false, | |
min: 0, | |
max: 255, | |
is_polled: false, | |
value: 0 } | |
=================== NODE ADDED! ==================== | |
value added 6 32 { value_id: '6-32-1-0', | |
node_id: 6, | |
class_id: 32, | |
type: 'byte', | |
genre: 'basic', | |
instance: 1, | |
index: 0, | |
label: 'Basic', | |
units: '', | |
help: '', | |
read_only: false, | |
write_only: false, | |
min: 0, | |
max: 255, | |
is_polled: false, | |
value: 0 } | |
value added 6 38 { value_id: '6-38-1-5', | |
node_id: 6, | |
class_id: 38, | |
type: 'byte', | |
genre: 'system', | |
instance: 1, | |
index: 5, | |
label: 'Dimming Duration', | |
units: '', | |
help: '', | |
read_only: false, | |
write_only: false, | |
min: 0, | |
max: 255, | |
is_polled: false, | |
value: 255 } | |
value added 6 38 { value_id: '6-38-1-0', | |
node_id: 6, | |
class_id: 38, | |
type: 'byte', | |
genre: 'user', | |
instance: 1, | |
index: 0, | |
label: 'Level', | |
units: '', | |
help: '', | |
read_only: false, | |
write_only: false, | |
min: 0, | |
max: 255, | |
is_polled: false, | |
value: 0 } | |
value added 6 38 { value_id: '6-38-1-1', | |
node_id: 6, | |
class_id: 38, | |
type: 'button', | |
genre: 'user', | |
instance: 1, | |
index: 1, | |
label: 'Bright', | |
units: '', | |
help: '', | |
read_only: false, | |
write_only: true, | |
min: 0, | |
max: 0, | |
is_polled: false } | |
value added 6 38 { value_id: '6-38-1-2', | |
node_id: 6, | |
class_id: 38, | |
type: 'button', | |
genre: 'user', | |
instance: 1, | |
index: 2, | |
label: 'Dim', | |
units: '', | |
help: '', | |
read_only: false, | |
write_only: true, | |
min: 0, | |
max: 0, | |
is_polled: false } | |
value added 6 38 { value_id: '6-38-1-3', | |
node_id: 6, | |
class_id: 38, | |
type: 'bool', | |
genre: 'system', | |
instance: 1, | |
index: 3, | |
label: 'Ignore Start Level', | |
units: '', | |
help: '', | |
read_only: false, | |
write_only: false, | |
min: 0, | |
max: 0, | |
is_polled: false, | |
value: true } | |
value added 6 38 { value_id: '6-38-1-4', | |
node_id: 6, | |
class_id: 38, | |
type: 'byte', | |
genre: 'system', | |
instance: 1, | |
index: 4, | |
label: 'Start Level', | |
units: '', | |
help: '', | |
read_only: false, | |
write_only: false, | |
min: 0, | |
max: 255, | |
is_polled: false, | |
value: 0 } | |
value added 6 91 { value_id: '6-91-1-0', | |
node_id: 6, | |
class_id: 91, | |
type: 'int', | |
genre: 'system', | |
instance: 1, | |
index: 0, | |
label: 'Scene Count', | |
units: '', | |
help: '', | |
read_only: true, | |
write_only: false, | |
min: -2147483648, | |
max: 2147483647, | |
is_polled: false, | |
value: 0 } | |
value added 6 94 { value_id: '6-94-1-0', | |
node_id: 6, | |
class_id: 94, | |
type: 'byte', | |
genre: 'system', | |
instance: 1, | |
index: 0, | |
label: 'ZWave+ Version', | |
units: '', | |
help: '', | |
read_only: true, | |
write_only: false, | |
min: 0, | |
max: 255, | |
is_polled: false, | |
value: 1 } | |
value added 6 94 { value_id: '6-94-1-1', | |
node_id: 6, | |
class_id: 94, | |
type: 'short', | |
genre: 'system', | |
instance: 1, | |
index: 1, | |
label: 'InstallerIcon', | |
units: '', | |
help: '', | |
read_only: true, | |
write_only: false, | |
min: -32768, | |
max: 32767, | |
is_polled: false, | |
value: 5632 } | |
value added 6 94 { value_id: '6-94-1-2', | |
node_id: 6, | |
class_id: 94, | |
type: 'short', | |
genre: 'system', | |
instance: 1, | |
index: 2, | |
label: 'UserIcon', | |
units: '', | |
help: '', | |
read_only: true, | |
write_only: false, | |
min: -32768, | |
max: 32767, | |
is_polled: false, | |
value: 5632 } | |
value added 6 112 { value_id: '6-112-1-254', | |
node_id: 6, | |
class_id: 112, | |
type: 'list', | |
genre: 'config', | |
instance: 1, | |
index: 254, | |
label: 'Configuration Command', | |
units: '', | |
help: 'Lock/unlock all configuration parameters', | |
read_only: false, | |
write_only: false, | |
min: 0, | |
max: 1, | |
is_polled: false, | |
values: [ 'Unlock', 'Lock', [length]: 2 ], | |
value: 'Unlock' } | |
value added 6 115 { value_id: '6-115-1-0', | |
node_id: 6, | |
class_id: 115, | |
type: 'list', | |
genre: 'system', | |
instance: 1, | |
index: 0, | |
label: 'Powerlevel', | |
units: 'dB', | |
help: '', | |
read_only: false, | |
write_only: false, | |
min: 0, | |
max: 0, | |
is_polled: false, | |
values: | |
[ 'Normal', | |
'-1dB', | |
'-2dB', | |
'-3dB', | |
'-4dB', | |
'-5dB', | |
'-6dB', | |
'-7dB', | |
'-8dB', | |
'-9dB', | |
[length]: 10 ], | |
value: 'Normal' } | |
value added 6 115 { value_id: '6-115-1-1', | |
node_id: 6, | |
class_id: 115, | |
type: 'byte', | |
genre: 'system', | |
instance: 1, | |
index: 1, | |
label: 'Timeout', | |
units: 'seconds', | |
help: '', | |
read_only: false, | |
write_only: false, | |
min: 0, | |
max: 255, | |
is_polled: false, | |
value: 0 } | |
value added 6 115 { value_id: '6-115-1-2', | |
node_id: 6, | |
class_id: 115, | |
type: 'button', | |
genre: 'system', | |
instance: 1, | |
index: 2, | |
label: 'Set Powerlevel', | |
units: '', | |
help: '', | |
read_only: false, | |
write_only: true, | |
min: 0, | |
max: 0, | |
is_polled: false } | |
value added 6 115 { value_id: '6-115-1-3', | |
node_id: 6, | |
class_id: 115, | |
type: 'byte', | |
genre: 'system', | |
instance: 1, | |
index: 3, | |
label: 'Test Node', | |
units: '', | |
help: '', | |
read_only: false, | |
write_only: false, | |
min: 0, | |
max: 255, | |
is_polled: false, | |
value: 0 } | |
value added 6 115 { value_id: '6-115-1-4', | |
node_id: 6, | |
class_id: 115, | |
type: 'list', | |
genre: 'system', | |
instance: 1, | |
index: 4, | |
label: 'Test Powerlevel', | |
units: 'dB', | |
help: '', | |
read_only: false, | |
write_only: false, | |
min: 0, | |
max: 0, | |
is_polled: false, | |
values: | |
[ 'Normal', | |
'-1dB', | |
'-2dB', | |
'-3dB', | |
'-4dB', | |
'-5dB', | |
'-6dB', | |
'-7dB', | |
'-8dB', | |
'-9dB', | |
[length]: 10 ], | |
value: 'Normal' } | |
value added 6 115 { value_id: '6-115-1-5', | |
node_id: 6, | |
class_id: 115, | |
type: 'short', | |
genre: 'system', | |
instance: 1, | |
index: 5, | |
label: 'Frame Count', | |
units: '', | |
help: '', | |
read_only: false, | |
write_only: false, | |
min: -32768, | |
max: 32767, | |
is_polled: false, | |
value: 0 } | |
value added 6 115 { value_id: '6-115-1-6', | |
node_id: 6, | |
class_id: 115, | |
type: 'button', | |
genre: 'system', | |
instance: 1, | |
index: 6, | |
label: 'Test', | |
units: '', | |
help: '', | |
read_only: false, | |
write_only: true, | |
min: 0, | |
max: 0, | |
is_polled: false } | |
value added 6 115 { value_id: '6-115-1-7', | |
node_id: 6, | |
class_id: 115, | |
type: 'button', | |
genre: 'system', | |
instance: 1, | |
index: 7, | |
label: 'Report', | |
units: '', | |
help: '', | |
read_only: false, | |
write_only: true, | |
min: 0, | |
max: 0, | |
is_polled: false } | |
value added 6 115 { value_id: '6-115-1-8', | |
node_id: 6, | |
class_id: 115, | |
type: 'list', | |
genre: 'system', | |
instance: 1, | |
index: 8, | |
label: 'Test Status', | |
units: '', | |
help: '', | |
read_only: true, | |
write_only: false, | |
min: 0, | |
max: 0, | |
is_polled: false, | |
values: [ 'Failed', 'Success', 'In Progress', [length]: 3 ], | |
value: 'Failed' } | |
value added 6 115 { value_id: '6-115-1-9', | |
node_id: 6, | |
class_id: 115, | |
type: 'short', | |
genre: 'system', | |
instance: 1, | |
index: 9, | |
label: 'Acked Frames', | |
units: '', | |
help: '', | |
read_only: true, | |
write_only: false, | |
min: -32768, | |
max: 32767, | |
is_polled: false, | |
value: 0 } | |
value added 6 128 { value_id: '6-128-1-0', | |
node_id: 6, | |
class_id: 128, | |
type: 'byte', | |
genre: 'user', | |
instance: 1, | |
index: 0, | |
label: 'Battery Level', | |
units: '%', | |
help: '', | |
read_only: true, | |
write_only: false, | |
min: 0, | |
max: 255, | |
is_polled: false, | |
value: 100 } | |
value added 6 132 { value_id: '6-132-1-1', | |
node_id: 6, | |
class_id: 132, | |
type: 'int', | |
genre: 'system', | |
instance: 1, | |
index: 1, | |
label: 'Minimum Wake-up Interval', | |
units: 'Seconds', | |
help: '', | |
read_only: true, | |
write_only: false, | |
min: -2147483648, | |
max: 2147483647, | |
is_polled: false, | |
value: 0 } | |
value added 6 132 { value_id: '6-132-1-2', | |
node_id: 6, | |
class_id: 132, | |
type: 'int', | |
genre: 'system', | |
instance: 1, | |
index: 2, | |
label: 'Maximum Wake-up Interval', | |
units: 'Seconds', | |
help: '', | |
read_only: true, | |
write_only: false, | |
min: -2147483648, | |
max: 2147483647, | |
is_polled: false, | |
value: 0 } | |
value added 6 132 { value_id: '6-132-1-3', | |
node_id: 6, | |
class_id: 132, | |
type: 'int', | |
genre: 'system', | |
instance: 1, | |
index: 3, | |
label: 'Default Wake-up Interval', | |
units: 'Seconds', | |
help: '', | |
read_only: true, | |
write_only: false, | |
min: -2147483648, | |
max: 2147483647, | |
is_polled: false, | |
value: 0 } | |
value added 6 132 { value_id: '6-132-1-4', | |
node_id: 6, | |
class_id: 132, | |
type: 'int', | |
genre: 'system', | |
instance: 1, | |
index: 4, | |
label: 'Wake-up Interval Step', | |
units: 'Seconds', | |
help: '', | |
read_only: true, | |
write_only: false, | |
min: -2147483648, | |
max: 2147483647, | |
is_polled: false, | |
value: 0 } | |
value added 6 132 { value_id: '6-132-1-0', | |
node_id: 6, | |
class_id: 132, | |
type: 'int', | |
genre: 'system', | |
instance: 1, | |
index: 0, | |
label: 'Wake-up Interval', | |
units: 'Seconds', | |
help: '', | |
read_only: false, | |
write_only: false, | |
min: -2147483648, | |
max: 2147483647, | |
is_polled: false, | |
value: 0 } | |
value added 6 134 { value_id: '6-134-1-0', | |
node_id: 6, | |
class_id: 134, | |
type: 'string', | |
genre: 'system', | |
instance: 1, | |
index: 0, | |
label: 'Library Version', | |
units: '', | |
help: '', | |
read_only: true, | |
write_only: false, | |
min: 0, | |
max: 0, | |
is_polled: false, | |
value: '3' } | |
value added 6 134 { value_id: '6-134-1-1', | |
node_id: 6, | |
class_id: 134, | |
type: 'string', | |
genre: 'system', | |
instance: 1, | |
index: 1, | |
label: 'Protocol Version', | |
units: '', | |
help: '', | |
read_only: true, | |
write_only: false, | |
min: 0, | |
max: 0, | |
is_polled: false, | |
value: '4.34' } | |
value added 6 134 { value_id: '6-134-1-2', | |
node_id: 6, | |
class_id: 134, | |
type: 'string', | |
genre: 'system', | |
instance: 1, | |
index: 2, | |
label: 'Application Version', | |
units: '', | |
help: '', | |
read_only: true, | |
write_only: false, | |
min: 0, | |
max: 0, | |
is_polled: false, | |
value: '1.06' } | |
node6: notification(2): Notification - NoOperation | |
node1: Z-Wave.Me, ZME_UZB1 USB Stick | |
node1: name="", type="Static PC Controller", location="" | |
node1: class 32 | |
node1: Basic=0 | |
scan complete, hit ^C to finish. | |
value changed 6 115 { value_id: '6-115-1-0', | |
node_id: 6, | |
class_id: 115, | |
type: 'list', | |
genre: 'system', | |
instance: 1, | |
index: 0, | |
label: 'Powerlevel', | |
units: 'dB', | |
help: '', | |
read_only: false, | |
write_only: false, | |
min: 0, | |
max: 0, | |
is_polled: false, | |
values: | |
[ 'Normal', | |
'-1dB', | |
'-2dB', | |
'-3dB', | |
'-4dB', | |
'-5dB', | |
'-6dB', | |
'-7dB', | |
'-8dB', | |
'-9dB', | |
[length]: 10 ], | |
value: 'Normal' } | |
value changed 6 115 { value_id: '6-115-1-1', | |
node_id: 6, | |
class_id: 115, | |
type: 'byte', | |
genre: 'system', | |
instance: 1, | |
index: 1, | |
label: 'Timeout', | |
units: 'seconds', | |
help: '', | |
read_only: false, | |
write_only: false, | |
min: 0, | |
max: 255, | |
is_polled: false, | |
value: 0 } | |
value changed 6 132 { value_id: '6-132-1-0', | |
node_id: 6, | |
class_id: 132, | |
type: 'int', | |
genre: 'system', | |
instance: 1, | |
index: 0, | |
label: 'Wake-up Interval', | |
units: 'Seconds', | |
help: '', | |
read_only: false, | |
write_only: false, | |
min: -2147483648, | |
max: 2147483647, | |
is_polled: false, | |
value: 0 } | |
node6: notification(1): Notification - TimeOut | |
value changed 6 128 { value_id: '6-128-1-0', | |
node_id: 6, | |
class_id: 128, | |
type: 'byte', | |
genre: 'user', | |
instance: 1, | |
index: 0, | |
label: 'Battery Level', | |
units: '%', | |
help: '', | |
read_only: true, | |
write_only: false, | |
min: 0, | |
max: 255, | |
is_polled: false, | |
value: 100 } | |
node6: Hank, HKZW-SCN04 Scene Controller | |
node6: name="", type="Wall Controller", location="" | |
node6: class 32 | |
node6: Basic=0 | |
node6: class 38 | |
node6: Level=0 | |
node6: Bright=undefined | |
node6: Dim=undefined | |
node6: Ignore Start Level=true | |
node6: Start Level=0 | |
node6: Dimming Duration=255 | |
node6: class 91 | |
node6: Scene Count=0 | |
node6: class 94 | |
node6: ZWave+ Version=1 | |
node6: InstallerIcon=5632 | |
node6: UserIcon=5632 | |
node6: class 112 | |
node6: Configuration Command=Unlock | |
node6: class 115 | |
node6: Powerlevel=Normal | |
node6: Timeout=0 | |
node6: Set Powerlevel=undefined | |
node6: Test Node=0 | |
node6: Test Powerlevel=Normal | |
node6: Frame Count=0 | |
node6: Test=undefined | |
node6: Report=undefined | |
node6: Test Status=Failed | |
node6: Acked Frames=0 | |
node6: class 128 | |
node6: Battery Level=100 | |
node6: class 132 | |
node6: Wake-up Interval=0 | |
node6: Minimum Wake-up Interval=0 | |
node6: Maximum Wake-up Interval=0 | |
node6: Default Wake-up Interval=0 | |
node6: Wake-up Interval Step=0 | |
node6: class 134 | |
node6: Library Version=3 | |
node6: Protocol Version=4.34 | |
node6: Application Version=1.06 | |
scan complete, hit ^C to finish. | |
node6: notification(4): Notification - Node Asleep | |
========================= Recup Scenes ======================== | |
Scenes [ [length]: 0 ] | |
node6: notification(3): Notification - Node Awake | |
node6: notification(4): Notification - Node Asleep | |
value changed 6 128 { value_id: '6-128-1-0', | |
node_id: 6, | |
class_id: 128, | |
type: 'byte', | |
genre: 'user', | |
instance: 1, | |
index: 0, | |
label: 'Battery Level', | |
units: '%', | |
help: '', | |
read_only: true, | |
write_only: false, | |
min: 0, | |
max: 255, | |
is_polled: false, | |
value: 100 } | |
node6: changed: 128:Battery Level:100->100 | |
== Driver Statistics: {"SOFCnt":72,"ACKWaiting":3,"readAborts":0,"badChecksum":0,"readCnt":72,"writeCnt":32,"CANCnt":3,"NAKCnt":0,"ACKCnt":29,"OOFCnt":0,"dropped":1,"retries":3,"callbacks":0,"badroutes":0} | |
== Node 1 neighbors: [6] | |
== Node 1 Statistics: {"sentCnt":1,"sentFailed":0,"retries":0,"receivedCnt":0,"receivedDups":0,"receivedUnsolicited":0,"lastRequestRTT":0,"lastResponseRTT":0,"averageRequestRTT":0,"averageResponseRTT":0,"quality":0,"sentTS":"2019-02-06 21:38:30:549 ","receivedTS":"2019-02-06 21:38:30:436 "} | |
== Node 6 neighbors: [1] | |
== Node 6 Statistics: {"sentCnt":19,"sentFailed":0,"retries":0,"receivedCnt":23,"receivedDups":0,"receivedUnsolicited":6,"lastRequestRTT":26,"lastResponseRTT":598,"averageRequestRTT":26,"averageResponseRTT":3888,"quality":0,"sentTS":"2019-02-06 21:38:45:913 ","receivedTS":"2019-02-06 21:38:57:567 "} | |
disconnecting... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* OpenZWave test program. | |
*/ | |
var OpenZWave = require('./lib/openzwave-shared.js'); | |
var os = require('os'); | |
var zwave = new OpenZWave({ | |
ConsoleOutput: false, | |
Logging: true, | |
SaveConfiguration: false, | |
DriverMaxAttempts: 3, | |
PollInterval: 500, | |
SuppressValueRefresh: false, | |
}); | |
var nodes = []; | |
zwave.on('connected', function(homeid) { | |
console.log('=================== CONNECTED! ===================='); | |
var scenes = zwave.getScenes(); | |
console.log('Scenes %o', scenes); | |
}); | |
zwave.on('driver ready', function(homeid) { | |
console.log('=================== DRIVER READY! ===================='); | |
console.log('scanning homeid=0x%s...', homeid.toString(16)); | |
}); | |
zwave.on('driver failed', function() { | |
console.log('failed to start driver'); | |
zwave.disconnect(); | |
process.exit(); | |
}); | |
zwave.on('node added', function(nodeid) { | |
console.log('=================== NODE ADDED! ===================='); | |
nodes[nodeid] = { | |
manufacturer: '', | |
manufacturerid: '', | |
product: '', | |
producttype: '', | |
productid: '', | |
type: '', | |
name: '', | |
loc: '', | |
classes: {}, | |
ready: false, | |
}; | |
}); | |
zwave.on('value added', function(nodeid, comclass, value) { | |
console.log('value added %d %s %o', nodeid, comclass, value); | |
if (!nodes[nodeid]['classes'][comclass]) | |
nodes[nodeid]['classes'][comclass] = {}; | |
nodes[nodeid]['classes'][comclass][value.index] = value; | |
}); | |
zwave.on('value changed', function(nodeid, comclass, value) { | |
console.log('value changed %d %s %o', nodeid, comclass, value); | |
if (nodes[nodeid]['ready']) { | |
console.log('node%d: changed: %d:%s:%s->%s', nodeid, comclass, | |
value['label'], | |
nodes[nodeid]['classes'][comclass][value.index]['value'], | |
value['value']); | |
} | |
nodes[nodeid]['classes'][comclass][value.index] = value; | |
}); | |
zwave.on('value removed', function(nodeid, comclass, index) { | |
console.log('value removed %d: %o %o', nodeid, comclass, index); | |
if (nodes[nodeid]['classes'][comclass] && | |
nodes[nodeid]['classes'][comclass][index]) | |
delete nodes[nodeid]['classes'][comclass][index]; | |
}); | |
zwave.on('node ready', function(nodeid, nodeinfo) { | |
nodes[nodeid]['manufacturer'] = nodeinfo.manufacturer; | |
nodes[nodeid]['manufacturerid'] = nodeinfo.manufacturerid; | |
nodes[nodeid]['product'] = nodeinfo.product; | |
nodes[nodeid]['producttype'] = nodeinfo.producttype; | |
nodes[nodeid]['productid'] = nodeinfo.productid; | |
nodes[nodeid]['type'] = nodeinfo.type; | |
nodes[nodeid]['name'] = nodeinfo.name; | |
nodes[nodeid]['loc'] = nodeinfo.loc; | |
nodes[nodeid]['ready'] = true; | |
console.log('node%d: %s, %s', nodeid, | |
nodeinfo.manufacturer ? nodeinfo.manufacturer : 'id=' + nodeinfo.manufacturerid, | |
nodeinfo.product ? nodeinfo.product : 'product=' + nodeinfo.productid + | |
', type=' + nodeinfo.producttype); | |
console.log('node%d: name="%s", type="%s", location="%s"', nodeid, | |
nodeinfo.name, | |
nodeinfo.type, | |
nodeinfo.loc); | |
for (var comclass in nodes[nodeid]['classes']) { | |
switch (comclass) { | |
case 0x25: // COMMAND_CLASS_SWITCH_BINARY | |
case 0x26: // COMMAND_CLASS_SWITCH_MULTILEVEL | |
zwave.enablePoll(nodeid, comclass); | |
break; | |
} | |
var values = nodes[nodeid]['classes'][comclass]; | |
console.log('node%d: class %d', nodeid, comclass); | |
for (var idx in values) | |
console.log('node%d: %s=%s', nodeid, values[idx]['label'], values[idx][ | |
'value' | |
]); | |
} | |
}); | |
zwave.on('notification', function(nodeid, notif, help) { | |
console.log('node%d: notification(%d): %s', nodeid, notif, help); | |
}); | |
zwave.on('scan complete', function() { | |
console.log('scan complete, hit ^C to finish.'); | |
}); | |
zwave.on('scene event', function(nodeid, sceneid) { | |
console.log('Scene event %d : %o', nodeid, sceneid); | |
}); | |
zwave.on('node event', function(nodeid, data) { | |
console.log('node event %d: %o', nodeid, data); | |
}); | |
function do_disconnect() { | |
console.log('\n\n== Driver Statistics: %j', | |
zwave.getDriverStatistics()); | |
Object.keys(nodes).forEach(function(nodeid) { | |
console.log('== Node %d neighbors: %j', | |
nodeid, zwave.getNodeNeighbors(nodeid)); | |
console.log('== Node %d Statistics: %j', | |
nodeid, zwave.getNodeStatistics(nodeid)); | |
}); | |
console.log('disconnecting...'); | |
zwave.disconnect(zwp); | |
process.exit(); | |
} | |
var zwavedriverpaths = { | |
"darwin": '/dev/cu.usbmodem1411', | |
"linux": '/dev/ttyACM0', | |
"windows": '\\\\.\\COM3' | |
} | |
var zwp = zwavedriverpaths[os.platform()]; | |
console.log("connecting to %s",zwp); | |
setTimeout(function() { | |
zwave.connect(zwp); | |
}, 5000); | |
setTimeout(function(){ | |
console.log('========================= Recup Scenes ========================'); | |
var scenes = zwave.getScenes(); | |
console.log('Scenes %o', scenes); | |
}, 20000); | |
process.on('SIGINT', do_disconnect); | |
setTimeout(do_disconnect, 40000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment