Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Ladepunkte.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Die Einstellungen für Ladepunkte unterteilen sich in die spezifischen Einstellu

Beim Hinzufügen eines Ladepunkts muss zunächst dessen Typ ausgewählt werden. Danach wird Ladepunkt-spezifisches, wie z.B. die Anzahl angeschlossener Phasen oder eine verbaute Phasenumschaltung, konfiguriert.

In dem Ladepunkt-Profil sind die Einstellungen zum automatischen Sperren (Autolock) und für die Freigabe von Ladepunkten durch ID-Tags enthalten. Ein Ladepunkt-Profil kann vom Benutzer mehreren Ladepunkte zugewiesen werden, sodass die Einstellungen für jeden Ladepunkte einzeln oder für eine Gruppe zugewiesen werden können.
In dem Ladepunkt-Profil sind die Einstellungen zum Sperren nach Uhrzeit und für die Freigabe von Ladepunkten durch ID-Tags enthalten. Ein Ladepunkt-Profil kann vom Benutzer mehreren Ladepunkte zugewiesen werden, sodass die Einstellungen für jeden Ladepunkte einzeln oder für eine Gruppe zugewiesen werden können.

Das Erfassen eines RFID-Tags (verbauter RFID-Leser erforderlich) oder die Pin-Eingabe (Display erforderlich, Eingabefeld muss im Steuerungsmodus 'secondary' aktiviert werden) sowie die automatische
Fahrzeugerkennung der openWB Pro (muss in den Einstellungen aktiviert werden) werden gleich verarbeitet.
8 changes: 6 additions & 2 deletions packages/control/algorithm/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,12 @@ def update_raw_data(preferenced_chargepoints: List[Chargepoint],

if diff_to_zero is False:
if chargepoint.data.control_parameter.min_current < max_target_set_current:
diffs = [chargepoint.data.control_parameter.min_current -
max_target_set_current if required_currents[i] != 0 else 0 for i in range(3)]
if surplus:
diffs = [chargepoint.data.set.target_current -
max_target_set_current if required_currents[i] != 0 else 0 for i in range(3)]
else:
diffs = [chargepoint.data.control_parameter.min_current -
max_target_set_current if required_currents[i] != 0 else 0 for i in range(3)]
else:
continue
else:
Expand Down
6 changes: 3 additions & 3 deletions packages/control/chargepoint/chargepoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@ def _is_autolock_inactive(self) -> Tuple[bool, Optional[str]]:
if data.data.optional_data.data.rfid.active:
if self.data.get.rfid is None and self.data.set.rfid is None:
state = False
message = ("Keine Ladung, da der Ladepunkt durch Autolock gesperrt ist und erst per ID-Tag "
"freigeschaltet werden muss.")
message = ("Keine Ladung, da der Ladepunkt durch Sperren nach Uhrzeit gesperrt ist und erst "
"per ID-Tag freigeschaltet werden muss.")
else:
state = True
message = None
else:
state = False
message = "Keine Ladung, da Autolock aktiv ist."
message = "Keine Ladung, da Sperren nach Uhrzeit aktiv ist."
return state, message

def _is_manual_lock_inactive(self) -> Tuple[bool, Optional[str]]:
Expand Down
2 changes: 1 addition & 1 deletion packages/control/chargepoint/chargepoint_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def is_locked_by_autolock(self, charge_state: bool) -> bool:
else:
return False
else:
log.info("Keine Sperrung durch Autolock, weil keine Zeitpläne konfiguriert sind.")
log.info("Keine Sperrung durch Sperren nach Zeitplan, weil keine Zeitpläne konfiguriert sind.")
return False
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion packages/control/counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def switch_on_timer_expired(self, chargepoint: Chargepoint) -> None:
control_parameter.timestamp_switch_on_off = None
self.data.set.reserved_surplus -= pv_config.switch_on_threshold*control_parameter.phases
msg = self.SWITCH_ON_EXPIRED.format(pv_config.switch_on_threshold)
control_parameter.state = ChargepointState.CHARGING_ALLOWED
control_parameter.state = ChargepointState.WAIT_FOR_USING_PHASES

if chargepoint.data.set.charging_ev_data.charge_template.data.chargemode.pv_charging.feed_in_limit:
feed_in_yield = pv_config.feed_in_yield
Expand Down
2 changes: 1 addition & 1 deletion packages/helpermodules/abstract_plans.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ class TimeChargingPlan(TimeframePlan):

@dataclass
class AutolockPlan(TimeframePlan):
name: str = "neuer Autolock-Plan"
name: str = "neuer Plan für Sperren nach Uhrzeit"
4 changes: 2 additions & 2 deletions packages/helpermodules/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def addAutolockPlan(self, connection_id: str, payload: dict) -> None:
Pub().pub("openWB/set/command/max_id/autolock_plan", new_id)
pub_user_message(
payload, connection_id,
f'Neuer Autolock-Plan mit ID \'{new_id}\' zu Profil '
f'Neuer Plan für Sperren nach Uhrzeit mit ID \'{new_id}\' zu Profil '
f'\'{payload["data"]["template"]}\' hinzugefügt.',
MessageType.SUCCESS)

Expand All @@ -329,7 +329,7 @@ def removeAutolockPlan(self, connection_id: str, payload: dict) -> None:
"")
pub_user_message(
payload, connection_id,
f'Autolock-Plan mit ID \'{payload["data"]["plan"]}\' vom Profil '
f'Plan für Sperren nach Uhrzeit mit ID \'{payload["data"]["plan"]}\' vom Profil '
f'\'{payload["data"]["template"]}\' gelöscht.',
MessageType.SUCCESS)

