mirror of
https://github.com/uhi22/pyPLC.git
synced 2024-11-20 01:13:58 +00:00
docu: headless Pi as PEV with OLED
This commit is contained in:
parent
00d7cee357
commit
4372155a74
3 changed files with 54 additions and 0 deletions
|
@ -82,6 +82,55 @@ Open a second console window, and start here the pev in simulation mode
|
||||||
`sudo python pyPlc.py P S`.
|
`sudo python pyPlc.py P S`.
|
||||||
We should see how the EVSE and PEV are talking to each other.
|
We should see how the EVSE and PEV are talking to each other.
|
||||||
|
|
||||||
|
## Auto-start of the PEV software
|
||||||
|
|
||||||
|
Use case: You use a RaspberryPi in the car, and want to start the charging software just by powering-up the Raspberry.
|
||||||
|
|
||||||
|
(Based on https://gist.github.com/emxsys/a507f3cad928e66f6410e7ac28e2990f)
|
||||||
|
|
||||||
|
We want to run the pevNoGui.py as superuser automatically after startup. To achieve this, we create a service, which we give the name "pev".
|
||||||
|
|
||||||
|
```
|
||||||
|
cd /lib/systemd/system/
|
||||||
|
sudo nano pev.service
|
||||||
|
```
|
||||||
|
|
||||||
|
In this file, we write the following, to configure the new service:
|
||||||
|
|
||||||
|
```
|
||||||
|
[Unit]
|
||||||
|
Description=The PEV.
|
||||||
|
After=multi-user.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/home/pi/myprogs/myPlc/starter.sh
|
||||||
|
Restart=on-abort
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally we configure the attributes of the service, change the starter shell file to be executable, reload the service configuration and enable and start
|
||||||
|
the service:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo chmod 644 /lib/systemd/system/hello.service
|
||||||
|
chmod +x /home/pi/pyPlc/starter.sh
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl enable pev.service
|
||||||
|
sudo systemctl start pev.service
|
||||||
|
```
|
||||||
|
|
||||||
|
To view the log of the service, run `journalctl --unit=pev` or `journalctl -f -u pev.service`.
|
||||||
|
|
||||||
|
Todo: The service log will grow very large, because it contains the complete communication during the charging session. Do we need to take care to
|
||||||
|
keep the log slim?
|
||||||
|
|
||||||
|
The next time we power-up the pi, even without a HDMI display and keyboard connected, the OLED should show the charge progress now.
|
||||||
|
Using an RaspberryPi 3 without additional startup time optimization, the time from power-on until the start of SLAC is ~21 seconds.
|
||||||
|
|
||||||
|
|
||||||
## Nice-to-have: Password-less SSH connection from the Windows notebook to the Pi
|
## Nice-to-have: Password-less SSH connection from the Windows notebook to the Pi
|
||||||
|
|
||||||
https://strobelstefan.org/2019/10/16/zugriff-via-ssh-ohne-passworteingabe-anmeldung-erfolgt-durch-ausgetauschten-ssh-schluessel/
|
https://strobelstefan.org/2019/10/16/zugriff-via-ssh-ohne-passworteingabe-anmeldung-erfolgt-durch-ausgetauschten-ssh-schluessel/
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
- [ ] docu: add hardwareInterface into software architecture puml
|
- [ ] docu: add hardwareInterface into software architecture puml
|
||||||
- [ ] docu: create hardware architecture picture
|
- [ ] docu: create hardware architecture picture
|
||||||
- [x] docu for Dieter (Schematic, concept idea, DieterLV, DieterHV, ...)
|
- [x] docu for Dieter (Schematic, concept idea, DieterLV, DieterHV, ...)
|
||||||
|
- [x] add OLED display to the PEV controller
|
||||||
- [ ] in addressManager, replace the print by addToTrace
|
- [ ] in addressManager, replace the print by addToTrace
|
||||||
- [ ] Resolve the todo-markers in the code
|
- [ ] Resolve the todo-markers in the code
|
||||||
- [ ] Still fixed addresses (MAC, IP) used somewhere?
|
- [ ] Still fixed addresses (MAC, IP) used somewhere?
|
||||||
|
|
|
@ -311,6 +311,10 @@ hardware side. Without the load, we see the intended 230V precharge voltage, and
|
||||||
- Traces https://github.com/uhi22/pyPLC/blob/master/results/2022-12-21_westpark_alpi_charge_ok_with_bulb.pcapng and https://github.com/uhi22/pyPLC/blob/master/results/2022-12-21_alpi_ABBHPC_ABB_Ionity_lightbulb_3of4ok.decoded.txt
|
- Traces https://github.com/uhi22/pyPLC/blob/master/results/2022-12-21_westpark_alpi_charge_ok_with_bulb.pcapng and https://github.com/uhi22/pyPLC/blob/master/results/2022-12-21_alpi_ABBHPC_ABB_Ionity_lightbulb_3of4ok.decoded.txt
|
||||||
- Pictures and discussion in https://openinverter.org/forum/viewtopic.php?p=50172#p50172
|
- Pictures and discussion in https://openinverter.org/forum/viewtopic.php?p=50172#p50172
|
||||||
|
|
||||||
|
### 2023-02-27 PEV mode with OLED-display works on headless Raspberry
|
||||||
|
- Charging status is shown on OLED display. Details in [hardware.md](doc/hardware.md)
|
||||||
|
- RaspberryPi 3 configured to auto-start the PEV software as service. Startup time around 21 seconds from power-up until the SLAC starts. Details
|
||||||
|
in [installation_on_raspberry.md](doc/installation_on_raspberry.md)
|
||||||
### Test results on real-world chargers
|
### Test results on real-world chargers
|
||||||
|
|
||||||
See [charger_test_results.md](doc/charger_test_results.md)
|
See [charger_test_results.md](doc/charger_test_results.md)
|
||||||
|
|
Loading…
Reference in a new issue