Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kostal_plenticore #2440

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
7 changes: 2 additions & 5 deletions loadvars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,7 @@ loadvars(){
fi
echo $hausverbrauch > /var/www/html/openWB/ramdisk/hausverbrauch
usesimbezug=0
if [[ $wattbezugmodul == "bezug_solarwatt" ]]|| [[ $wattbezugmodul == "bezug_rct" ]]|| [[ $wattbezugmodul == "bezug_varta" ]] || [[ $wattbezugmodul == "bezug_kostalplenticoreem300haus" ]] || [[ $wattbezugmodul == "bezug_solarlog" ]] ; then
if [[ $wattbezugmodul == "bezug_solarwatt" ]]|| [[ $wattbezugmodul == "bezug_rct" ]]|| [[ $wattbezugmodul == "bezug_varta" ]] || [[ $wattbezugmodul == "bezug_solarlog" ]] ; then
usesimbezug=1
fi
if ((usesimbezug == 1)); then
Expand Down Expand Up @@ -1129,9 +1129,6 @@ loadvars(){
fi

usesimpv=0
if [[ $speichermodul == "speicher_kostalplenticore" ]] && [[ $pvwattmodul == "wr_plenticore" ]]; then
usesimpv=1
fi
if [[ $pvwattmodul == "wr_rct" ]]|| [[ $pvwattmodul == "wr_solarwatt" ]] || [[ $pvwattmodul == "wr_shelly" ]] || [[ $pvwattmodul == "wr_kostalpikovar2" ]]; then
usesimpv=1
fi
Expand Down Expand Up @@ -1218,7 +1215,7 @@ loadvars(){
echo "$pvallwh" > /var/www/html/openWB/ramdisk/pvallwh
fi

if [[ $speichermodul == "speicher_tesvoltsma" ]] || [[ $speichermodul == "speicher_solarwatt" ]] || [[ $speichermodul == "speicher_rct" ]]|| [[ $speichermodul == "speicher_kostalplenticore" ]] || [[ $speichermodul == "speicher_varta" ]] ; then
if [[ $speichermodul == "speicher_tesvoltsma" ]] || [[ $speichermodul == "speicher_solarwatt" ]] || [[ $speichermodul == "speicher_rct" ]] || [[ $speichermodul == "speicher_varta" ]] ; then
ra='^-?[0-9]+$'
watt2=$(</var/www/html/openWB/ramdisk/speicherleistung)
if [[ -e /var/www/html/openWB/ramdisk/speicherwatt0pos ]]; then
Expand Down
91 changes: 0 additions & 91 deletions modules/bezug_kostalplenticoreem300haus/kostal_plenticore.py

This file was deleted.

5 changes: 1 addition & 4 deletions modules/bezug_kostalplenticoreem300haus/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ else
MYLOGFILE="${RAMDISKDIR}/evu.log"
fi

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "bezug_kostalplenticoreem300haus.kostal_plenticore" "${kostalplenticorehaus}" >>"${MYLOGFILE}" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.kostal_plenticore.device" "counter" "${kostalplenticoreip}" "" "0" "" "${kostalplenticorehaus}" >> "$MYLOGFILE" 2>&1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Du hast die fehlenden Parameter jetzt hinzugefügt. Ist natrürlich auch eine Möglichkeit. Wobei du dann meines Erachten "none" statt "" verwenden. Einfacher fände ich es allerdings, wenn du die ungenutzten Parameter in Python entfernst.


cat "${RAMDISKDIR}/wattbezug"
32 changes: 0 additions & 32 deletions modules/speicher_kostalplenticore/kostal_plenticore.py

This file was deleted.

20 changes: 3 additions & 17 deletions modules/speicher_kostalplenticore/main.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
#!/bin/bash

OPENWBBASEDIR=$(cd "$(dirname "$0")/../../" && pwd)
RAMDISKDIR="${OPENWBBASEDIR}/ramdisk"
#DMOD="BATT"
DMOD="MAIN"

if [ ${DMOD} == "MAIN" ]; then
MYLOGFILE="${RAMDISKDIR}/openWB.log"
else
MYLOGFILE="${RAMDISKDIR}/speicher.log"
fi

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "speicher_kostalplenticore.kostal_plenticore" >>"${MYLOGFILE}" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"
speicherleistung=$(<"${RAMDISKDIR}/speicherleistung")
openwbDebugLog ${DMOD} 1 "BattLeistung: ${speicherleistung}"
# wr_plenticore will fetch data for both PV and battery and there is nothing left for us to do.
#
# The usage of speicher_kostalplenticore without wr_plenticore is not intended and thus not handled.
2 changes: 1 addition & 1 deletion modules/wr_plenticore/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ else
MYLOGFILE="${RAMDISKDIR}/nurpv.log"
fi

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "wr_plenticore.read_kostalplenticore" "${kostalplenticoreip}" "${kostalplenticoreip2}" "${Battery}" "${kostalplenticoreip3}" >>"${MYLOGFILE}" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.kostal_plenticore.device" "inverter" "${kostalplenticoreip}" "${kostalplenticoreip2}" "${Battery}" "${kostalplenticoreip3}">>"${MYLOGFILE}" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"
Expand Down
Loading