If EVerest starts up with an EV plugged in (and authorization is present immediately), there is a race condition between the TransactionStarted event and the first powermeter value received. Without this change, transactions may start and use an initial meter value of 0.
This PR adds handling to wait for an initial powermeter value before the EvseManager becomes operational (is ready to start charging). The waiting time is configurable ( initial_meter_value_timeout_ms ) or can be disabled (by configuring 0)
Issue ticket number and link
Checklist before requesting a review
[x] I have performed a self-review of my code
[ ] I have made corresponding changes to the documentation
Describe your changes
If EVerest starts up with an EV plugged in (and authorization is present immediately), there is a race condition between the TransactionStarted event and the first powermeter value received. Without this change, transactions may start and use an initial meter value of 0.
This PR adds handling to wait for an initial powermeter value before the EvseManager becomes operational (is ready to start charging). The waiting time is configurable (
initial_meter_value_timeout_ms
) or can be disabled (by configuring 0)Issue ticket number and link
Checklist before requesting a review