Skip to content
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions packages/helpermodules/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,16 @@ def systemUpdate(self, connection_id: str, payload: dict) -> None:
Pub().pub("openWB/system/update_in_progress", False)
return
parent_file = Path(__file__).resolve().parents[2]
if not SubData.general_data.data.extern and SubData.system_data["system"].data["secondary_auto_update"]:
for cp in SubData.cp_data.values():
# if chargepoint is external_openwb and not the second CP of duo and version is Release
if (
cp.chargepoint.chargepoint_module.config.type == 'external_openwb' and
cp.chargepoint.chargepoint_module.config.configuration.duo_num == 0 and
cp.chargepoint.data.get.current_branch == "Release"
):
time.sleep(2)
self.secondaryChargepointUpdate({"data": {"chargepoint": f"cp{cp.chargepoint.num}"}})
if "branch" in payload["data"] and "tag" in payload["data"]:
pub_user_message(
payload, connection_id,
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/devices/huawei/huawei/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def initializer():
if HuaweiType(device_config.configuration.type) == HuaweiType.SDongle:
client = ModbusTcpClient_(device_config.configuration.ip_address,
device_config.configuration.port, sleep_after_connect=7)
if HuaweiType(device_config.configuration.type) == HuaweiType.HuaweiKit:
elif HuaweiType(device_config.configuration.type) == HuaweiType.Huawei_Kit:
client = ModbusTcpClient_("192.168.193.126", 8899)
else:
client = ModbusTcpClient_(device_config.configuration.ip_address,
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/devices/shelly/shelly/bat.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def update(self) -> None:
currents = [status['pm1:0']['current'], 0, 0]
else:
power = status['em:0']['total_act_power'] # shelly Pro3EM
currents = [meter[f'{i}_current'] for i in 'abc']
currents = [status['em:0'][f'{i}_current'] for i in 'abc']

power = power * self.factor
imported, exported = self.sim_counter.sim_count(power)
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/devices/shelly/shelly/inverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def update(self) -> None:
currents = [status['pm1:0']['current'], 0, 0]
else:
power = status['em:0']['total_act_power'] # shelly Pro3EM
currents = [meter[f'{i}_current'] for i in 'abc']
currents = [status['em:0'][f'{i}_current'] for i in 'abc']

power = power * self.factor
_, exported = self.sim_counter.sim_count(power)
Expand Down
6 changes: 3 additions & 3 deletions packages/modules/devices/sonnen/sonnenbatterie/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ def update_grid_counter(self, sim_counter: SimCounter) -> CounterState:
Returns:
CounterState: The updated grid counter state.
"""
grid_import_power = -int(float(self.__read_element(device="battery", element="M39")))
grid_export_power = -int(float(self.__read_element(device="battery", element="M38")))
grid_power = grid_import_power - grid_export_power
grid_export_power = int(float(self.__read_element(device="battery", element="M38")))
grid_import_power = int(float(self.__read_element(device="battery", element="M39")))
grid_power = grid_import_power - grid_export_power # export power must be negative
imported, exported = sim_counter.sim_count(grid_power)
return CounterState(power=grid_power,
imported=imported,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ export default {
return this.homePower.value < 0;
},
pvProduction() {
return this.pvPower.value < 0;
},
pvConsumption() {
return this.pvPower.value > 0;
},
batteryDischarging() {
Expand Down Expand Up @@ -279,9 +282,9 @@ export default {
id: "pv",
class: {
base: "pv",
valueLabel: this.pvProduction ? "fill-success" : "",
valueLabel: this.pvProduction || this.pvConsumption ? "fill-success" : "",
animated: this.pvProduction,
animatedReverse: false,
animatedReverse: this.pvConsumption,
},
position: {
row: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,6 @@ export const useMqttStore = defineStore("mqtt", {
"openWB/pv/get/power",
"W",
"",
true,
true,
);
if (Object.hasOwnProperty.call(power, returnType)) {
return power[returnType];
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Loading