@@ -17,7 +17,7 @@ To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini**
17
17
- [ Running the Complete Example on Raspberry Pi 4] ( #running-the-complete-example-on-raspberry-pi-4 )
18
18
- [ Running RPC Console] ( #running-rpc-console )
19
19
- [ Device Tracing] ( #device-tracing )
20
- - [ Python TestCases ] ( #python-testcases )
20
+ - [ Python Test Cases ] ( #python-test-cases )
21
21
- [ Running the test cases:] ( #running-the-test-cases )
22
22
- [ CHIP-REPL Interaction] ( #chip-repl-interaction )
23
23
- [ Building chip-repl:] ( #building-chip-repl )
@@ -149,7 +149,7 @@ Obtain tracing json file.
149
149
-o {OUTPUT_FILE} -t {ELF_FILE} {PIGWEED_REPO}/pw_trace_tokenized/pw_trace_protos/trace_rpc.proto
150
150
```
151
151
152
- ## Python TestCases
152
+ ## Python Test Cases
153
153
154
154
When you want to test this cluster you can use chip-repl or chip-tool by hand.
155
155
CHIP-REPL is slightly easier to interact with when dealing with some of the
@@ -158,20 +158,20 @@ complex structures.
158
158
There are several test scripts provided for EVSE (in
159
159
[ src/python_testing] ( src/python_testing ) ):
160
160
161
- - TC_EEVSE_2_2: This validates the primary functionality
162
- - TC_EEVSE_2_3: This validates Get/Set/Clear target commands
163
- - TC_EEVSE_2_4: This validates Faults
164
- - TC_EEVSE_2_5: This validates EVSE diagnostic command (optional)
161
+ - ` TC_EEVSE_2_2 ` : This validates the primary functionality
162
+ - ` TC_EEVSE_2_3 ` : This validates Get/Set/Clear target commands
163
+ - ` TC_EEVSE_2_4 ` : This validates Faults
164
+ - ` TC_EEVSE_2_5 ` : This validates EVSE diagnostic command (optional)
165
165
166
- These scripts require the use of TestEventsTriggers via the GeneralDiagnostics
167
- cluster on Endpoint 0. This requires an enableKey (16 bytes) and a set of
168
- reserved int64_t TestEvent trigger codes.
166
+ These scripts require the use of Test Event Triggers via the GeneralDiagnostics
167
+ cluster on Endpoint 0. This requires an ` enableKey ` (16 bytes) and a set of
168
+ reserved int64_t test event trigger codes.
169
169
170
170
By default the test event support is not enabled, and when compiling the example
171
171
app you need to add ` chip_enable_energy_evse_trigger=true ` to the gn args.
172
172
173
173
$ gn gen out/debug
174
- $ ninja -C out/debug --args='chip_enable_energy_evse_trigger=true`
174
+ $ ninja -C out/debug --args='chip_enable_energy_evse_trigger=true'
175
175
176
176
Once the application is built you also need to tell it at runtime what the
177
177
chosen enable key is using the ` --enable-key ` command line option.
@@ -292,10 +292,11 @@ Out[2]: <chip.native.PyChipError object at 0x7f2432b16140>
292
292
subscription = await devCtrl.ReadAttribute(1234 ,[(1 , chip.clusters.EnergyEvse)], reportInterval = reportingTimingParams)
293
293
```
294
294
295
- - Step 6: Send an EnableCharging command which lasts for 60 seconds The
296
- EnableCharging takes an optional parameter which allows the charger to
297
- automatically disable itself at some preset time in the future. Note that it
298
- uses Epoch_s (which is from Jan 1 2000) which is a uint32_t in seconds.
295
+ - Step 6: Send an ` EnableCharging ` command which lasts for 60 seconds The
296
+ ` EnableCharging ` takes an optional ` chargingEnabledUntil ` parameter which
297
+ allows the charger to automatically disable itself at some preset time in
298
+ the future. Note that it uses Epoch_s (which is from Jan 1 2000) which is a
299
+ uint32_t in seconds.
299
300
300
301
``` python
301
302
from datetime import datetime, timezone, timedelta
@@ -369,7 +370,7 @@ The test event triggers values can be found in:
369
370
370
371
- 0x0099000000000000 - Simulates the EVSE being installed on a 32A supply
371
372
- 0x0099000000000002 - Simulates the EVSE being plugged in (this should
372
- generate an EVConnected event)
373
+ generate an ` EVConnected ` event)
373
374
- 0x0099000000000004 - Simulates the EVSE requesting power
374
375
375
376
To send a test event trigger to the app, use the following commands (in
@@ -384,7 +385,7 @@ chip-repl):
384
385
385
386
```
386
387
387
- Now send the enable charging command (omit the chargingEnabledUntil arg this
388
+ Now send the enable charging command (omit the ` chargingEnabledUntil ` arg this
388
389
time):
389
390
390
391
``` python
@@ -440,7 +441,7 @@ Now send the test event trigger to simulate the EV asking for demand:
440
441
441
442
- We can see that the ` EventNumber 65538 ` was sent when the vehicle was
442
443
plugged in, and a new ` sessionID=0 ` was created.
443
- - We can also see that the EnergyTransferStarted was sent in
444
+ - We can also see that the ` EnergyTransferStarted ` was sent in
444
445
` EventNumber 65539 `
445
446
446
447
What happens when we unplug the vehicle?
@@ -494,13 +495,14 @@ When we re-read the events:
494
495
495
496
```
496
497
497
- - In ` EventNumber 65540 ` we had an EnergyTransferStopped event with reason
498
+ - In ` EventNumber 65540 ` we had an ` EnergyTransferStopped ` event with reason
498
499
` kOther ` .
499
500
500
501
This was a rather abrupt end to a charging session (normally we would see
501
502
the EVSE or EV decide to stop charging), but this demonstrates the cable
502
503
being pulled out without a graceful charging shutdown.
503
504
504
- - In ` EventNumber 65541 ` we had an EvNotDetected event showing that the state
505
- was ` kPluggedInCharging ` prior to the EV being not detected (normally in a
506
- graceful shutdown this would be ` kPluggedInNoDemand ` or ` kPluggedInDemand ` ).
505
+ - In ` EventNumber 65541 ` we had an ` EvNotDetected ` event showing that the
506
+ state was ` kPluggedInCharging ` prior to the EV being not detected (normally
507
+ in a graceful shutdown this would be ` kPluggedInNoDemand ` or
508
+ ` kPluggedInDemand ` ).
0 commit comments