Skip to content

Commit

Permalink
fix module path for python modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Lutz Bender committed Nov 18, 2022
1 parent e1d7983 commit 268b594
Show file tree
Hide file tree
Showing 44 changed files with 80 additions and 128 deletions.
2 changes: 1 addition & 1 deletion modules/bezug_alphaess/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ else
MYLOGFILE="${RAMDISKDIR}/evu.log"
fi

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.alpha_ess.device" "counter" "${alphasource}" "${alphav123}" "${alphaip}" >>"${MYLOGFILE}" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.alpha_ess.device" "counter" "${alphasource}" "${alphav123}" "${alphaip}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "EVU RET: ${ret}"
Expand Down
2 changes: 1 addition & 1 deletion modules/bezug_batterx/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fi

# Werte werden im WR ausgelesen, max eine Abfrage pro Sekunde
if [ ${pvwattmodul} != "wr_batterx" ]; then
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.batterx.device" "counter" "${batterx_ip}" >>"${MYLOGFILE}" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.batterx.device" "counter" "${batterx_ip}" >>"$MYLOGFILE" 2>&1
ret=$?
fi

Expand Down
2 changes: 1 addition & 1 deletion modules/bezug_ethmpm3pm/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ else
MYLOGFILE="${RAMDISKDIR}/evu.log"
fi
if { [[ $pvwattmodul != "wr_ethmpm3pmaevu" ]] || [[ $pv2wattmodul != "wr2_ethlovatoaevu" ]]; } && [[ $speichermodul != "speicher_sdmaevu" ]]; then
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.openwb_evu_kit.device" "counter" "${evukitversion}" >>"${MYLOGFILE}" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.openwb_evu_kit.device" "counter" "${evukitversion}" >>"$MYLOGFILE" 2>&1
ret=$?
openwbDebugLog ${DMOD} 2 "EVU RET: ${ret}"
fi
Expand Down
2 changes: 1 addition & 1 deletion modules/bezug_ethmpm3pmflex/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ else
MYLOGFILE="${RAMDISKDIR}/evu.log"
fi

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.openwb_flex.device" "counter" "${evuflexversion}" "${evuflexip}" "${evuflexport}" "${evuflexid}" >>"${MYLOGFILE}" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.openwb_flex.device" "counter" "${evuflexversion}" "${evuflexip}" "${evuflexport}" "${evuflexid}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "EVU RET: ${ret}"
Expand Down
2 changes: 1 addition & 1 deletion modules/bezug_fronius_s0/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ openwbDebugLog ${DMOD} 2 "WR Var2: ${froniusvar2}"
openwbDebugLog ${DMOD} 2 "WR IP2: ${wrfronius2ip}"
openwbDebugLog ${DMOD} 2 "WR Speicher: ${speichermodul}"

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.fronius.device" "counter_s0" "${wrfroniusip}" "${froniuserzeugung}" "${froniusvar2}" "${wrfronius2ip}">>"$MYLOGFILE" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.fronius.device" "counter_s0" "${wrfroniusip}" "${froniuserzeugung}" "${froniusvar2}" "${wrfronius2ip}">>"$MYLOGFILE" 2>&1

cat "${RAMDISKDIR}/wattbezug"
2 changes: 1 addition & 1 deletion modules/bezug_fronius_sm/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ openwbDebugLog ${DMOD} 2 "WR Var2: ${froniusvar2}"
openwbDebugLog ${DMOD} 2 "WR IP2: ${wrfronius2ip}"
openwbDebugLog ${DMOD} 2 "WR Speicher: ${speichermodul}"

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.fronius.device" "counter_sm" "${wrfroniusip}" "${froniuserzeugung}" "${froniusvar2}" "${wrfronius2ip}">>"$MYLOGFILE" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.fronius.device" "counter_sm" "${wrfroniusip}" "${froniuserzeugung}" "${froniusvar2}" "${wrfronius2ip}">>"$MYLOGFILE" 2>&1

