- WARNING! Sends phone number and password to your account in plain text. Use at own risk and only on secure local networks.
As ladeinorge/Defa does not provide a public API and I was unable to reverse-engineer it I created a simple Flask endpoint to start charging. It uses Selenium to click trough the webpage and start charging manually like a human would.
There is basically no error handling
Add 172.17.0.1 host.docker.internal
to /etc/hosts
- Docker
docker-compose up -d
http://docker-host-ip:5000/startCharging?phone=12345678&password=replaceMe&charger=chargerID
- Phone and password are credentials used when signing into ladeinorge.no
- Charger ID can be found at the end of URL after searching and selecting a charger at https://ladeinorge.no/start-ladestasjonen/
Navigate to docker-host-ip:8900
in a browser to open a VNC connection to the browser. Password is secret
Navigate to docker-host-ip:4444
in a browser