# Layout flow This diagram shows the different layouts that should be shown to the user, and which internal messages that cause transitions between them. ```plantuml @startuml hide empty description state ConnectionAvailable #lightgreen state ScanQrCode #lightgreen { ScanQrCode: Also includes app etc.\n(B1) } state Authenticating #lightgreen { Authenticating: Charging station controller does this\n(B1) } state NoAccess #yellow state Preparing #lightblue { Preparing: EVSEC::StartCharging\n(Bx) } state Charging #lightblue { Charging: Relays closed (C2) } state ChargingPaused #lightblue { ChargingPaused: Relays open\n(Bx or C1) } state EcoModeCharging #lightgrey state ChargingEnded #lightgreen state Error #red [*] --> ConnectionAvailable: ChargingStationController in idle? B01 / setup complete? ConnectionAvailable --> ScanQrCode: EVSEC::EVPluggedIn ConnectionAvailable -[#red,bold]-> Authenticating note on link NFC::NFCTag before EvPluggedIn? end note ScanQrCode --> Authenticating: NFC::NFCTag Authenticating --> Preparing: CSC::<<Authentication successful>> Authenticating --> NoAccess: CSC::<<Authentication failed>> NoAccess --> ScanQrCode: After 3 sec Preparing --> Charging: EVSEC::PowerPathClosed Charging --> ChargingPaused: EVSEC::PowerPathOpen Charging --> ChargingEnded: EVSEC::EVUnplugged \nOR De-authorized ChargingPaused --> Charging: EVSEC::PowerPathClosed ChargingPaused --> ChargingEnded: EVSEC::EVUnplugged ChargingEnded -up-> ConnectionAvailable: After 15 sec @enduml ``` CSC: ChargingStationController EVSEC: EvseController ## Questions - What happens when "de-authorization" happens during charging? (RFID-/NFC swipe)? - Should authentication be possible before EvPlugin? ## ConnectionAvailable ## ScanQrCode Right after plugin ## Authenticating ## NoAccess ## Initializing ## Charging ## EcoModeCharging Not supported for first release ## ChargingPaused ## ChargingEnded ## Error