Skip to content

Commit a1c2eee

Browse files
committed
add support for dynamical tariffs for mindispaly
1 parent 37a163a commit a1c2eee

File tree

15 files changed

+2488
-1612
lines changed

15 files changed

+2488
-1612
lines changed

loadvars.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,6 +1839,14 @@ loadvars(){
18391839
mqttconfvar["config/get/sofort/lp/6/etBasedCharging"]=lp6etbasedcharging
18401840
mqttconfvar["config/get/sofort/lp/7/etBasedCharging"]=lp7etbasedcharging
18411841
mqttconfvar["config/get/sofort/lp/8/etBasedCharging"]=lp8etbasedcharging
1842+
mqttconfvar["config/get/sofort/lp/1/etChargeMaxPrice"]=lp1etchargemaxprice
1843+
mqttconfvar["config/get/sofort/lp/2/etChargeMaxPrice"]=lp2etchargemaxprice
1844+
mqttconfvar["config/get/sofort/lp/3/etChargeMaxPrice"]=lp3etchargemaxprice
1845+
mqttconfvar["config/get/sofort/lp/4/etChargeMaxPrice"]=lp4etchargemaxprice
1846+
mqttconfvar["config/get/sofort/lp/5/etChargeMaxPrice"]=lp5etchargemaxprice
1847+
mqttconfvar["config/get/sofort/lp/6/etChargeMaxPrice"]=lp6etchargemaxprice
1848+
mqttconfvar["config/get/sofort/lp/7/etChargeMaxPrice"]=lp7etchargemaxprice
1849+
mqttconfvar["config/get/sofort/lp/8/etChargeMaxPrice"]=lp8etchargemaxprice
18421850
mqttconfvar["config/get/pv/lp/1/socLimitation"]=stopchargepvatpercentlp1
18431851
mqttconfvar["config/get/pv/lp/2/socLimitation"]=stopchargepvatpercentlp2
18441852
mqttconfvar["config/get/pv/lp/1/maxSoc"]=stopchargepvpercentagelp1
@@ -1850,6 +1858,10 @@ loadvars(){
18501858
mqttconfvar["config/get/display/chartBatteryMinMax"]=displayspeichermax
18511859
mqttconfvar["config/get/display/chartPvMax"]=displaypvmax
18521860
mqttconfvar["config/get/display/showHouseConsumption"]=displayhausanzeigen
1861+
mqttconfvar["config/get/display/showPrice"]=displayshowprice
1862+
mqttconfvar["config/get/display/showRfidPad"]=displayshowrfidpad
1863+
mqttconfvar["config/get/display/pinRequired"]=displaypinaktiv
1864+
mqttconfvar["config/get/display/allowSetMaxPrice"]=displayallowsetmaxprice
18531865
mqttconfvar["config/get/display/chartHouseConsumptionMax"]=displayhausmax
18541866
mqttconfvar["config/get/display/chartLp/1/max"]=displaylp1max
18551867
mqttconfvar["config/get/display/chartLp/2/max"]=displaylp2max

modules/extopenwb/main.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ if [[ $(wc -l <"$outputname") -ge 5 ]]; then
3535
echo "$boolPlugStat" > "$RAMDISKDIR/plugstat"
3636
echo "$boolChargeStat" > "$RAMDISKDIR/chargestat"
3737
soc=$(<"$RAMDISKDIR/soc")
38+
socEnabled=$(<"$RAMDISKDIR/socvorhanden")
3839
mosquitto_pub -h "$ip" -r -t "openWB/set/lp/$chargepcp/%Soc" -m "$soc"
40+
mosquitto_pub -h "$ip" -r -t "openWB/set/lp/$chargepcp/boolSocConfigured" -m "$socEnabled"
3941
fi
4042
if (( chargep == "2" ));then
4143
echo "$VPhase1" > "$RAMDISKDIR/llvs11"
@@ -49,7 +51,9 @@ if [[ $(wc -l <"$outputname") -ge 5 ]]; then
4951
echo "$boolPlugStat" > "$RAMDISKDIR/plugstats1"
5052
echo "$boolChargeStat" > "$RAMDISKDIR/chargestats1"
5153
soc=$(<"$RAMDISKDIR/soc1")
54+
socEnabled=$(<"$RAMDISKDIR/soc1vorhanden")
5255
mosquitto_pub -h "$ip" -r -t "openWB/set/lp/$chargepcp/%Soc" -m "$soc"
56+
mosquitto_pub -h "$ip" -r -t "openWB/set/lp/$chargepcp/boolSocConfigured" -m "$socEnabled"
5357
fi
5458
if (( chargep == "3" ));then
5559
echo "$VPhase1" > "$RAMDISKDIR/llvs21"
@@ -80,6 +84,21 @@ if [[ $(wc -l <"$outputname") -ge 5 ]]; then
8084
mosquitto_pub -h "$ip" -r -t "openWB/set/isss/ClearRfid" -m "1"
8185
fi
8286

87+
cpEnabled=$(<"$RAMDISKDIR/lp${chargep}enabled")
88+
etEnabled=$(<"$RAMDISKDIR/mqttetprovideraktiv")
89+
etPriceList=$(<"$RAMDISKDIR/etprovidergraphlist")
90+
etGlobalPrice=$(<"$RAMDISKDIR/etprovidermaxprice")
91+
etCurrentPrice=$(<"$RAMDISKDIR/etproviderprice")
92+
etMode=$(<"$RAMDISKDIR/mqttlp${chargep}etbasedcharging")
93+
etLocalPrice=$(<"$RAMDISKDIR/mqttlp${chargep}etchargemaxprice")
94+
mosquitto_pub -h "$ip" -r -t openWB/set/lp/$chargepcp/ChargePointEnabled -m "$cpEnabled"
95+
mosquitto_pub -h "$ip" -r -t openWB/set/awattar/boolAwattarEnabled -m "$etEnabled"
96+
mosquitto_pub -h "$ip" -r -t openWB/set/awattar/pricelist -m "$etPriceList"
97+
mosquitto_pub -h "$ip" -r -t openWB/set/awattar/MaxPriceForCharging -m "$etGlobalPrice"
98+
mosquitto_pub -h "$ip" -r -t openWB/set/awattar/ActualPriceForCharging -m "$etCurrentPrice"
99+
mosquitto_pub -h "$ip" -r -t openWB/config/set/sofort/lp/$chargepcp/etBasedCharging -m "$etMode"
100+
mosquitto_pub -h "$ip" -r -t openWB/config/set/sofort/lp/$chargepcp/etChargeMaxPrice -m "$etLocalPrice"
101+
83102
mosquitto_pub -h "$ip" -r -t "openWB/set/isss/parentWB" -m "$myipaddress"
84103
if (( chargepcp == "1" )); then
85104
mosquitto_pub -h "$ip" -r -t "openWB/set/isss/parentCPlp1" -m "$chargep"

runs/initRamdisk.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,14 @@ initRamdisk(){
535535
"mqttlp6etbasedcharging:-1" \
536536
"mqttlp7etbasedcharging:-1" \
537537
"mqttlp8etbasedcharging:-1" \
538+
"mqttlp1etchargemaxprice:-1" \
539+
"mqttlp2etchargemaxprice:-1" \
540+
"mqttlp3etchargemaxprice:-1" \
541+
"mqttlp4etchargemaxprice:-1" \
542+
"mqttlp5etchargemaxprice:-1" \
543+
"mqttlp6etchargemaxprice:-1" \
544+
"mqttlp7etchargemaxprice:-1" \
545+
"mqttlp8etchargemaxprice:-1" \
538546
"mqttevuglaettungakt:-1" \
539547
"mqtthausverbrauch:-1" \
540548
"mqtthausverbrauchstat:-1" \

0 commit comments

Comments
 (0)