Hi all,
I am using the Qubino meter which is an electrical energy meter. So far when I want to poll the meter to test values I have been using the refresh
command which I have shown below.
def refresh() {
log.debug "refresh()..."
delayBetween([
encap(zwave.associationV2.associationRemove(groupingIdentifier: 1, nodeId:[])), // Refresh Node ID in Group 1
encap(zwave.associationV2.associationSet(groupingIdentifier: 1, nodeId:zwaveHubNodeId)), //Assign Node ID of SmartThings to Group 1
encap(zwave.meterV3.meterGet(scale: 0)),
encap(zwave.meterV3.meterGet(scale: 1)),
encap(zwave.meterV3.meterGet(scale: 2)),
encap(zwave.meterV3.meterGet(scale: 3)),
encap(zwave.meterV3.meterGet(scale: 4)),
encap(zwave.meterV3.meterGet(scale: 5)),
encap(zwave.meterV3.meterGet(scale: 6))
])
}
I specify the scale I want to get which links to a different energy reading, the decoding of the scales is shown in the table below from the Z-Wave command class spec below.
The meter supports both Energy Imported (consumed energy) and Energy Exported (produced energy) from such devices as solar panels/wind turbines. How Z-Wave devices specify if the value is an import/export is the Rate Type. The decoding of the Rate Types from the Z-Wave command class spec is shown below.
At the moment when I query the meter based upon scale using the meterGet
command by default the returned Rate Type is 1, an example of a log of a parsed MeterReport
is shown below.
6b30cedc-5970-4c73-888e-467ff5cad52a 10:29:47: debug MeterReport(scale2: false, scale: 0, rateType: 1, precision: 1, meterValue: [0, 0, 0, 0], deltaTime: 0, meterType: 1, size: 4, scaledPreviousMeterValue: 0.0, scaledMeterValue: 0.0, previousMeterValue: [0, 0, 0, 0])
Is there anyway to use the MeterGet
command and specify the RateType along with the Scale using the Z-Wave command class supported by SmartThings? Something like the code shown below (the code below does give errors).
zwave.meterV3.meterGet(scale: 0,rateType:2)
The meterGet command has inputs of scale
and a payload
list, what values are allowed in the payload
input does anyone know?
The following also gives errors suggesting payload
may be a read-only property.
def list = [rateType:2]
zwave.meterV3.meterGet(scale: 0,payload:list)
11:06:22: error groovy.lang.ReadOnlyPropertyException: Cannot set readonly property: payload for class: physicalgraph.zwave.commands.meterv3.MeterGet @line 196 (refresh)