View Source PorscheConnEx.Struct.Emobility.ChargeStatus (porsche_conn_ex v0.1.0)
Structure containing information about the electric charging status of a particular vehicle.
Fields
mode(atom) — the current charging mode —:off,:ac,:dc, or:unknown:dcis currently speculative; I have not tested the API while hooked up to a DC Fast Charger.
plug(atom) — the status of the physical charging plug —:connectedor:disconnectedplug_lock(atom) — the lock status of the charging plug —:lockedor:unlockedstate(atom) — the current charging state —:off,:charging,:completed, or:errorreason(atom or tuple) — the reason for the current charging state:immediateif charging due to "direct charge" / user request / etc{:timer, n}if charging due to an upcoming timer in slotn:invalidif there is no reason to charge / charging negotiation is in progess / etc- Note that if there is no immediate charging / climatisation activity, this value is unreliable — the API tends to return
{:timer, 4}, regardless of whether timer #4 is the next timer or not.
external_power(atom) — the status of the external power connection:station_connectedwhen connected to a charging station but not actively drawing power:availablewhen actively drawing power from a charging station:unavailablewhen not connected to a charging station
led_color(atom) — the charging LED colour —:white,:green,:blue,:red, or:offled_state(atom) — the charging LED state —:flash,:blink,:pulse,:solid, or:offpercent(integer) — the current percentage of charge (0 to 100)minutes_to_full(integer) — the estimated number of minutes until target charge is reached- Note that the API appears to calculate this value only when charging parameters change, meaning it will be valid at the start of a charge, but will remain the same (and become quite out of date) until suddenly dropping to zero when charging is complete.
remaining_electric_range(Distance) — the estimated remaining electric travel rangeremaining_conventional_range(Distance) — the estimated remaining conventional travel rangerate(ChargeRate) — the current charge rate, in terms of range increase over timekilowatts(float) — the current charge rate, in kilowattsdc_mode?(boolean) — whether the vehicle is charging in DC mode- This appears to refer to DC power, not Direct Charging. More research needed.
- If this is redundant due to
modeabove, then I'll remove it.
target_time(NaiveDateTime) — the local time that the vehicle intends to complete its next chargetarget_time_opl_enforced(unknown) — has always beennilin testing- Sounds like it may be a boolean?
Summary
Types
@type external_power() :: :station_connected | :available | :unavailable
@type led_color() :: :white | :green | :blue | :red | nil
@type led_state() :: :flashing | :blinking | :pulsing | :solid | :off
@type mode() :: :off | :ac | :dc | :unknown
@type plug() :: :connected | :disconnected
@type plug_lock() :: :locked | :unlocked
@type reason() :: :immediate | :invalid | {:timer, PorscheConnEx.Struct.Emobility.Timer.id()}
@type state() :: :off | :charging | :completed | :error
@type t() :: %PorscheConnEx.Struct.Emobility.ChargeStatus{ dc_mode?: boolean(), external_power: external_power(), kilowatts: float(), led_color: led_color(), led_state: led_state(), minutes_to_full: integer(), mode: mode(), percent: 0..100, plug: plug(), plug_lock: plug_lock(), rate: PorscheConnEx.Struct.Unit.ChargeRate.t(), reason: reason(), remaining_conventional_range: PorscheConnEx.Struct.Unit.Distance.t(), remaining_electric_range: PorscheConnEx.Struct.Unit.Distance.t(), state: state(), target_time: NaiveDateTime.t(), target_time_opl_enforced: any() }