Skip to content

Commit

Permalink
Added readme doc file for monitors
Browse files Browse the repository at this point in the history
Signed-off-by: AssemblyJohn <[email protected]>
  • Loading branch information
AssemblyJohn committed Aug 9, 2024
1 parent 80eb9c0 commit 3230cbb
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 17 deletions.
34 changes: 17 additions & 17 deletions config/v201/component_schemas/standardized/MonitoringCtrlr.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,22 @@
"type": "integer",
"default": 9
},
"OfflineQueuingSeverity": {
"variable_name": "OfflineQueuingSeverity",
"characteristics": {
"supportsMonitoring": true,
"dataType": "integer"
},
"attributes": [
{
"type": "Actual",
"mutability": "ReadWrite"
}
],
"description": "When set and the Charging Station is offline, the Charging Station shall queue any notifyEventRequest messages triggered by a monitor with a severity number equal to or lower than the severity configured here.",
"type": "integer",
"default": 9
},
"BytesPerMessageClearVariableMonitoring": {
"variable_name": "BytesPerMessage",
"characteristics": {
Expand Down Expand Up @@ -131,23 +147,7 @@
"instance": "SetVariableMonitoring",
"description": "Maximum number of setMonitoringData elements that can be sent in one setVariableMonitoringRequest message.",
"type": "integer"
},
"OfflineQueuingSeverity": {
"variable_name": "OfflineQueuingSeverity",
"characteristics": {
"supportsMonitoring": true,
"dataType": "integer"
},
"attributes": [
{
"type": "Actual",
"mutability": "ReadWrite"
}
],
"description": "When set and the Charging Station is offline, the Charging Station shall queue any notifyEventRequest messages triggered by a monitor with a severity number equal to or lower than the severity configured here.",
"type": "integer",
"default": 9
}
}
},
"required": [
"BytesPerMessageSetVariableMonitoring",
Expand Down
76 changes: 76 additions & 0 deletions doc/ocpp_201_monitors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# OCPP 2.0.1: Monitors

Check notice on line 1 in doc/ocpp_201_monitors.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocpp_201_monitors.md#L1

Expected: [None]; Actual: # OCPP 2.0.1: Monitors

Monitors are a mechanism for reporting based on certain criteria the internal state of the variables present on the charger. The monitors can be configured in different ways, with custom monitors being sent from the CSMS and HardWired and Preconfigured monitors set up in the config of the database.

Check notice on line 3 in doc/ocpp_201_monitors.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocpp_201_monitors.md#L3

Expected: 80; Actual: 299


Check notice on line 5 in doc/ocpp_201_monitors.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocpp_201_monitors.md#L5

Expected: 1; Actual: 2
## Basic Configuration

The monitors are evaluated from time to time in the case of periodic monitors and after a variable has been modified in the case of monitors that are triggered. Periodic monitors will be handles from time to time, the default being 1 second.

Check notice on line 8 in doc/ocpp_201_monitors.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocpp_201_monitors.md#L8

Expected: 80; Actual: 241

### Variables:

Check notice on line 10 in doc/ocpp_201_monitors.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocpp_201_monitors.md#L10

Expected: 1; Actual: 0; Below

Check notice on line 10 in doc/ocpp_201_monitors.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocpp_201_monitors.md#L10

Punctuation: ':'
- Enabling monitors: set the `MonitoringCtrlrEnabled` variable to true

Check notice on line 11 in doc/ocpp_201_monitors.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocpp_201_monitors.md#L11

Lists should be surrounded by blank lines
- Periodic monitor process time: set the `MonitorsProcessingInterval` to the desired interval (default 1 second)

Check notice on line 12 in doc/ocpp_201_monitors.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocpp_201_monitors.md#L12

Expected: 80; Actual: 112
- To activate monitor processing: set the `ActiveMonitoringBase` variable to `All`
- To filter the verbosity level: set the `ActiveMonitoringLevel` variable to a value of 0-9 with 9 being the most verbose

Check notice on line 14 in doc/ocpp_201_monitors.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocpp_201_monitors.md#L14

Expected: 80; Actual: 121
- To filter the verbosity level when the charging station is offline: set the `OfflineQueuingSeverity` value to 0-9, with 9 keeping all monitor generated event while being offline

Check notice on line 15 in doc/ocpp_201_monitors.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocpp_201_monitors.md#L15

Expected: 80; Actual: 179

Note: there is a small overhead for the monitoring process interval, the periodic monitors that are triggered will require a database value query. However, based on the count and config of monitors is is unlikely that many of them will trigger at the same time, therefore, the database queries will be limited.

Check notice on line 17 in doc/ocpp_201_monitors.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocpp_201_monitors.md#L17

Expected: 80; Actual: 310

## Hardwired/Preconfigured Monitors

In order to set up pre-existing monitors that are not set up by the CSMS, for the variables that allow monitoring the configuration json file can be extended in the following way:

Check notice on line 21 in doc/ocpp_201_monitors.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocpp_201_monitors.md#L21

Expected: 80; Actual: 179

```

Check notice on line 23 in doc/ocpp_201_monitors.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocpp_201_monitors.md#L23

Fenced code blocks should have a language specified
"EVSEPower": {
"variable_name": "Power",
"characteristics": {
"unit": "W",
"maxLimit": 22000,
"supportsMonitoring": true,
"dataType": "decimal"
},
"attributes": [
{
"type": "Actual",
"mutability": "ReadOnly"
},
{
"type": "MaxSet",
"mutability": "ReadOnly"
}
],
"monitors": [
{
"value": 21950,
"severity": 1,
"transaction": false,
"type": "UpperThreshold",
"config_type": "HardWiredMonitor"
},
{
"value": 100,
"severity": 1,
"transaction": false,
"type": "LowerThreshold",
"config_type": "HardWiredMonitor"
},
{
"value": 100,
"severity": 1,
"transaction": false,
"type": "Delta",
"reference_value": "10700",
"config_type": "PreconfiguredMonitor"
}
],
"description": "",
"type": "number",
"default": "0"
}
```

In the example for the 'EVSEPower' variable that supports monitoring there were attached three hardwired and preconfigured monitors. The monitors will report (based on out setup, see the `Basic Configuration` section) to the CSMS when the power will exceed '21950' W, when the power will fall below '100' W and when there will be a delta difference of more than `100` W from the `reference_value` in the case of the delta monitor. When the delta is exceeded the `reference_value` will be updated internally, and a new delta will be calculated based on that.

Check notice on line 72 in doc/ocpp_201_monitors.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocpp_201_monitors.md#L72

Expected: 80; Actual: 557

For more information related to the monitor functionality, please refer to the OCPP201 specification.

Check notice on line 74 in doc/ocpp_201_monitors.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocpp_201_monitors.md#L74

Expected: 80; Actual: 101

Note: for a delta monitor, an initial `reference_value` must be provided.

Check notice on line 76 in doc/ocpp_201_monitors.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocpp_201_monitors.md#L76

Files should end with a single newline character

0 comments on commit 3230cbb

Please sign in to comment.