Skip to content

Commit

Permalink
Autoerkennung für openWB Ladepunkt
Browse files Browse the repository at this point in the history
  • Loading branch information
snaptec committed Feb 19, 2021
1 parent 79502a6 commit c5bcc5e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/mpm3pmll/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ then
else
echo "echo" > /dev/null
fi
sudo python /var/www/html/openWB/modules/mpm3pmll/readmpm3pm.py $mpm3pmllsource $mpm3pmllid

if [[ $mpm3pmllid = "0" ]]; then
python /var/www/html/openWB/modules/mpm3pmll/readall.py
else
python /var/www/html/openWB/modules/mpm3pmll/readmpm3pm.py $mpm3pmllsource $mpm3pmllid
fi


18 changes: 18 additions & 0 deletions web/settings/modulconfiglp.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ function getCookie(cname) {
<label for="evsecon" class="col-md-4 col-form-label">Anbindung</label>
<div class="col">
<select name="evsecon" id="evsecon" class="form-control">
<option <?php if($evseconold == "modbusevse" && $ladeleistungmodulold == "mpm3pmll" && $mpm3pmllsourceold == "/dev/ttyUSB0" && $mpm3pmllidold == "0") echo "selected" ?> value="modbusevse" data-id="openwb auto">openWB series1/2 Autoerkennung</option>

<option <?php if($evseconold == "modbusevse" && $ladeleistungmodulold == "mpm3pmll" && $mpm3pmllsourceold == "/dev/ttyUSB0" && $mpm3pmllidold == "5") echo "selected" ?> value="modbusevse" data-id="openwb series1/2">openWB series1/2</option>
<option <?php if($evseconold == "modbusevse" && $ladeleistungmodulold == "mpm3pmll" && $mpm3pmllsourceold == "/dev/ttyUSB0" && $mpm3pmllidold == "105") echo "selected" ?> value="modbusevse" data-id="openwb series1/2 mid v1">openWB series1/2 mit geeichtem Zähler Variante 1</option>
<option <?php if($evseconold == "modbusevse" && $ladeleistungmodulold == "mpm3pmll" && $mpm3pmllsourceold == "/dev/serial0" && $mpm3pmllidold == "105") echo "selected" ?> value="modbusevse" data-id="openwb series1/2 mid v2">openWB series1/2 mit geeichtem Zähler Variante 2</option>
Expand Down Expand Up @@ -131,6 +133,18 @@ function getCookie(cname) {
Dies ist die richtige Option, sowohl für Bausatz als auch für fertige openWB series1 oder series2.
</div>
</div>
<div id="openwbauto" class="hide">
<!-- default values for openwbauto -->
<input type="hidden" name="modbusevseid" value="1">
<input type="hidden" name="ladeleistungmodul" value="mpm3pmll">
<input type="hidden" name="mpm3pmllsource" value="/dev/ttyUSB0">
<input type="hidden" name="modbusevsesource" value="/dev/ttyUSB0">
<input type="hidden" name="mpm3pmllid" value="0">
<div class="card-text alert alert-info">
Keine Konfiguration erforderlich.<br>
Dies ist die richtige Option für fertige openWB series1 oder series2.
</div>
</div>
<div id="openwbbuchse" class="hide">
<input type="hidden" name="ladeleistungmodul" value="llbuchse">
<div class="card-text alert alert-info">
Expand Down Expand Up @@ -1562,6 +1576,7 @@ function display_lp1() {
hideSection('#evseconmastereth');
hideSection('#evseconkeba');
hideSection('#openwb12');
hideSection('#openwbauto');
hideSection('#openwb12mid');
hideSection('#openwb12v2mid');
hideSection('#evseconhttp');
Expand All @@ -1576,6 +1591,9 @@ function display_lp1() {
case "openwb series1/2":
showSection('#openwb12');
break;
case "openwb auto":
showSection('#openwbauto');
break;
case "openwb series1/2 mid v1":
showSection('#openwb12mid');
break;
Expand Down

0 comments on commit c5bcc5e

Please sign in to comment.