Skip to content

Commit

Permalink
SimpleEVSEWifi LP3 Typo Bugfix, Nachtladen keine Erhöhung um 1 A vor …
Browse files Browse the repository at this point in the history
…LM Grenze, Bezug Fronius SM Bugfix
  • Loading branch information
snaptec committed Jan 17, 2019
1 parent 47848bb commit 43dc2ae
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
11 changes: 3 additions & 8 deletions modules/bezug_fronius_sm/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,9 @@ echo $wattbezug > /var/www/html/openWB/ramdisk/wattbezug
kwhtmp=$(curl --connect-timeout 5 -s $wrfroniusip/solar_api/v1/GetMeterRealtimeData.cgi?Scope=System)
# jq-Funktion funktioniert hier leider nicht, wegen "0" als Bezeichnung

ikwh=$(echo ${kwhtmp##*EnergyReal_WAC_Minus_Absolute} | tr -d ' ' | tr -d '\"' | tr -d ':' | tr -d '}' | tr -d '\n')
ekwh=$(echo ${kwhtmp##*EnergyReal_WAC_Minus_Absolute} | tr -d ' ' | tr -d '\"' | tr -d ':' | tr -d '}' | tr -d '\n')

#echo $ikwh #Test-Ausgabe

echo $ikwh > /var/www/html/openWB/ramdisk/bezugkwh

# Eingespeiste Energie total in Wh (für Smartmeter im Einspeisepunkt)
# bei Smartmeter im Verbrauchsweig immer 0
ekwh=$(echo ${kwhtmp##*EnergyReal_WAC_Plus_Absolute} | sed 's/,.*//' | tr -d ' ' | tr -d ':' | tr -d '\"')
#echo $ekwh #Test-Ausgabe
ikwh=$(echo ${kwhtmp##*EnergyReal_WAC_Plus_Absolute} | sed 's/,.*//' | tr -d ' ' | tr -d ':' | tr -d '\"')
echo $ikwh > /var/www/html/openWB/ramdisk/bezugkwh
echo $ekwh > /var/www/html/openWB/ramdisk/einspeisungkwh
2 changes: 1 addition & 1 deletion modules/simpleevsewifis2/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
re='^-?[0-9]+$'
rekwh='^[-+]?[0-9]+\.?[0-9]*$'
output=$(curl --connect-timeout $evsewifitimeoutlp3 -s http://$evsewifiiplp3/getParameters)
if ! [ -z "$output" ] then;
if ! [ -z "$output" ]; then
watt=$(echo $output | jq '.list[] | .actualPower')
lla1=$(echo $output | jq '.list[] | .currentP1')
lla2=$(echo $output | jq '.list[] | .currentP2')
Expand Down
2 changes: 1 addition & 1 deletion modules/wr_fronius/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#pvwatt=$(echo $pvwatttmp | jq '.Body.Data.PAC.Values' | sed 's/.*://' | tr -d '\n' | sed 's/^.\{2\}//' | sed 's/.$//' )
pvwatttmp=$(curl --connect-timeout 5 -s "$wrfroniusip/solar_api/v1/GetPowerFlowRealtimeData.fcgi?Scope?System")
pvwatt=$(echo $pvwatttmp | jq '.Body.Data.Site.P_PV' |sed 's/\..*$//')

pvwatt=$(echo "$pvwatt * -1" | bc)

#wenn WR aus bzw. im standby (keine Antwort) ersetze leeren Wert durch eine 0
re='^-?[0-9]+$'
Expand Down
14 changes: 13 additions & 1 deletion nachtladen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
lastmnacht(){
if [ $# -eq 2 ]; then
if (( evua1 < lastmaxap1 )) && (( evua2 < lastmaxap2 )) && (( evua3 < lastmaxap3 )); then
evudiff1=$((lastmaxap1 - evua1 ))
evudiff2=$((lastmaxap2 - evua2 ))
evudiff3=$((lastmaxap3 - evua3 ))
evudiffmax=($evudiff1 $evudiff2 $evudiff3)
maxdiff=${evudiffmax[0]}
for v in "${evudiffmax[@]}"; do
if (( v < maxdiff )); then maxdiff=$v; fi;
done
if (( $1 == $2 )); then
llnachtreturn=$2
else
Expand All @@ -11,7 +19,11 @@ if [ $# -eq 2 ]; then
if (( $1 > $2 )); then
llnachtreturn=$(($1 - 1 ))
else
llnachtreturn=$(($1 + 1 ))
if (( maxdiff > 1 )); then
llnachtreturn=$(($1 + 1 ))
else
llnachtreturn=$1
fi
fi
if (( llnachtreturn > maximalstromstaerke )); then
llnachtreturn=$2
Expand Down
2 changes: 1 addition & 1 deletion web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@
<div class="col-xs-4">


<!-- master --> Ver 1.105 beta </div>
<!-- master --> Ver 1.106 beta </div>


<div class="col-xs-4 text-center">
Expand Down

0 comments on commit 43dc2ae

Please sign in to comment.