Skip to content

Commit

Permalink
Merge pull request #1032 from openWB/master
Browse files Browse the repository at this point in the history
Release 2.0.0
  • Loading branch information
benderl authored Jul 17, 2023
2 parents d264fa5 + 03249cf commit da60318
Show file tree
Hide file tree
Showing 248 changed files with 308 additions and 348 deletions.
2 changes: 1 addition & 1 deletion docs/Ladepunkte.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Beim Hinzufügen eines Ladepunkts muss zunächst dessen Typ ausgewählt werden.

In der Ladepunkte-Vorlage sind die Einstellungen zum automatischen Sperren (Autolock) und für RFID von Ladepunkten enthalten. Eine Ladepunkt-Vorlage kann vom Benutzer mehreren Ladepunkte zugewiesen werden, sodass die Einstellungen für jeden Ladepunkte einzeln oder für eine Gruppe zugewiesen werden können.

Das Vorhalten eines RFID-Tags (verbauter RFID-Leser erforderlich) oder die Pin-Eingabe (Display erforderlich, Eingabefeld muss im NurLadepunkt-Modus aktiviert werden) werden gleich verarbeitet.
Das Vorhalten eines RFID-Tags (verbauter RFID-Leser erforderlich) oder die Pin-Eingabe (Display erforderlich, Eingabefeld muss im Steuerungsmodus 'secondary' aktiviert werden) werden gleich verarbeitet.
4 changes: 2 additions & 2 deletions packages/helpermodules/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def setup_added_chargepoint():
if check_num_msg is not None:
pub_user_message(
payload, connection_id, f"{check_num_msg} Wenn Sie weitere Ladepunkte anbinden wollen, müssen Sie "
"diese als externe Ladepunkte anbinden. Die externen Ladepunkte in den Betriebsmodus 'NurLadepunkt'"
"diese als externe Ladepunkte anbinden. Die externen Ladepunkte in den Steuerungsmodus 'secondary'"
" versetzen.", MessageType.ERROR)
return
chargepoint_config["id"] = new_id
Expand All @@ -205,7 +205,7 @@ def setup_added_chargepoint():
setup_added_chargepoint()
else:
pub_user_message(payload, connection_id,
"Bitte zuerst einen EVU-Zähler konfigurieren oder in den NurLadepunkt-Modus "
"Bitte zuerst einen EVU-Zähler konfigurieren oder in den Steuerungsmodus 'secondary' "
"umschalten, wenn die openWB als externer Ladepunkt betrieben werden soll.",
MessageType.ERROR)

Expand Down
3 changes: 2 additions & 1 deletion packages/modules/vehicles/bmw/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,11 @@ def requestData(token: str, vin: str) -> dict:
log.error("bmw.requestData: Unknown VIN, must start with WB or WM")
raise RuntimeError

url = 'https://' + api_server + '/eadrax-vcs/v2/vehicles/' + vin + '/state'
url = 'https://' + api_server + '/eadrax-vcs/v4/vehicles/state'
headers = {
'User-Agent': 'Dart/2.14 (dart:io)',
'x-user-agent': 'android(SP1A.210812.016.C1);' + brand + ';2.5.2(14945);row',
'bmw-vin': vin,
'Authorization': (token["token_type"] + " " + token["access_token"])}
body = getHTTP(url, headers)
response = json.loads(body)
Expand Down
63 changes: 11 additions & 52 deletions runs/atreboot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ chmod 666 "$LOGFILE"
echo "unable to check required packages and add virtual network!"
fi

# tune apt configuration and install required packages
if [ -d "/etc/apt/apt.conf.d" ]; then
if versionMatch "${OPENWBBASEDIR}/data/config/apt/99openwb" "/etc/apt/apt.conf.d/99openwb"; then
echo "apt configuration already up to date"
Expand All @@ -124,13 +125,15 @@ chmod 666 "$LOGFILE"
fi
"${OPENWBBASEDIR}/runs/install_packages.sh"

# check for openwb cron jobs
if versionMatch "${OPENWBBASEDIR}/data/config/openwb.cron" "/etc/cron.d/openwb"; then
echo "openwb.cron already up to date"
else
echo "updating openwb.cron"
sudo cp "${OPENWBBASEDIR}/data/config/openwb.cron" "/etc/cron.d/openwb"
fi

# check for openwb2 service definition
if versionMatch "${OPENWBBASEDIR}/data/config/openwb2.service" "/etc/systemd/system/openwb2.service"; then
echo "openwb2.service already up to date"
else
Expand All @@ -139,6 +142,7 @@ chmod 666 "$LOGFILE"
sudo reboot now &
fi

# check for remote support service definition
if [ ! -f "/etc/systemd/system/openwbRemoteSupport.service" ]; then
echo "openwbRemoteSupport service missing, installing service"
sudo cp "${OPENWBBASEDIR}/data/config/openwbRemoteSupport.service" "/etc/systemd/system/openwbRemoteSupport.service"
Expand Down Expand Up @@ -174,6 +178,7 @@ chmod 666 "$LOGFILE"

