Power Meter
- class st.zigbee.defaults.powerMeter.ActivePowerConfiguration
- cluster: number
ElectricalMeasurement ID 0x0B04
- attribute: number
ActivePower ID 0x050B
- minimum_interval: number
1 seconds
- maximum_interval: number
3600 seconds (1 hour)
- data_type: st.zigbee.data_types.Int16
the Int16 class
- reportable_change: number
1 (some amount of W, dependent on multiplier and divisor)
- class st.zigbee.defaults.powerMeter.InstantaneousDemandConfiguration
- cluster: number
SimpleMetering ID 0x0702
- attribute: number
InstantaneousDemand ID 0x0400
- minimum_interval: number
1 seconds
- maximum_interval: number
3600 seconds (1 hour)
- data_type: st.zigbee.data_types.Int24
the Int24 class
- reportable_change: number
1 (some amount of W, dependent on multiplier and divisor)
- class st.zigbee.defaults.powerMeter
- zigbee_handlers: table
- attribute_configurations: table
- capability_handlers: table
- default_active_power_configuration: st.zigbee.defaults.powerMeter.ActivePowerConfiguration
- default_instantaneous_demand_configuration: st.zigbee.defaults.powerMeter.InstantaneousDemandConfiguration
- static electrical_measurement_divisor_handler(driver, device, divisor, zb_rx)
Default handler for ACPowerDivisor attribute on ElectricalMeasurement cluster
This will take the Uint16 value of the ACPowerDivisor on the ElectricalMeasurement cluster and set the devices field constants.ELECTRICAL_MEASUREMENT_DIVISOR_KEY to the value. This will then be used in the default handling of the ActivePower attribute
- Parameters
driver (
ZigbeeDriver
) – The current driver running containing necessary context for executiondevice (
st.zigbee.Device
) – The device this message was received from containing identifying informationdivisor (
st.zigbee.data_types.Uint16
) – the value of the Divisorzb_rx (
st.zigbee.ZigbeeMessageRx
) – the full message this report came in
- static electrical_measurement_multiplier_handler(driver, device, multiplier, zb_rx)
Default handler for ACPowerMultiplier attribute on ElectricalMeasurement cluster
This will take the Uint16 value of the ACPowerMultiplier on the ElectricalMeasurement cluster and set the devices field constants.ELECTRICAL_MEASUREMENT_MULTIPLIER_KEY to the value. This will then be used in the default handling of the ActivePower attribute
- Parameters
driver (
ZigbeeDriver
) – The current driver running containing necessary context for executiondevice (
st.zigbee.Device
) – The device this message was received from containing identifying informationmultiplier (
st.zigbee.data_types.Uint16
) – the value of the Divisorzb_rx (
st.zigbee.ZigbeeMessageRx
) – the full message this report came in
- static active_power_meter_handler(driver, device, value, zb_rx)
Default handler for ActivePower attribute on ElectricalMeasurement cluster
This converts the Int16 instantaneous demand into the powerMeter.power capability event. This will check the device for values set in the constants.ELECTRICAL_MEASUREMENT_MULTIPLIER_KEY and constants.ELECTRICAL_MEASUREMENT_DIVISOR_KEY to convert the raw value to the correctly scaled values. These fields should be set by reading the values from the same cluster
- Parameters
driver (
ZigbeeDriver
) – The current driver running containing necessary context for executiondevice (
st.zigbee.Device
) – The device this message was received from containing identifying informationvalue (
st.zigbee.data_types.Int16
) – the value of the ActivePowerzb_rx (
st.zigbee.ZigbeeMessageRx
) – the full message this report came in
- static simple_metering_divisor_handler(driver, device, divisor, zb_rx)
Default handler for Divisor attribute on SimpleMetering cluster
This will take the Int24 value of the Divisor on the SimpleMetering cluster and set the devices field constants.SIMPLE_METERING_DIVISOR_KEY to the value. This will then be used in the default handling of the InstantaneousDemand attribute
- Parameters
driver (
ZigbeeDriver
) – The current driver running containing necessary context for executiondevice (
st.zigbee.Device
) – The device this message was received from containing identifying informationdivisor (
st.zigbee.data_types.Int24
) – the value of the Divisorzb_rx (
st.zigbee.ZigbeeMessageRx
) – the full message this report came in
- static simple_metering_multiplier_handler(driver, device, multiplier, zb_rx)
Default handler for Multiplier attribute on SimpleMetering cluster
This will take the Int24 value of the Multiplier on the SimpleMetering cluster and set the devices field constants.SIMPLE_METERING_MULTIPLIER_KEY to the value. This will then be used in the default handling of the InstantaneousDemand attribute
- Parameters
driver (
ZigbeeDriver
) – The current driver running containing necessary context for executiondevice (
st.zigbee.Device
) – The device this message was received from containing identifying informationmultiplier (
st.zigbee.data_types.Int24
) – the value of the Multiplierzb_rx (
st.zigbee.ZigbeeMessageRx
) – the full message this report came in
- static instantaneous_demand_handler(driver, device, value, zb_rx)
Default handler for InstantaneousDemand attribute on SimpleMetering cluster
This converts the Int24 instantaneous demand into the powerMeter.power capability event. This will check the device for values set in the constants.SIMPLE_METERING_MULTIPLIER_KEY and constants.SIMPLE_METERING_DIVISOR_KEY to convert the raw value to the correctly scaled values. These fields should be set by reading the values from the same cluster
- Parameters
driver (
ZigbeeDriver
) – The current driver running containing necessary context for executiondevice (
st.zigbee.Device
) – The device this message was received from containing identifying informationvalue (
st.zigbee.data_types.Int24
) – the value of the instantaneous demandzb_rx (
st.zigbee.ZigbeeMessageRx
) – the full message this report came in