@@ -25,13 +25,13 @@ function isZWavePort(port) {
25
25
*
26
26
* Since `i` comes before `w` when the devices are listed, it's common for the
27
27
* Zigbee radio to be returned as the ZWave radio. We need to scrutinize the
28
- * comName of the radio to ensure that we're returning the actual ZWave one.
28
+ * path of the radio to ensure that we're returning the actual ZWave one.
29
29
*/
30
30
const isHUSBZB1 = port . vendorId == '10c4' && port . productId == '8a2a' ;
31
31
if ( isHUSBZB1 ) {
32
- const isGoControl = port . comName . indexOf ( 'GoControl' ) >= 0 ;
32
+ const isGoControl = port . path . indexOf ( 'GoControl' ) >= 0 ;
33
33
if ( isGoControl ) {
34
- return port . comName . indexOf ( 'zwave' ) >= 0 ;
34
+ return port . path . indexOf ( 'zwave' ) >= 0 ;
35
35
}
36
36
37
37
/**
@@ -70,8 +70,8 @@ function findZWavePort(callback) {
70
70
// /dev/cu.usbXXX. tty.usbXXX requires DCD to be asserted which
71
71
// isn't necessarily the case for ZWave dongles. The cu.usbXXX
72
72
// doesn't care about DCD.
73
- if ( port . comName . startsWith ( '/dev/tty.usb' ) ) {
74
- port . comName = port . comName . replace ( '/dev/tty' , '/dev/cu' ) ;
73
+ if ( port . path . startsWith ( '/dev/tty.usb' ) ) {
74
+ port . path = port . path . replace ( '/dev/tty' , '/dev/cu' ) ;
75
75
}
76
76
77
77
if ( isZWavePort ( port ) ) {
@@ -127,7 +127,7 @@ async function loadZWaveAdapters(addonManager, _, errorCallback) {
127
127
return ;
128
128
}
129
129
130
- console . log ( 'Found ZWave port @' , port . comName ) ;
130
+ console . log ( 'Found ZWave port @' , port . path ) ;
131
131
132
132
new ZWaveAdapter ( addonManager , config , zwaveModule , port ) ;
133
133
0 commit comments