# display setup
echo "display setup..."
displaySetupModified=0
if [ ! -d "/home/openwb/.config/lxsession/LXDE" ]; then
mkdir --parents "/home/openwb/.config/lxsession/LXDE"
fi
Expand All @@ -182,20 +187,25 @@ chmod 666 "$LOGFILE"
else
echo "updating autologin"
sudo cp "${OPENWBBASEDIR}/data/config/display/lightdm-autologin-greeter.conf" "/etc/lightdm/lightdm.conf.d/lightdm-autologin-greeter.conf"
displaySetupModified=1
fi
if versionMatch "${OPENWBBASEDIR}/data/config/display/lightdm-hide-mouse-cursor.conf" "/etc/lightdm/lightdm.conf.d/lightdm-hide-mouse-cursor.conf"; then
echo "mouse cursor configured"
else
echo "updating mouse cursor configuration"
sudo cp "${OPENWBBASEDIR}/data/config/display/lightdm-hide-mouse-cursor.conf" "/etc/lightdm/lightdm.conf.d/lightdm-hide-mouse-cursor.conf"
displaySetupModified=1
fi
if versionMatch "${OPENWBBASEDIR}/data/config/display/lxdeautostart" "/home/openwb/.config/lxsession/LXDE/autostart"; then
echo "lxde session autostart already configured"
else
echo "updating lxde session autostart"
cp "${OPENWBBASEDIR}/data/config/display/lxdeautostart" "/home/openwb/.config/lxsession/LXDE/autostart"
displaySetupModified=1
fi
if ((displaySetupModified == 1)); then
"${OPENWBBASEDIR}/runs/update_local_display.sh"
fi
"${OPENWBBASEDIR}/runs/update_local_display.sh"

# check for apache configuration
echo "apache default site..."
Expand Down Expand Up @@ -245,7 +255,6 @@ chmod 666 "$LOGFILE"
# check for mosquitto configuration
echo "check mosquitto installation..."
restartService=0
# check for mosquitto configuration
if versionMatch "${OPENWBBASEDIR}/data/config/mosquitto.conf" "/etc/mosquitto/mosquitto.conf"; then
echo "mosquitto.conf already up to date"
else
Expand Down Expand Up @@ -309,47 +318,6 @@ chmod 666 "$LOGFILE"
# collect some hardware info
"${OPENWBBASEDIR}/runs/uuid.sh"

# check for slave config and start handler
# alpha image restricted to standalone installation!
# if (( isss == 1 )); then
# echo "isss..."
# echo $lastmanagement > ${OPENWBBASEDIR}/ramdisk/issslp2act
# if ps ax |grep -v grep |grep "python3 ${OPENWBBASEDIR}/runs/isss.py" > /dev/null
# then
# sudo kill $(ps aux |grep '[i]sss.py' | awk '{print $2}')
# fi
# python3 ${OPENWBBASEDIR}/runs/isss.py &
# # second IP already set up !
# # ethstate=$(</sys/class/net/eth0/carrier)
# # if (( ethstate == 1 )); then
# # sudo ifconfig eth0:0 $virtual_ip_eth0 netmask 255.255.255.0 down
# # else
# # sudo ifconfig wlan0:0 $virtual_ip_wlan0 netmask 255.255.255.0 down
# # fi
# fi

# check for socket system and start handler
# alpha image restricted to standalone installation!
# if [[ "$evsecon" == "buchse" ]] && [[ "$isss" == "0" ]]; then
# echo "socket..."
# # ppbuchse is used in issss.py to detect "openWB Buchse"
# if [ ! -f /home/pi/ppbuchse ]; then
# echo "32" > /home/pi/ppbuchse
# fi
# if ps ax |grep -v grep |grep "python3 ${OPENWBBASEDIR}/runs/buchse.py" > /dev/null
# then
# sudo kill $(ps aux |grep '[b]uchse.py' | awk '{print $2}')
# fi
# python3 ${OPENWBBASEDIR}/runs/buchse.py &
# fi

# update display configuration
# echo "display update..."
# if grep -Fq "@chromium-browser --incognito --disable-pinch --kiosk http://localhost/openWB/web/display/" /home/pi/.config/lxsession/LXDE-pi/autostart
# then
# sed -i "s,@chromium-browser --incognito --disable-pinch --kiosk http://localhost/openWB/web/display/,@chromium-browser --incognito --disable-pinch --overscroll-history-navigation=0 --kiosk http://localhost/openWB/web/display/,g" /home/pi/.config/lxsession/LXDE-pi/autostart
# fi

# update current published versions
echo "load versions..."
"$OPENWBBASEDIR/runs/update_available_versions.sh"
Expand All @@ -362,15 +330,6 @@ chmod 666 "$LOGFILE"
sudo chgrp www-data "${OPENWBBASEDIR}/data/restore" "${OPENWBBASEDIR}/data/restore/"*
sudo chmod g+w "${OPENWBBASEDIR}/data/restore" "${OPENWBBASEDIR}/data/restore/"*

# set upload limit in php
# echo -n "fix upload limit..."
# if [ -d "/etc/php/7.3/" ]; then
# echo "OS Buster"
# sudo /bin/su -c "echo 'upload_max_filesize = 300M' > /etc/php/7.3/apache2/conf.d/20-uploadlimit.ini"
# sudo /bin/su -c "echo 'post_max_size = 300M' >> /etc/php/7.3/apache2/conf.d/20-uploadlimit.ini"
# fi
# sudo /usr/sbin/apachectl -k graceful

# all done, remove boot and update status
echo "$(date +"%Y-%m-%d %H:%M:%S:")" "boot done :-)"
mosquitto_pub -p 1886 -t "openWB/system/update_in_progress" -r -m 'false'
Expand Down
Loading

0 comments on commit da60318

Please sign in to comment.