cat "${RAMDISKDIR}/wattbezug"
2 changes: 1 addition & 1 deletion modules/bezug_good_we/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ else
MYLOGFILE="${RAMDISKDIR}/evu.log"
fi

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.good_we.device" "counter" "${good_we_ip}" "${good_we_id}">>"${MYLOGFILE}" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.good_we.device" "counter" "${good_we_ip}" "${good_we_id}">>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "EVU RET: ${ret}"
Expand Down
2 changes: 1 addition & 1 deletion modules/bezug_http/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ else
MYLOGFILE="$RAMDISKDIR/evu.log"
fi

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.http.device" "counter" "${bezug_http_w_url}" "${bezug_http_ikwh_url}" "${bezug_http_ekwh_url}" "${bezug_http_l1_url}" "${bezug_http_l2_url}" "${bezug_http_l3_url}" >>"$MYLOGFILE" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.http.device" "counter" "${bezug_http_w_url}" "${bezug_http_ikwh_url}" "${bezug_http_ekwh_url}" "${bezug_http_l1_url}" "${bezug_http_l2_url}" "${bezug_http_l3_url}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"
Expand Down
2 changes: 1 addition & 1 deletion modules/bezug_janitza/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ else
MYLOGFILE="${RAMDISKDIR}/evu.log"
fi

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.janitza.device" "counter" "${bezug1_ip}" >>"${MYLOGFILE}" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.janitza.device" "counter" "${bezug1_ip}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "EVU RET: ${ret}"
Expand Down
2 changes: 1 addition & 1 deletion modules/bezug_json/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ openwbDebugLog ${DMOD} 2 "Filter Watt : ${bezugjsonwatt}"
openwbDebugLog ${DMOD} 2 "Filter Bezug: ${bezugjsonkwh}"
openwbDebugLog ${DMOD} 2 "Filter Einsp: ${einspeisungjsonkwh}"

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.json.device" "counter" "${bezugjsonurl}" "${bezugjsonwatt}" "${bezugjsonkwh}" "${einspeisungjsonkwh}" >>"$MYLOGFILE" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.json.device" "counter" "${bezugjsonurl}" "${bezugjsonwatt}" "${bezugjsonkwh}" "${einspeisungjsonkwh}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"
Expand Down
2 changes: 1 addition & 1 deletion modules/bezug_kostalpiko/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ else
MYLOGFILE="$RAMDISKDIR/evu.log"
fi

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.kostal_piko.device" "counter" "${wrkostalpikoip}" "${speichermodul}" "${bydhvip}" "${bydhvuser}" "${bydhvpass}" >>"${MYLOGFILE}" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.kostal_piko.device" "counter" "${wrkostalpikoip}" "${speichermodul}" "${bydhvip}" "${bydhvuser}" "${bydhvpass}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"
Expand Down
2 changes: 1 addition & 1 deletion modules/bezug_lgessv1/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ else
MYLOGFILE="${RAMDISKDIR}/evu.log"
fi

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.lg.device" "counter" "${lgessv1ip}" "${lgessv1pass}" >>"${MYLOGFILE}" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.lg.device" "counter" "${lgessv1ip}" "${lgessv1pass}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "EVU RET: ${ret}"
Expand Down
2 changes: 1 addition & 1 deletion modules/bezug_powerdog/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ else
MYLOGFILE="${RAMDISKDIR}/evu_powerdog.log"
fi

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.powerdog.device" "counter" "${bezug1_ip}" >>"${MYLOGFILE}" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.powerdog.device" "counter" "${bezug1_ip}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "EVU RET: ${ret}"
Expand Down
2 changes: 1 addition & 1 deletion modules/bezug_powerwall/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ else
MYLOGFILE="${RAMDISKDIR}/evu.log"
fi

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.tesla.device" "counter" "${speicherpwip}" "${speicherpwuser}" "${speicherpwpass}" >>"${MYLOGFILE}" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.tesla.device" "counter" "${speicherpwip}" "${speicherpwuser}" "${speicherpwpass}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "EVU RET: ${ret}"
Expand Down
8 changes: 3 additions & 5 deletions modules/speicher_alphaess/main.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/bash