Expand Down
3 changes: 2 additions & 1 deletion packages/helpermodules/create_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ def write_to_file(file_handler, func, default: Optional[Any] = None):
data = f.read()
req.get_http_session().put("https://openwb.de/tools/debug2.php",
data=data,
params={'debugemail': debug_email})
params={'debugemail': debug_email},
timeout=10)

log.info("***** cleanup...")
os.remove(debug_file)
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/chargepoints/openwb_pro/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self, ip_address: Optional[str] = None, duo_num: int = 0):

class OpenWBPro(SetupChargepoint[OpenWBProConfiguration]):
def __init__(self,
name: str = "openWB Pro",
name: str = "openWB Pro (nicht Pro+)",
type: str = "openwb_pro",
id: int = 0,
configuration: OpenWBProConfiguration = None) -> None:
Expand Down
3 changes: 2 additions & 1 deletion packages/modules/common/hardware_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
METER_NO_SERIAL_NUMBER = ("Die Seriennummer des Zählers für das Ladelog kann nicht ausgelesen werden. Wenn Sie die "
"Seriennummer für Abrechnungszwecke benötigen, wenden Sie sich bitte an unseren Support. Die "
"Funktionalität wird dadurch nicht beeinträchtigt!")
EVSE_BROKEN = "Auslesen der EVSE nicht möglich. Vermutlich ist die EVSE defekt oder hat eine unbekannte Modbus-ID."
EVSE_BROKEN = ("Auslesen der EVSE nicht möglich. Vermutlich ist die EVSE defekt oder hat eine unbekannte Modbus-ID. "
"(Fehlermeldung nur relevant, wenn diese auf der Startseite oder im Status angezeigt wird.)")


def check_meter_values(voltages: List[float]) -> Optional[str]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@
).toFixed(1) + ' ct'
: '-'
}}

