Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dingo35 committed Nov 18, 2024
1 parent 188ac51 commit 04ca340
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 21 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ After updating the firmware, you can access the status page again using the norm
[Hardware installation](docs/installation.md)<br>
[Configuration](docs/configuration.md)<br>
[Operation](docs/operation.md)<br>
[Building and Flashing the firmware](docs/building_flashing.md)<br>
57 changes: 57 additions & 0 deletions docs/building_flashing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Building the firmware
You can get the latest release off of https://github.com/dingo35/SmartEVSE-3.5/releases, but if you want to build it yourself:
* Install platformio-core https://docs.platformio.org/en/latest/core/installation/methods/index.html
* Clone this github project, cd to the smartevse directory where platformio.ini is located
* Compile firmware.bin: `platformio run` (or `pio run`) <br>

Following these instructions on Linux you would create firmware.bin in directory /path/to/SmartEVSE-3.5/SmartEVSE-3/.pio/build/release as follows:
```
sudo apt install platformio
git clone https://github.com/dingo35/SmartEVSE-3.5.git
cd SmartEVSE-3.5/SmartEVSE
pio run
```

For versions older than v3.6.0, build the spiffs filesystem:
* Compile spiffs.bin: `pio run -t buildfs`

# Flashing the firmware
1. Almost always, even when your webserver seems not to be working, the http://ipaddress/update link will be working;
this is the simplest way to flash your firmware; with the "Choose file" option you can flash any firmware[.debug].bin you downloaded or built.
When flashing firmware older then v3.6.0, you must also flash spiffs.bin this way.
2. Alternatively, you can connect your SmartEVSE with a USB-C cable to your computer:
* Linux users: the device will present itself usually as /dev/ttyUSB0
* Windows users will have to install USB drivers https://www.silabs.com/de...o-uart-bridge-vcp-drivers

You can use the following flashing software:

1. If you have installed platformio:
```
pio run -t upload
```
THIS IS THE PREFERRED WAY, because it also flashes your bootloader and the partitions.bin; so whatever you messed up, this will fix it!
For versions older than v3.6.0, upload the spiffs filesystem:
```
pio run -t uploadfs
```
2. esptool:
```
sudo apt install esptool
esptool --port /dev/ttyUSB0 write_flash 0x10000 firmware.bin
esptool --port /dev/ttyUSB0 write_flash 0x1c0000 firmware.bin
```
3. Flash it with a 3rd party tool:
A nice 3rd party tool can be found here: https://github.com/marcelstoer/nodemcu-pyflasher
Follow the instructions in the screenshot posted here: https://github.com/dingo35/SmartEVSE-3.5/issues/79
Remember to flash to both partitions, `0x10000` and `0x1c0000` !!!
# I think I bricked my SmartEVSE
Luckily, there are no known instances of people who bricked their SmartEVSE.
Get your preferred firmware.bin from the asset zip you can download from https://github.com/dingo35/SmartEVSE-3.5/releases, and follow the
instructions in [Flashing the firmware](#flashing-the-firmware).
If all else fails, follow the [Building the Firmware](#building-the-firmware) instructions, and flash following the "pio run -t upload" path; always works!!!
29 changes: 8 additions & 21 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,14 @@ mosquitto_pub -h ip-of-mosquitto-server -u username -P password -t 'SmartEVSE-x
```
...where L1 - L3 are the currents in deci-Ampères. So 100 means 10.0A.

Your EVMeter can be fed with:
```
mosquitto_pub -h ip-of-mosquitto-server -u username -P password -t 'SmartEVSE-xxxxx/Set/EVMeter' -m L1:L2:L3:P:E
```
...where L1 - L3 are the currents in deci-Ampères. So 100 means 10.0A.
...where P is the Power in W,
...where E is the Energy in Wh.

You can find test scripts in the test directory that feed EV and MainsMeter data to your MQTT server.

# Multiple SmartEVSE controllers on one mains supply (Power Share)
Expand Down Expand Up @@ -325,24 +333,3 @@ For further details, please refer to [serkri#215](https://github.com/serkri/Smar
* Beyond existing limits (Mains, MaxCircuit), the charging current will be controlled to ensure that the total of all Mains phase currents does not exceed the Capacity setting.
* If you are unfamiliar with this setting or do not fall under the applicable regulations, it is advisable to keep the setting at its default setting. (disabled)

# Building the firmware
You can get the latest release off of https://github.com/dingo35/SmartEVSE-3.5/releases, but if you want to build it yourself:
* Install platformio-core https://docs.platformio.org/en/latest/core/installation/methods/index.html
* Clone this github project, cd to the smartevse directory where platformio.ini is located
* Compile firmware.bin: `platformio run` (or `pio run`)

For versions older than v3.6.0, build the spiffs filesystem:
* Compile spiffs.bin: `platformio run -t buildfs`

If you are not using the webserver /update endpoint to upload the firmware:
* Windows users: install USB drivers https://www.silabs.com/de...o-uart-bridge-vcp-drivers
* Upload (flash) via USB configured in platformio.ini: `platformio run --target upload`
* Upload spiffs.bin: `platformio run --target uploadfs` (not required for current versions)

# I think I bricked my SmartEVSE
Luckily, there are no known instances of people who bricked their SmartEVSE.
But if all else fails, connect your SmartEVSE via USB-C to your laptop and follow the instruction https://github.com/dingo35/SmartEVSE-3.5/issues/79

Another tool can be found here: https://github.com/marcelstoer/nodemcu-pyflasher

Remember to flash to both partitions, `0x10000` and `0x1c0000` !!!

0 comments on commit 04ca340

Please sign in to comment.