OPENWBBASEDIR=$(cd `dirname $0`/../../ && pwd)
OPENWBBASEDIR=$(cd "$(dirname "$0")/../../" && pwd)
RAMDISKDIR="${OPENWBBASEDIR}/ramdisk"
#MODULEDIR=$(cd `dirname $0` && pwd)
#DMOD="BATT"
DMOD="MAIN"
Debug=$debug
Expand All @@ -16,15 +15,14 @@ else
MYLOGFILE="${RAMDISKDIR}/speicher.log"
fi


openwbDebugLog ${DMOD} 2 "Speicher Source: ${alphasource}"
openwbDebugLog ${DMOD} 2 "Speicher Version: ${alphav123}"

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.alpha_ess.device" "bat" "${alphasource}" "${alphav123}" "${alphaip}" >>$MYLOGFILE 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.alpha_ess.device" "bat" "${alphasource}" "${alphav123}" "${alphaip}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"

speicherleistung=$(<${RAMDISKDIR}/speicherleistung)
speicherleistung=$(<"${RAMDISKDIR}/speicherleistung")

openwbDebugLog ${DMOD} 1 "BattLeistung: ${speicherleistung}"
4 changes: 1 addition & 3 deletions modules/speicher_batterx/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@ else
MYLOGFILE="${RAMDISKDIR}/speicher.log"
fi


openwbDebugLog ${DMOD} 2 "Speicher IP-Adresse: ${batterx_ip}"

# Werte werden im WR ausgelesen, max eine Abfrage pro Sekunde
if [ ${pvwattmodul} != "wr_batterx" ]; then
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.batterx.device" "bat" "${batterx_ip}" >>"$MYLOGFILE" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.batterx.device" "bat" "${batterx_ip}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"
fi

Expand Down
2 changes: 1 addition & 1 deletion modules/speicher_bydhv/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ openwbDebugLog ${DMOD} 2 "Speicher IP: ${bydhvip}"
openwbDebugLog ${DMOD} 2 "Speicher Passwort: ${bydhvuser}"
openwbDebugLog ${DMOD} 2 "Speicher User: ${bydhvpass}"

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.byd.device" "bat" "${bydhvip}" "${bydhvuser}" "${bydhvpass}" >>"$MYLOGFILE" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.byd.device" "bat" "${bydhvip}" "${bydhvuser}" "${bydhvpass}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"
Expand Down
7 changes: 3 additions & 4 deletions modules/speicher_fronius/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@

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

#For Development only
#Debug=1

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

openwbDebugLog ${DMOD} 2 "Speicher IP: ${wrfroniusip}"

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.fronius.device" "bat" "${wrfroniusip}" "${froniuserzeugung}" "0" "${wrfronius2ip}">>"$MYLOGFILE" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.fronius.device" "bat" "${wrfroniusip}" "${froniuserzeugung}" "0" "${wrfronius2ip}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"
Expand Down
2 changes: 1 addition & 1 deletion modules/speicher_good_we/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fi
openwbDebugLog ${DMOD} 2 "Speicher IP: ${good_we_ip}"
openwbDebugLog ${DMOD} 2 "Speicher ID: ${good_we_id}"

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.good_we.device" "bat" "${good_we_ip}" "${good_we_id}" >>"$MYLOGFILE" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.good_we.device" "bat" "${good_we_ip}" "${good_we_id}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"
Expand Down
11 changes: 5 additions & 6 deletions modules/speicher_http/main.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/bash

OPENWBBASEDIR=$(cd `dirname $0`/../../ && pwd)
OPENWBBASEDIR=$(cd "$(dirname "$0")/../../" && pwd)
RAMDISKDIR="${OPENWBBASEDIR}/ramdisk"
#MODULEDIR=$(cd `dirname $0` && pwd)
#DMOD="BATT"
DMOD="MAIN"
Debug=$debug
Expand All @@ -11,21 +10,21 @@ Debug=$debug
#Debug=1

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

