multi: Fix invalid accelerometer readings during refresh

The code can only correctly handle the accelerometer readings when they
are all received in the same message. Individual reads of the attributes
results in individual read attribute responses which led to events with
incorrect values. The most straightforward fix is to not read the attributes
in the first place and rely on attribute reporting to report the values
at the appropriate time.

Resolves:
https://smartthings.atlassian.net/browse/DVCSMP-1315
This commit is contained in:
Tom Manley
2015-12-09 23:56:51 -06:00
parent e529624d36
commit fe4a2ed3d0

View File

@@ -384,20 +384,8 @@ def getTemperature(value) {
"zcl mfg-code ${manufacturerCode}", "delay 200",
"zcl global read 0xFC02 0x0010",
"send 0x${device.deviceNetworkId} 1 1","delay 400",
"zcl mfg-code ${manufacturerCode}", "delay 200",
"zcl global read 0xFC02 0x0012",
"send 0x${device.deviceNetworkId} 1 1","delay 400",
"zcl mfg-code ${manufacturerCode}", "delay 200",
"zcl global read 0xFC02 0x0013",
"send 0x${device.deviceNetworkId} 1 1","delay 400",
"zcl mfg-code ${manufacturerCode}", "delay 200",
"zcl global read 0xFC02 0x0014",
"send 0x${device.deviceNetworkId} 1 1", "delay 400"
]
"send 0x${device.deviceNetworkId} 1 1","delay 400"
]
return refreshCmds + enrollResponse()
}