Skip to content

Commit

Permalink
add support for dynamical tariffs for mindispaly
Browse files Browse the repository at this point in the history
  • Loading branch information
jotpehenn committed May 1, 2023
1 parent 37a163a commit a246744
Show file tree
Hide file tree
Showing 15 changed files with 2,508 additions and 1,612 deletions.
12 changes: 12 additions & 0 deletions loadvars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1839,6 +1839,14 @@ loadvars(){
mqttconfvar["config/get/sofort/lp/6/etBasedCharging"]=lp6etbasedcharging
mqttconfvar["config/get/sofort/lp/7/etBasedCharging"]=lp7etbasedcharging
mqttconfvar["config/get/sofort/lp/8/etBasedCharging"]=lp8etbasedcharging
mqttconfvar["config/get/sofort/lp/1/etChargeMaxPrice"]=lp1etchargemaxprice
mqttconfvar["config/get/sofort/lp/2/etChargeMaxPrice"]=lp2etchargemaxprice
mqttconfvar["config/get/sofort/lp/3/etChargeMaxPrice"]=lp3etchargemaxprice
mqttconfvar["config/get/sofort/lp/4/etChargeMaxPrice"]=lp4etchargemaxprice
mqttconfvar["config/get/sofort/lp/5/etChargeMaxPrice"]=lp5etchargemaxprice
mqttconfvar["config/get/sofort/lp/6/etChargeMaxPrice"]=lp6etchargemaxprice
mqttconfvar["config/get/sofort/lp/7/etChargeMaxPrice"]=lp7etchargemaxprice
mqttconfvar["config/get/sofort/lp/8/etChargeMaxPrice"]=lp8etchargemaxprice
mqttconfvar["config/get/pv/lp/1/socLimitation"]=stopchargepvatpercentlp1
mqttconfvar["config/get/pv/lp/2/socLimitation"]=stopchargepvatpercentlp2
mqttconfvar["config/get/pv/lp/1/maxSoc"]=stopchargepvpercentagelp1
Expand All @@ -1850,6 +1858,10 @@ loadvars(){
mqttconfvar["config/get/display/chartBatteryMinMax"]=displayspeichermax
mqttconfvar["config/get/display/chartPvMax"]=displaypvmax
mqttconfvar["config/get/display/showHouseConsumption"]=displayhausanzeigen
mqttconfvar["config/get/display/showPrice"]=displayshowprice
mqttconfvar["config/get/display/showRfidPad"]=displayshowrfidpad
mqttconfvar["config/get/display/pinRequired"]=displaypinaktiv
mqttconfvar["config/get/display/allowSetMaxPrice"]=displayallowsetmaxprice
mqttconfvar["config/get/display/chartHouseConsumptionMax"]=displayhausmax
mqttconfvar["config/get/display/chartLp/1/max"]=displaylp1max
mqttconfvar["config/get/display/chartLp/2/max"]=displaylp2max
Expand Down
19 changes: 19 additions & 0 deletions modules/extopenwb/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ if [[ $(wc -l <"$outputname") -ge 5 ]]; then
echo "$boolPlugStat" > "$RAMDISKDIR/plugstat"
echo "$boolChargeStat" > "$RAMDISKDIR/chargestat"
soc=$(<"$RAMDISKDIR/soc")
socEnabled=$(<"$RAMDISKDIR/socvorhanden")
mosquitto_pub -h "$ip" -r -t "openWB/set/lp/$chargepcp/%Soc" -m "$soc"
mosquitto_pub -h "$ip" -r -t "openWB/set/lp/$chargepcp/boolSocConfigured" -m "$socEnabled"
fi
if (( chargep == "2" ));then
echo "$VPhase1" > "$RAMDISKDIR/llvs11"
Expand All @@ -49,7 +51,9 @@ if [[ $(wc -l <"$outputname") -ge 5 ]]; then
echo "$boolPlugStat" > "$RAMDISKDIR/plugstats1"
echo "$boolChargeStat" > "$RAMDISKDIR/chargestats1"
soc=$(<"$RAMDISKDIR/soc1")
socEnabled=$(<"$RAMDISKDIR/soc1vorhanden")
mosquitto_pub -h "$ip" -r -t "openWB/set/lp/$chargepcp/%Soc" -m "$soc"
mosquitto_pub -h "$ip" -r -t "openWB/set/lp/$chargepcp/boolSocConfigured" -m "$socEnabled"
fi
if (( chargep == "3" ));then
echo "$VPhase1" > "$RAMDISKDIR/llvs21"
Expand Down Expand Up @@ -80,6 +84,21 @@ if [[ $(wc -l <"$outputname") -ge 5 ]]; then
mosquitto_pub -h "$ip" -r -t "openWB/set/isss/ClearRfid" -m "1"
fi

cpEnabled=$(<"$RAMDISKDIR/lp${chargep}enabled")
etEnabled=$(<"$RAMDISKDIR/mqttetprovideraktiv")
etPriceList=$(<"$RAMDISKDIR/etprovidergraphlist")
etGlobalPrice=$(<"$RAMDISKDIR/etprovidermaxprice")
etCurrentPrice=$(<"$RAMDISKDIR/etproviderprice")
etMode=$(<"$RAMDISKDIR/mqttlp${chargep}etbasedcharging")
etLocalPrice=$(<"$RAMDISKDIR/mqttlp${chargep}etchargemaxprice")
mosquitto_pub -h "$ip" -r -t openWB/set/lp/$chargepcp/ChargePointEnabled -m "$cpEnabled"
mosquitto_pub -h "$ip" -r -t openWB/set/awattar/boolAwattarEnabled -m "$etEnabled"
mosquitto_pub -h "$ip" -r -t openWB/set/awattar/pricelist -m "$etPriceList"
mosquitto_pub -h "$ip" -r -t openWB/set/awattar/MaxPriceForCharging -m "$etGlobalPrice"
mosquitto_pub -h "$ip" -r -t openWB/set/awattar/ActualPriceForCharging -m "$etCurrentPrice"
mosquitto_pub -h "$ip" -r -t openWB/config/set/sofort/lp/$chargepcp/etBasedCharging -m "$etMode"
mosquitto_pub -h "$ip" -r -t openWB/config/set/sofort/lp/$chargepcp/etChargeMaxPrice -m "$etLocalPrice"

mosquitto_pub -h "$ip" -r -t "openWB/set/isss/parentWB" -m "$myipaddress"
if (( chargepcp == "1" )); then
mosquitto_pub -h "$ip" -r -t "openWB/set/isss/parentCPlp1" -m "$chargep"
Expand Down
8 changes: 8 additions & 0 deletions runs/initRamdisk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,14 @@ initRamdisk(){
"mqttlp6etbasedcharging:-1" \
"mqttlp7etbasedcharging:-1" \
"mqttlp8etbasedcharging:-1" \
"mqttlp1etchargemaxprice:-1" \
"mqttlp2etchargemaxprice:-1" \
"mqttlp3etchargemaxprice:-1" \
"mqttlp4etchargemaxprice:-1" \
"mqttlp5etchargemaxprice:-1" \
"mqttlp6etchargemaxprice:-1" \
"mqttlp7etchargemaxprice:-1" \
"mqttlp8etchargemaxprice:-1" \
"mqttevuglaettungakt:-1" \
"mqtthausverbrauch:-1" \
"mqtthausverbrauchstat:-1" \
Expand Down
Loading

0 comments on commit a246744

Please sign in to comment.