Skip to content

Commit

Permalink
fix phase switch night charging on cp2
Browse files Browse the repository at this point in the history
  • Loading branch information
Lutz Bender committed Aug 17, 2022
1 parent 947f7a3 commit 3941d27
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions ladelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ fi
openwbDebugLog "CHARGESTAT" 1 "### start (->$monthlyfile)"

# check for special charge modes
nachtladenstate=$(<"${RAMDISKDIR}/nachtladenstate") # "Nachtladen"
nachtladen2state=$(<"${RAMDISKDIR}/nachtladen2state") # "Morgensladen"
if (( nachtladenstate == 0 )) && (( nachtladen2state == 0 )); then
nachtladenstate=$(<"${RAMDISKDIR}/nachtladenstate") # "Nachtladen" LP1
nachtladen2state=$(<"${RAMDISKDIR}/nachtladen2state") # "Morgensladen" LP1
nachtladenstates1=$(<"${RAMDISKDIR}/nachtladenstates1") # "Nachtladen" LP2
nachtladen2states1=$(<"${RAMDISKDIR}/nachtladen2states1") # "Morgensladen" LP2
if (( nachtladenstate == 0 )) && (( nachtladen2state == 0 )) && (( nachtladenstates1 == 0 )) && (( nachtladen2states1 == 0 )); then
lmodus=$(<"${RAMDISKDIR}/lademodus")
else
# "Nachtladen" or "Morgensladen" is configured, set charge mode to "7"
Expand Down
4 changes: 2 additions & 2 deletions u1p3p.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ u1p3pswitch(){
openwbDebugLog "MAIN" 1 "automatische Umschaltung aktiv"
openwbDebugLog "MAIN" 1 "Timing Umschaltung: $uhwaittime / $urwaittime"
if (( ladestatus == 0)); then
if (( nachtladenstate == 1 )) || (( nachtladen2state == 1 )); then
if (( nachtladenstate == 1 )) || (( nachtladen2state == 1 )) || (( nachtladenstates1 == 1 )) || (( nachtladen2states1 == 1 )); then
if (( u1p3pstat != u1p3pnl )); then
openwbDebugLog "MAIN" 1 "Nachtladen derzeit $u1p3pstat Phasen, auf $u1p3pnl konfiguriert, aendere..."
if (( u1p3pnl == 3 )); then
Expand Down Expand Up @@ -122,7 +122,7 @@ u1p3pswitch(){
fi
fi
else
if (( nachtladenstate == 1 )) || (( nachtladen2state == 1 )); then
if (( nachtladenstate == 1 )) || (( nachtladen2state == 1 )) || (( nachtladenstates1 == 1 )) || (( nachtladen2states1 == 1 )); then
if (( u1p3pstat != u1p3pnl )); then
openwbDebugLog "MAIN" 1 "Nachtladen derzeit $u1p3pstat Phasen, auf $u1p3pnl konfiguriert, unterbreche Ladung und aendere..."
echo 1 > ramdisk/blockall
Expand Down

0 comments on commit 3941d27

Please sign in to comment.