openwbDebugLog ${DMOD} 2 "Speicher Export: ${speicherekwh_http}"
openwbDebugLog ${DMOD} 2 "Speicher Import: ${speicherikwh_http}"
openwbDebugLog ${DMOD} 2 "Speicher Watt: ${speicherleistung_http}"
openwbDebugLog ${DMOD} 2 "Speicher SoC: ${speichersoc_http}"

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.http.device" "bat" "${speicherleistung_http}" "${speicherikwh_http}" "${speicherekwh_http}" "${speichersoc_http}" >>$MYLOGFILE 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.http.device" "bat" "${speicherleistung_http}" "${speicherikwh_http}" "${speicherekwh_http}" "${speichersoc_http}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"

speicherleistung=$(<${RAMDISKDIR}/speicherleistung)
speicherleistung=$(<"${RAMDISKDIR}/speicherleistung")

openwbDebugLog ${DMOD} 1 "BattLeistung: ${speicherleistung}"
8 changes: 3 additions & 5 deletions modules/speicher_json/main.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/bash

OPENWBBASEDIR=$(cd `dirname $0`/../../ && pwd)
OPENWBBASEDIR=$(cd "$(dirname "$0")/../../" && pwd)
RAMDISKDIR="${OPENWBBASEDIR}/ramdisk"
#MODULEDIR=$(cd `dirname $0` && pwd)
#DMOD="BATT"
DMOD="MAIN"
Debug=$debug
Expand All @@ -16,17 +15,16 @@ else
MYLOGFILE="${RAMDISKDIR}/speicher.log"
fi


openwbDebugLog ${DMOD} 2 "Speicher URL: ${battjsonurl}"
openwbDebugLog ${DMOD} 2 "Speicher Watt: ${battjsonwatt}"
openwbDebugLog ${DMOD} 2 "Speicher SoC: ${battjsonsoc}"

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.json.device" "bat" "${battjsonurl}" "${battjsonwatt}" "${battjsonsoc}" >>$MYLOGFILE 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.json.device" "bat" "${battjsonurl}" "${battjsonwatt}" "${battjsonsoc}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"

speicherleistung=$(<${RAMDISKDIR}/speicherleistung)
speicherleistung=$(<"${RAMDISKDIR}/speicherleistung")

openwbDebugLog ${DMOD} 1 "BattLeistung: ${speicherleistung}"
#echo ${speicherleistung}
5 changes: 1 addition & 4 deletions modules/speicher_lgessv1/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ OPENWBBASEDIR=$(cd "$(dirname "$0")/../../" && pwd)
RAMDISKDIR="${OPENWBBASEDIR}/ramdisk"
DMOD="MAIN"


#For Development only
#Debug=1

Expand All @@ -14,9 +13,7 @@ else
MYLOGFILE="${RAMDISKDIR}/speicher.log"
fi



bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.lg.device" "bat" "${lgessv1ip}" "${lgessv1pass}" >>"$MYLOGFILE" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.lg.device" "bat" "${lgessv1ip}" "${lgessv1pass}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"
Expand Down
6 changes: 3 additions & 3 deletions modules/speicher_mpm3pm/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ DMOD="MAIN"
#Debug=1

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

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.openwb_bat_kit.device" "bat" "${speicherkitversion}" >>"${MYLOGFILE}" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.openwb_bat_kit.device" "bat" "${speicherkitversion}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "BAT RET: ${ret}"
6 changes: 3 additions & 3 deletions modules/speicher_powerwall/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ DMOD="MAIN"
#Debug=1

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

