Power Event
With power event a consumer can get notified when their power level exceeds a certain threshold. This can be a positive threshold to get notified on excessive high consumption to take action. It can also be a negative threshold that nudges consumers to start consuming more electricity in order to improve self consumption. To prevent overflowing the consumer with events there can be a cooldown period enabled. Events will only get triggered when the peak is relevant enough, this can be set with the aggregation method.
ZCL command
The ZCL command can be made with the JSON body as shown below.
{
"cmd": "<Command_ID>",
"profile": "0104",
"endpoint": "0A",
"cluster": "FC02",
"clientCmd": false,
"clusterSpecific": true,
"manufacturerId": "4E47",
"payload": "<Version><Bitmap><Alert><Threshold_W><Cooldown_S><Agg_Method><Sample_Count><Sample_Interval>"
}
The payload consists of multiple fields, see below the summary and in the following sections a more detailed explanation.
Data type | Description | |
---|---|---|
Version | UINT8 | Message version |
Bitmap | UINT8 | What event to set |
Alert | UINT8 | How the threshold will be exceeded (LOHI, HILO, both, none) |
Threshold | INT32 | Threshold in Watt |
Cooldown | UINT32 | Cooldown time after the event in seconds |
Aggregation method | UINT8 | How to aggregate the data (mean, mode, median, none) |
Sample count | UINT8 | Amount of samples to aggregate |
Sample interval | UINT8 | Interval between samples |
Command ID
Command ID | Command Name |
---|---|
0x10 | ZCL_CMD_ID_NILM_EE_SET_POWER |
0x11 | ZCL_CMD_ID_NILM_EE_SET_CONSUMPTION |
0x12 | ZCL_CMD_ID_NILM_EE_GET_POWER |
0x13 | ZCL_CMD_ID_NILM_EE_GET_CONSUMPTION |
Bitmap
The Bitmap is used to indicate which power threshold slots can be configured. Multiple thresholds can be set at the same time. The configurations are set sequentially, so the first configuration in the payload corresponds to the lowest set bit.
Alert
Depending on the desired outcome an alert will be sent when the threshold is exceeded. If a solar injection alert needs to be set an alert is desired when the negative threshold is exceed from high-to-low. For a regular consumption threshold the alert needs to happen when the thresholds is exceeded from low-to-high.
One of the four options below can be set in the alert field.
Value | Alert |
---|---|
0x00 | None |
0x01 | Alert sent when threshold is exceeded from low to high |
0x02 | Alert sent when threshold is exceeded from high to low |
0x03 | Alert sent when threshold is exceeded from Both sides |
Threshold
This is the threshold that needs to be acted upon, set in Watt (W).
Cooldown
To prevent conditions where many alerts are sent in an overwhelming amount there is the possibility for setting the cooldown timer. This timer will control a period of no alerts for the given time after the last alert is sent.
Cooldown period affects all related events
Keep in mind that lower thresholds of the same polarity also have cooldown triggered when higher threshold events are generated.
The cooldown timer is set in seconds.
Aggregation method
With the aggregation method field the type of aggregation can be selected. The sample buffer will be aggregated in the described way.
Value | Aggregation method |
---|---|
0x00 | Mean |
0x01 | Mode |
0x02 | Median |
0x03 | None |
Sample Count
Sample count states the amount of samples will be used in the aggregation method. The sample count field is a UINT8
, so can contain a value from 0 until 255.
Sample Interval
The aggregation buffer will be filled with a maximum of "sample count" samples with a fixed interval that is given with the sample interval field. This field is a UINT8
, so contains a value from 0 until 255 seconds.
Event
Once the event is triggered the following information will be notified to the platform.
UINT8 | UINT16 | UINT8 | INT32 | VAR |
---|---|---|---|---|
Version | Bitmap | Transition | Current power (W) | Configurations |
Updated over 1 year ago