Web interface for Huebner inverter
Click to open TOC
This repository hosts the source code for the Web Interface for the Huebner inverter, and derivated projects:
- OpenInverter Sine (and FOC) firmware
- Vehicle Control Unit for Electric Vehicle Conversion Projects
- OpenInverter buck or boost mode charger firmware
- OpenInverter non-grid connected inverter
- BMS project firmware
- ...
It is written with the Arduino development environment and libraries.
To use the web interface 2 things are needed :
- You need to have a computer on the same WiFi network as the board,
- You need to 'browse' the web interface page.
There are 2 possibilities:
- Either you connect to an Access Point generated by the board. The default name for this access point is 'ESP-xxxxx' but can be customized. In that case, the board will have a fixed IP address of
192.168.4.1
(and will be reachable on http://192.168.4.1/) - Or you can configure the board to join your own WiFi network ; and in that case you may need to tweak your network configuration to provide a fixed address to the board (not necessary).
The board announces itself to the world using mDNS protocol (aka Bonjour, or Rendezvous, or Zeroconf), so you may be able to reach the board using a local name of inverter.local
.
So first try to reach it on http://inverter.local/
The web interface has been initially designed to run on ESP8266 boards, such as:
(Pay attention to the SPI flash chip on your board: some need a special mode QOUT
instead of QIO
for programming)
You can buy pre-programmed boards:
- OpenInverter shop
- EVBMW Shop (Note : you can choose between OpenInverter or Lexus VCU firmware version )
You can find pre-compiled versions of the firmware on the OpenInverter forum, or can compile it yourself by following the instructions below.
If your board is already programmed with this esp8266-web-interface firmware, or with a firmware that has either ESP8266HTTPUpdateServer or ArduinoOTA components compiled in (it may be the case with the default firmware when you buy a new module), and if you can already reach it (WiFi + network); then you can use one of these approachs:
- Using ESP8266HTTPUpdateServer component
- Either go to http://inverter.local/update and upload the binary firmware file
- Or use this command line
curl -F "image=@firmware.bin" inverter.local/update
- Using the ArduinoOTA component
- Use the
espota.py
tool (available in the Arduino tools) to upload either a binary firmware file, or a binary filesystem file:- Firmware:
python ..../Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/espota.py -i esp8266-761bb8.local --progress --file firmware.bin
- Filesystem:
python ..../Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/espota.py -i esp8266-761bb8.local --spiffs --progress --file spiffs.bin
- Firmware:
- Using your development environment (see the instructions below)
- Use the
If your board is new and unprogrammed, or if you want to fully re-program it, you'll need to have a wired connection between your computer and the board. Assuming you're using the original Olimex board, you'll need :
- A 3.3v capable USB / Serial adapter
- the following connections:
Pin# | ESP8266 Board Function | USB / Serial adapter |
---|---|---|
1 | +3.3v input | (Some adapters provide a +3.3v output, you can use it) |
2 | GND | GND |
3 | RXD input | TXD output |
4 | TXD output | RXD input |
Then you would use any of the the development tool below ; or the esptool.py
tool to upload either a binary firmware file, or a binary filesystem file.
You can choose between the following tools:
Arduino IDE is an easy-to-use desktop IDE, which provides a quick and integrated way to develop and update your board.
PlatformIO is a set of tools, among which PlatformIO Core (CLI) is a command line interface that can be used to build many kind of projects. In particular Arduino-based projects like this one. (Note: even if PlatformIO provides an IDE, these instructions only target the CLI.)
This repository contains the software which runs on the esp8266 WiFi modules used as part of the OpenInverter project. Its purpose is to provide a web interface for the configuration and monitoring of an OpenInverter based system.
There are two parts to the esp8266 WiFi module software - a firmware and a web application. The firmware implements a HTTP API and a small web server. The HTTP API sits on top of a serial communication protocol between the esp8266 and the OpenInverter board. The web server hosts the HTML/css/js files which make up the end user web application.
You can use an FTDI board to connect your esp8266 module to your laptop/desktop in order to program it. Only four cables are required between the FTDI and the esp8266 - 3.3V, GND, RX,and TX.
TX on the esp8266 connects to RX on the FTDI and vice versa.
Connect the USB port of the FTDI to your laptop/desktop.
You can find the pinout of the Olimex esp8266 module here: https://github.com/OLIMEX/ESP8266/
Warning: be sure your FTDI board is set to 3.3v and not 5v mode. If it is in 5v mode, it may damage your esp8266 module.
- Install the Arduino application
- Add esp8266 board support in the Arduino application. See https://github.com/esp8266/Arduino for more details on how to do this.
- Fetch the code in this repository.
Download the zip file at this link: https://github.com/jsphuebner/esp8266-web-interface/archive/refs/heads/master.zip
~~ OR ~~
Clone the code with git.
git clone https://github.com/jsphuebner/esp8266-web-interface.git
-
Open OpenInverterWeb/OpenInverterWeb.ino in the Arduino application.
-
Ensure you have the correct settings in Arduino for the esp8266.
- Tools > Board > "Olimex MOD-WIFI-ESP8266(-DEV)""
- Tools > Upload speed > 115200
- Tools > Flash Size > 2MB
- Tools > Debug Port > Disabled
- Tools > Port > Whatever serial port your esp8266 appears on
- Install the firmware.
Sketch > upload.
- Install the HTML/CSS/js files on the esp8266 which make up the web interface.
Tools > ESP8266 Sketch Data Upload
If you already have a copy of the firmware/web interface installed and just want to update the web interface to the latest version, you can use the makefile included here. This can be useful when developing against the esp8266 for iterating changes quickly.
-
Install the 'make' tool on your PC. E.g. sudo apt-get install build-essential Debian/Ubuntu.
-
Set the INVERTER_IP environment variable to the IP of your esp8266. If you are connecting your PC directly to the esp8266, the IP will be 192.168.4.1 usually.
export INVERTER_IP=192.168.4.1
- Upload the web interface files
make install