openwbDebugLog ${DMOD} 2 "Speicher Login erforderlich: ${speicherpwloginneeded}"
openwbDebugLog ${DMOD} 2 "Speicher User: ${speicherpwuser}"
openwbDebugLog ${DMOD} 2 "Speicher Passwort: ${speicherpwpass}"
openwbDebugLog ${DMOD} 2 "Speicher IP: ${speicherpwip}"

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.tesla.device" "bat" "${speicherpwip}" "${speicherpwuser}" "${speicherpwpass}" >>"$MYLOGFILE" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.tesla.device" "bat" "${speicherpwip}" "${speicherpwuser}" "${speicherpwpass}" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"
Expand Down
10 changes: 5 additions & 5 deletions modules/speicher_sdmaevu/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ DMOD="MAIN"
#Debug=1

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

if [[ $pvwattmodul != "wr_ethmpm3pmaevu" ]] || [[ $pv2wattmodul != "wr2_ethlovatoaevu" ]] ; then
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.openwb_evu_kit.device" "counter" "${evukitversion}" "${speichermodul}" "${speicherkitversion}">>"${MYLOGFILE}" 2>&1
ret=$?
if [[ $pvwattmodul != "wr_ethmpm3pmaevu" ]] || [[ $pv2wattmodul != "wr2_ethlovatoaevu" ]]; then
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.openwb_evu_kit.device" "counter" "${evukitversion}" "${speichermodul}" "${speicherkitversion}" >>"$MYLOGFILE" 2>&1
ret=$?
fi

openwbDebugLog ${DMOD} 2 "BAT RET: ${ret}"
2 changes: 1 addition & 1 deletion modules/wr2_ethlovato/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ else
MYLOGFILE="${RAMDISKDIR}/nurpv.log"
fi

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.openwb_pv_kit.device" "inverter" "${pv2kitversion}" "2">>"$MYLOGFILE" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.openwb_pv_kit.device" "inverter" "${pv2kitversion}" "2" >>"$MYLOGFILE" 2>&1

cat "$RAMDISKDIR/pv2watt"
2 changes: 1 addition & 1 deletion modules/wr2_ethlovatoaevu/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ else
MYLOGFILE="${RAMDISKDIR}/nurpv.log"
fi

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.openwb_evu_kit.device" "counter" "${evukitversion}" "${speichermodul}" "${speicherkitversion}" "2" "${pv2wattmodul}" "${pv2kitversion}">>"$MYLOGFILE" 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.openwb_evu_kit.device" "counter" "${evukitversion}" "${speichermodul}" "${speicherkitversion}" "2" "${pv2wattmodul}" "${pv2kitversion}" >>"$MYLOGFILE" 2>&1
cat "$RAMDISKDIR/pvwatt"
11 changes: 3 additions & 8 deletions modules/wr2_json/main.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/bash

OPENWBBASEDIR=$(cd `dirname $0`/../../ && pwd)
OPENWBBASEDIR=$(cd "$(dirname "$0")/../../" && pwd)
RAMDISKDIR="${OPENWBBASEDIR}/ramdisk"
#MODULEDIR=$(cd `dirname $0` && pwd)
DMOD="PV"
#DMOD="MAIN"
Debug=$debug
Expand All @@ -16,17 +15,13 @@ else
MYLOGFILE="${RAMDISKDIR}/nurpv.log"
fi




openwbDebugLog ${DMOD} 2 "PV URL : ${wr2jsonurl}"
openwbDebugLog ${DMOD} 2 "PV Watt: ${wr2jsonwatt}"
openwbDebugLog ${DMOD} 2 "PV kWh : ${wr2jsonkwh}"

bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.json.device" "inverter" "${wr2jsonurl}" "${wr2jsonwatt}" "${wr2jsonkwh}" "2" >>$MYLOGFILE 2>&1
bash "$OPENWBBASEDIR/packages/legacy_run.sh" "modules.devices.json.device" "inverter" "${wr2jsonurl}" "${wr2jsonwatt}" "${wr2jsonkwh}" "2" >>"$MYLOGFILE" 2>&1
ret=$?

openwbDebugLog ${DMOD} 2 "RET: ${ret}"

watt=$(<${RAMDISKDIR}/pv2watt)
echo ${watt}
cat "${RAMDISKDIR}/pv2watt"
Loading

0 comments on commit 268b594

Please sign in to comment.