5
5
*
6
6
* Author: David Lomas (codersaur)
7
7
*
8
- * Date: 2017-03-15
8
+ * Date: 2017-03-16
9
9
*
10
- * Version: 0.07
10
+ * Version: 0.08
11
11
*
12
12
* Source: https://github.com/codersaur/SmartThings/tree/master/devices/zwave-tweaker
13
13
*
@@ -229,7 +229,7 @@ metadata {
229
229
type : " text" ,
230
230
required : false
231
231
)
232
-
232
+
233
233
input (
234
234
name : " zwtAssocGroupCc" ,
235
235
title : " Command Class:" ,
@@ -1599,13 +1599,13 @@ def zwaveEvent(physicalgraph.zwave.Command cmd) {
1599
1599
/**
1600
1600
* initialise()
1601
1601
*
1602
- * Sets up meta-data caches and determines if the device is using security encapsulation.
1602
+ * Sets up meta-data caches, parses fingerprint, and determines if the device is using security encapsulation.
1603
1603
**/
1604
1604
private initialise () {
1605
1605
logger(" initialise()" ," trace" )
1606
1606
1607
- // Initialise parameter and association group meta data stores if they don't exist:
1608
- if (! state. zwtGeneralMd) state. zwtGeneralMd = [:]
1607
+ // Initialise meta- data stores if they don't exist:
1608
+ if (! state. zwtGeneralMd) state. zwtGeneralMd = [:] // Map!
1609
1609
if (! state. zwtCommandsMd) state. zwtCommandsMd = []
1610
1610
if (! state. zwtAssocGroupsMd) state. zwtAssocGroupsMd = []
1611
1611
if (! state. zwtEndpointsMd) state. zwtEndpointsMd = []
@@ -1626,6 +1626,7 @@ private initialise() {
1626
1626
ccIds = device. rawDescription. findAll(/ 0x\p {XDigit}+/ )
1627
1627
if (ccIds. size() > 0 ) { ccIds. remove(0 ) }
1628
1628
}
1629
+ ccIds. removeAll([null ])
1629
1630
state. zwtGeneralMd. commandClassIds = ccIds. sort(). collect { Integer . parseInt(it. replace(" 0x" ," " ),16 ) } // Parse hex strings to ints.
1630
1631
state. zwtGeneralMd. commandClassNames = toCcNames(state. zwtGeneralMd. commandClassIds,true ) // Parse Ids to names.
1631
1632
logger(" Supported Command Classes: ${ state.zwtGeneralMd.commandClassNames} " ," info" )
@@ -2114,21 +2115,21 @@ private cleanUp() {
2114
2115
state. remove(" zwtAssocGroupTarget" )
2115
2116
state. remove(" zwtParamTarget" )
2116
2117
2117
- device. updateSetting(" zwtLoggingLevelIDE" , null )
2118
- device. updateSetting(" zwtAssocGroupsScanStart" , null )
2119
- device. updateSetting(" zwtAssocGroupsScanStop" , null )
2120
- device. updateSetting(" zwtEndpointsScanStart" , null )
2121
- device. updateSetting(" zwtEndpointsScanStop" , null )
2122
- device. updateSetting(" zwtParamsScanStart" , null )
2123
- device. updateSetting(" zwtParamsScanStop" , null )
2124
- device. updateSetting(" zwtAssocGroupId" , null )
2125
- device. updateSetting(" zwtAssocGroupMembers" , null )
2126
- device. updateSetting(" zwtAssocGroupCc" , null )
2127
- device. updateSetting(" zwtParamId" , null )
2128
- device. updateSetting(" zwtParamValue" , null )
2129
- device. updateSetting(" zwtProtectLocal" , null )
2130
- device. updateSetting(" zwtProtectRF" , null )
2131
- device. updateSetting(" zwtSwitchAllMode" , null )
2118
+ device? . updateSetting(" zwtLoggingLevelIDE" , null )
2119
+ device? . updateSetting(" zwtAssocGroupsScanStart" , null )
2120
+ device? . updateSetting(" zwtAssocGroupsScanStop" , null )
2121
+ device? . updateSetting(" zwtEndpointsScanStart" , null )
2122
+ device? . updateSetting(" zwtEndpointsScanStop" , null )
2123
+ device? . updateSetting(" zwtParamsScanStart" , null )
2124
+ device? . updateSetting(" zwtParamsScanStop" , null )
2125
+ device? . updateSetting(" zwtAssocGroupId" , null )
2126
+ device? . updateSetting(" zwtAssocGroupMembers" , null )
2127
+ device? . updateSetting(" zwtAssocGroupCc" , null )
2128
+ device? . updateSetting(" zwtParamId" , null )
2129
+ device? . updateSetting(" zwtParamValue" , null )
2130
+ device? . updateSetting(" zwtProtectLocal" , null )
2131
+ device? . updateSetting(" zwtProtectRF" , null )
2132
+ device? . updateSetting(" zwtSwitchAllMode" , null )
2132
2133
2133
2134
}
2134
2135
0 commit comments