Repository navigation
v0.3.0
A site file can now say what state each charger is in, and keep it so: plugged in, faulted, offline or left off, each time the charger powers on.
Before you update
A Finishing connector now accepts a new start. In v0.2.1 a connector whose transaction had ended with the EV still plugged in refused every start until the EV was unplugged. Now an accepted tap or a RemoteStartTransaction starts a new transaction, and the CSMS sees Preparing, then Charging (OCPP 1.6 section 4.9, transition F2).
- A test that expects
Rejectedfrom aFinishingconnector needs changing. A faulted, unavailable or busy connector still answersRejected. - A remote start that names no connector picks one with an EV waiting, then one that is
Finishing, then the lowest-numbered free one. - A rejected tag leaves the connector
Finishing, and nothing starts by itself there, even withstartOn: plug. - Site files, Chargerfiles, scenarios and saved chargers work as before. A charger with no
stateblock behaves as it did.
New
Declared state in the site file
A charger entry may carry a state block: the state the charger is in each time it powers on.
chargers:
lobby: { model: ./wallbox.Chargerfile, id: LOBBY-1, state: { connectors: { 1: { ev: longrange } } } } # Preparing
bay: { model: ./Chargerfile, id: BAY-1, state: { connectors: { 2: { fault: { code: GroundFailure, info: RCD tripped } } } } }
gone: { model: ./Chargerfile, id: GONE-1, state: { connection: offline } } # stays away
spare: { model: ./Chargerfile, id: SPARE-1, state: { connection: stopped } } # never started- It is applied at every power-on:
site up,site start,start,restart, a start afterkill, and the restartplugyard updatedoes. A reboot and aResetfrom the CSMS are not a power-on. - A change made by hand lasts until the next power-on.
plugyard restart BAY-1puts one charger back. - A connector that is listed is declared whole; one that is not listed follows the saved state. What the CSMS set, such as
Unavailable, meters, configuration and charging profiles, is untouched. - A charger declared
stoppedis created and left off;plugyard start SPARE-1powers it on. inspectandsite validateshow what is declared.
Renewing a declared EV
A plugged-in EV fills up in the end, and every transaction after that ends at once. A declared EV may now say renew:
state:
connectors:
1: { ev: longrange, renew: 5m }- Once the EV is full and its connector has no transaction, it leaves after the
renewtime, and a fresh EV of the same preset arrives after the same time again. The connector reportsFinishing,Available,Preparing. - The time is real time, whatever the speed of the site.
- With
startOn: plugthe fresh EV starts a transaction, so the connector keeps cycling. WithonEvFull: suspendthe transaction stays open and the EV is not renewed. - Only the declared EV is renewed. Plugging in or unplugging by hand ends it until the charger next powers on.
What's Changed
- Pin the compose example to 0.2.1 by @Amraa1 in #38
- Start a new transaction on a Finishing connector by @Amraa1 in #41
- Declare each charger's state in the site file by @Amraa1 in #43
- Renew a declared EV when it is full by @Amraa1 in #44
Full Changelog: v0.2.1...v0.3.0