Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
41 changes: 0 additions & 41 deletions .github/workflows/build_display_theme_cards.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/build_display_theme_colors.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/build_web_theme_colors.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/build_web_theme_koala.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/publish_to_master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish to master
on:
push:
paths:
- 'packages/modules/*_themes/*/source/**'
branches:
- master
- Beta
- Release

jobs:
build-and-push-themes:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Node.js v24
uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: 'packages/modules/*_themes/*/source/package-lock.json'

- name: Install dependencies and build all themes
run: |
for theme_dir in packages/modules/*_themes/*/; do
if [ -d "$theme_dir/source" ]; then
echo "Building theme: $theme_dir"
cd "$theme_dir/source"
npm install
npm run build --if-present
cd - > /dev/null
fi
done

- name: Commit and push built themes
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"

# Add all built theme files
git add packages/modules/*_themes/*/web/

if ! git diff --cached --quiet; then
git commit -m "Build Themes"
git push
else
echo "No changes to commit."
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 4 additions & 13 deletions packages/control/chargepoint/chargepoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
from control import phase_switch
from control.chargepoint.chargepoint_state import CHARGING_STATES, ChargepointState
from control.text import BidiState
from helpermodules.broker import BrokerClient
from helpermodules.phase_mapping import convert_single_evu_phase_to_cp_phase
from helpermodules.pub import Pub
from helpermodules import timecheck
Expand Down Expand Up @@ -235,7 +234,9 @@ def _process_charge_stop(self) -> None:
log.debug("/set/manual_lock True")
# Ev wurde noch nicht aktualisiert.
# Ladeprofil aus den Einstellungen laden.
self.update_charge_template(data.data.ev_data["ev"+str(self.data.set.charging_ev_prev)].charge_template)
if data.data.general_data.data.temporary_charge_templates_active:
self.update_charge_template(
data.data.ev_data["ev"+str(self.data.set.charging_ev_prev)].charge_template)
chargelog.save_and_reset_data(self, data.data.ev_data["ev"+str(self.data.set.charging_ev_prev)])
self.data.set.charging_ev_prev = -1
Pub().pub("openWB/set/chargepoint/"+str(self.num)+"/set/charging_ev_prev",
Expand Down Expand Up @@ -843,18 +844,8 @@ def _get_charging_ev(self, vehicle: int, ev_list: Dict[str, Ev]) -> Ev:
Pub().pub("openWB/set/chargepoint/"+str(self.num)+"/set/charging_ev_prev", vehicle)
return charging_ev

def _clear_template_topics(self, topic: str) -> None:
def on_connect(client, userdata, flags, rc):
client.subscribe(topic, 2)

def __get_payload(client, userdata, msg):
received_topics.append(msg.topic)
received_topics = []
BrokerClient("processBrokerBranch", on_connect, __get_payload).start_finite_loop()
for topic in received_topics:
Pub().pub(topic, "")

def update_charge_template(self, charge_template: ChargeTemplate) -> None:
# Prüfen, ob ein temporäres Ladeprofil aktiv ist und dieses übernehmen
Pub().pub(f"openWB/set/chargepoint/{self.num}/set/charge_template",
dataclasses.asdict(charge_template.data))

Expand Down
1 change: 1 addition & 0 deletions packages/control/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class GeneralData:
http_api: bool = field(
default=False, metadata={"topic": "http_api"})
mqtt_bridge: bool = False
temporary_charge_templates_active: bool = False
prices: Prices = field(default_factory=prices_factory)
range_unit: str = "km"

Expand Down
8 changes: 6 additions & 2 deletions packages/control/loadmanagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,12 @@ def _limit_by_power(self,
log.debug(f"Verbleibende Leistung unter Berücksichtigung der Einspeisegrenze: {raw_power_left}W")
if sum([c * v for c, v in zip(available_currents, cp_voltages)]) > raw_power_left:
for i in range(0, 3):
# Am meisten belastete Phase trägt am meisten zur Leistungsreduktion bei.
currents[i] = available_currents[i] / sum(available_currents) * raw_power_left / cp_voltages[i]
try:
# Am meisten belastete Phase trägt am meisten zur Leistungsreduktion bei.
currents[i] = available_currents[i] / sum(available_currents) * raw_power_left / cp_voltages[i]
except ZeroDivisionError:
# bei einphasig angeschlossenen Wallboxen ist die Spannung der anderen Phasen 0V
currents[i] = 0.0
log.debug(f"Leistungsüberschreitung auf {raw_power_left}W korrigieren: {available_currents}")
limit = LoadmanagementLimit(LimitingValue.POWER.value.format(get_component_name_by_id(counter.num)),
LimitingValue.POWER)
Expand Down
Loading