<i
v-if="props.chargepoint.etActive"
class="fa-solid fa-sm fas fa-edit ms-2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const statusColor = computed(() => {
const modeStyle = computed(() => {
switch (props.chargepoint.chargeMode) {
case 'stop':
return { 'background-color': 'var(--fg)' }
return { 'background-color': 'var(--color-input)' }
default:
return {
'background-color': chargemodes[props.chargepoint.chargeMode].color,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ export class Vehicle {
this.id = index
}
private _chargeTemplateId = 0
isSocConfigured = false
isSocManual = false
get chargeTemplateId() {
return this._chargeTemplateId
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ export function processVehicleMessages(topic: string, message: string) {
cp.isSocManual = config.type == 'manual'
}
})
vehicles[index].isSocConfigured = config.type !== null
vehicles[index].isSocManual = config.type == 'manual'
} else {
// console.warn('Ignored vehicle message [' + topic + ']=' + message)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
<template>
<svg x="0" :width="props.width">
<path
:id="'soc-' + vID"
.origin="autozoom"
class="soc-baseline"
:d="myline"
stroke="var(--color-bg)"
stroke-width="1"
fill="none"
/>
<path
:id="'socdashes-' + vID"
class="soc-dashes"
:d="myline"
:stroke="cpColor"
stroke-width="1"
:style="{ strokeDasharray: '3,3' }"
fill="none"
/>
<text
class="cpname"
:x="nameX"
:y="nameY"
:style="{ fill: cpColor, fontSize: 10 }"
:text-anchor="textPosition"
>
{{ vName }}
</text>
<g>
<path
:id="'soc-' + vID"
.origin="autozoom"
class="soc-baseline"
:d="myline"
stroke="var(--color-bg)"
stroke-width="1"
fill="none"
/>
<path
:id="'socdashes-' + vID"
class="soc-dashes"
:d="myline"
:stroke="cpColor"
stroke-width="1"
:style="{ strokeDasharray: '3,3' }"
fill="none"
/>
<text
class="cpname"
:x="nameX"
:y="nameY"
:style="{ fill: cpColor, fontSize: 10 }"
:text-anchor="textPosition"
>
{{ vName }}
</text>
</g>
</svg>
</template>

Expand Down Expand Up @@ -75,7 +77,6 @@ const myline = computed(() => {
: d['soc' + topVehicles.value[1]!],
) ?? yScale.value(0),
)

let p = path(graphData.data)
return p ? p : ''
})
Expand Down Expand Up @@ -116,11 +117,11 @@ const cpColor = computed(() => {
const nameX = computed(() => {
switch (props.order) {
case 0:
return 3
return 3 // first vehicle
case 1:
return props.width - 3
return props.width - 3 // 2nd vehicle
case 2:
return props.width / 2
return props.width / 2 // battery
default:
return 0 // error
}
Expand All @@ -130,15 +131,16 @@ const nameY = computed(() => {
if (graphData.data.length > 0) {
let index: number
switch (props.order) {
case 0:
index = graphData.data.length - 1
case 0: // 1st vehicle
index = 0
return yScale.value(
graphData.data[index]['soc' + topVehicles.value[0]] + 2,
)
case 1:
index = 0
return yScale.value(
graphData.data[index]['soc' + topVehicles.value[1]] + 2,
index = graphData.data.length - 1
return Math.max(
12,
yScale.value(graphData.data[index]['soc' + topVehicles.value[1]] + 2),
)
case 2:
index = Math.round(graphData.data.length / 2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,17 @@ const keysToUse = computed(() => {
if (globalConfig.showInverters) {
const pattern = /pv\d+/
if (graphData.data.length > 0) {
additionalKeys = Object.keys(graphData.data[0]).reduce(
(list: string[], element: string) => {
if (element.match(pattern)) {
list.push(element)
/* additionalKeys = Object.keys(graphData.data[0]).reduce(
(list: string[], itemKey: string) => {
if (itemKey.match(pattern)) {
list.push(itemKey)
}
return list
},
[],
) */
additionalKeys = Object.keys(graphData.data[0]).filter((itemKey) =>
itemKey.match(pattern),
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,23 +141,18 @@ const keysToUse = computed(() => {
const pattern = /cp\d+/
let additionalKeys: string[] = []
if (graphData.data.length > 0) {
additionalKeys = Object.keys(graphData.data[0]).reduce(
(list: string[], element: string) => {
if (element.match(pattern)) {
list.push(element)
}
return list
},
[],
additionalKeys = Object.keys(graphData.data[0]).filter((itemKey) =>
itemKey.match(pattern),
)
}
additionalKeys.forEach((key, i) => {
k.splice(idx + i, 0, key)
colors[key] = chargePoints[+key.slice(2)]?.color ?? 'black'
colors[key] =
chargePoints[+key.slice(2)]?.color ?? 'var(--color-charging)'
})
if (globalConfig.showInverters) {
/* if (globalConfig.showInverters) {
k.push('evuOut')
}
} */
return k
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:transform="'translate(' + 0 + ',' + (height / 2 + 9) + ')'"
></g>
</svg>
<svg :x="props.margin.left" :width="props.width">
<svg :x="0" :width="props.width">
<g :transform="'translate(' + margin.left + ',' + margin.top + ')'">
<g
id="PGXAxis"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
:stack-order="globalConfig.usageStackOrder"
/>
<PgXAxis
:width="width - margin.left - 2 * margin.right"
:width="width - margin.left - margin.right"
:height="height - margin.top - margin.bottom"
:margin="margin"
/>
Expand Down
Loading