Skip to content

Commit

Permalink
add debug info rct v1 modules
Browse files Browse the repository at this point in the history
  • Loading branch information
benderl committed Mar 23, 2022
1 parent ce5c22f commit 7737904
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/bezug_rct/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ RAMDISKDIR="${OPENWBBASEDIR}/ramdisk"
MODULEDIR=$(cd "$(dirname "$0")" && pwd)
DMOD="MAIN"

openwbDebugLog ${DMOD} 2 "RCT Bezug start"

wattbezug=$(echo "scale=0; $(python "${MODULEDIR}/rct_read.py" --ip="$bezug1_ip" --name='g_sync.p_ac_sc_sum')/1" | bc)
openwbDebugLog ${DMOD} 2 "Bezug RCT Leistung: ${wattbezug}"
Expand Down
6 changes: 6 additions & 0 deletions modules/speicher_rct/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
OPENWBBASEDIR=$(cd "$(dirname "$0")/../../" && pwd)
RAMDISKDIR="${OPENWBBASEDIR}/ramdisk"
MODULEDIR=$(cd "$(dirname "$0")" && pwd)
DMOD="MAIN"

openwbDebugLog ${DMOD} 2 "RCT Bat start"

soc=$(echo "scale=0; $(python "${MODULEDIR}/../bezug_rct/rct_read.py" --ip="$bezug1_ip" --name='battery.soc')*100/1" | bc)
echo "$soc" > "$RAMDISKDIR/speichersoc"
openwbDebugLog ${DMOD} 2 "RCT Bat soc: $soc"

watt=$(echo "scale=0; $(python "${MODULEDIR}/../bezug_rct/rct_read.py" --ip="$bezug1_ip" --name='g_sync.p_acc_lp')*-1/1" | bc)
echo "$watt" > "$RAMDISKDIR/speicherleistung"
openwbDebugLog ${DMOD} 2 "RCT Bat power: $watt"
4 changes: 4 additions & 0 deletions modules/wr_rct/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
OPENWBBASEDIR=$(cd "$(dirname "$0")/../../" && pwd)
RAMDISKDIR="${OPENWBBASEDIR}/ramdisk"
MODULEDIR=$(cd "$(dirname "$0")" && pwd)
DMOD="MAIN"

openwbDebugLog ${DMOD} 2 "RCT WR start"

pv1watt=$(echo "scale=0; $(python "${MODULEDIR}/../bezug_rct/rct_read.py" --ip="$bezug1_ip" --id='0xB5317B78')/1" | bc)
pv2watt=$(echo "scale=0; $(python "${MODULEDIR}/../bezug_rct/rct_read.py" --ip="$bezug1_ip" --id='0xE96F1844')/1" | bc)
pv3watt=$(echo "scale=0; $(python "${MODULEDIR}/../bezug_rct/rct_read.py" --ip="$bezug1_ip" --id='0xAA9AA253')/1" | bc)
pvwatt=$(echo "scale=0; ($pv1watt + $pv2watt + $pv3watt) * -1" | bc)
openwbDebugLog ${DMOD} 2 "RCT WR power: $pvwatt"
echo "$pvwatt" > "$RAMDISKDIR/pvwatt"
echo "$pvwatt"

0 comments on commit 7737904

Please sign in to comment.