Skip to content

Commit

Permalink
Merge branch 'master' into config-set
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremypoulter authored Aug 17, 2023
2 parents 5bedec6 + 4d0ef41 commit 881ad9e
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 56 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ jobs:
fail-fast: false
matrix:
env:
- openevse_nodemcu-32s
- openevse_esp-wrover-kit
- openevse_esp-wrover-kit_latest
- openevse_huzzah32_dev
- openevse_huzzah32
- openevse_featheresp32
- nodemcu-32s
- espressif_esp-wrover-kit
- espressif_esp-wrover-kit_latest
- adafruit_huzzah32_dev
- adafruit_huzzah32
- adafruit_featheresp32
- openevse_wifi_v1
- openevse_esp32-gateway-old
- openevse_esp32-gateway-e
- openevse_esp32-gateway-f
- openevse_esp32-gateway-e_dev
- openevse_esp32-gateway-f_dev
- openevse_esp32-poe-iso
- openevse_esp32-heltec-wifi-lora-v2
- olimex_esp32-gateway-old
- olimex_esp32-gateway-e
- olimex_esp32-gateway-f
- olimex_esp32-gateway-e_dev
- olimex_esp32-gateway-f_dev
- olimex_esp32-poe-iso
- heltec_esp32-wifi-lora-v2
gui:
- name: gui-v2
repo: OpenEVSE/openevse-gui-v2
Expand Down
2 changes: 1 addition & 1 deletion docs/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pio run -t upload
If you are using a different development board, you can specify one of the envs setup in `platformio.ini`, for example:

```bash
pio run -e openevse_huzzah32_idf -t upload
pio run -e adafruit_huzzah32 -t upload
```

Build artifacts will be in `.pio/build/your_openevse_env`
Expand Down
8 changes: 4 additions & 4 deletions docs/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ For releases and PR approval the builds are built using the [Build/Release OpenE
1. Click `Publish release`
1. The GitHub build workflow will generate the binaries and upload them to the release
1. Remove any unwanted binaries, need at least:
- `openevse_esp32-gateway-e.bin`
- `openevse_huzzah32.bin`
- `olimex_esp32-gateway-e.bin`
- `adafruit_huzzah32.bin`
- `openevse_wifi_v1.bin`
- `openevse_esp-wrover-kit`
- `openevse_nodemcu-32s`
- `espressif_esp-wrover-kit`
- `nodemcu-32s`
1. Test the uploaded binaries
1. Unselect the `Pre-release` checkbox
1. Click `Update release`
Expand Down
16 changes: 8 additions & 8 deletions docs/wired-ethernet.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ ESP32-gateway can be connected by micro USB and firmware can be uploaded using e
First upload:

```bash
esptool.py --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 bootloader.bin 0x8000 partitions.bin 0x10000 openevse_esp32-gateway-e.bin
esptool.py --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 bootloader.bin 0x8000 partitions.bin 0x10000 olimex_esp32-gateway-e.bin
```

Subsequent upgrades:

```bash
esptool.py --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 openevse_esp32-gateway-e.bin
esptool.py --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 olimex_esp32-gateway-e.bin
```

*Note: On Ubuntu 22.04 if you notice the ESP gateway is continually disconnect from the USB serail port,check this using `dmesg` then`sudo apt remove brltty` will fix this. This is because there is an ebook reader which shares the same serial adaptor chip as the ESP gateway and the udev rules conflict.*
Expand All @@ -65,28 +65,28 @@ For Ubuntu 22.04 the simplest solution is to remove the package brltty via sudo
First upload:

```bash
esptool.py --before default_reset --after hard_reset write_flash 0x1000 bootloader.bin 0x8000 partitions.bin 0x10000 openevse_esp32-gateway-f.bin
esptool.py --before default_reset --after hard_reset write_flash 0x1000 bootloader.bin 0x8000 partitions.bin 0x10000 olimex_esp32-gateway-f.bin
```

Subsequent upgrades:

```bash
esptool.py --before default_reset --after hard_reset write_flash 0x10000 openevse_esp32-gateway-f.bin`
esptool.py --before default_reset --after hard_reset write_flash 0x10000 olimex_esp32-gateway-f.bin`
```

## Compile and Upload

| Board | Environment |
| :------------------------ | :----------------------- |
| ESP32-GATEWAY pre-E | openevse_esp32-gateway |
| ESP32-GATEWAY E and later | openevse_esp32-gateway-e |
| ESP32-PoE-ISO | openevse_esp32-poe-iso |
| ESP32-GATEWAY pre-E | olimex_esp32-gateway |
| ESP32-GATEWAY E and later | olimex_esp32-gateway-e |
| ESP32-PoE-ISO | olimex_esp32-poe-iso |


Firmware can be compiled using PlatformIO `pio run -e <Environment>`. The `-t upload` option installs firmware over USB.

```bash
pio run -e openevse_esp32-gateway-e -t upload
pio run -e olimex_esp32-gateway-e -t upload
```

## Operation
Expand Down
4 changes: 2 additions & 2 deletions models/Config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ x-examples:
protocol: '-'
espflash: 4194304
espinfo: ESP32r1 2 core WiFi BLE BT
buildenv: openevse_esp-wrover-kit
buildenv: espressif_esp-wrover-kit
version: 4.1.0.dev
diode_check: true
gfci_check: true
Expand Down Expand Up @@ -329,7 +329,7 @@ properties:
default: 600
description: |
The maximum number of seconds to randomly add/subtract from the a scheduled charge start time, eg a value of 600 will adjust the start time my +/- 10 minutes. This is to help prevent large syncrinised loads when multiple verchiles start charging at the same time.
is_threephase:
is_threephase:
type: boolean
description: |
Needs to be enabled if charging with 3 phases setup for proper calculations
Expand Down
42 changes: 21 additions & 21 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ lib_deps =
matth-x/ArduinoOcpp@0.2.0
matth-x/ArduinoOcppMongoose@0.0.1
lib_ignore = WebSockets ; ArduinoOcpp: don't compile built-in WS library
extra_scripts =
extra_scripts =
pre:scripts/auto_fw_version.py
scripts/extra_script.py
debug_flags =
Expand Down Expand Up @@ -129,7 +129,7 @@ monitor_speed = 115200
monitor_filters =
esp32_exception_decoder

[env:openevse_nodemcu-32s]
[env:nodemcu-32s]
board = nodemcu-32s
build_flags =
${common.build_flags}
Expand All @@ -139,7 +139,7 @@ build_flags =
-D WIFI_LED_ON_STATE=LOW
-D RAPI_PORT=Serial2

[env:openevse_esp-wrover-kit]
[env:espressif_esp-wrover-kit]
board = esp-wrover-kit
lib_deps =
${common.lib_deps}
Expand Down Expand Up @@ -169,11 +169,11 @@ upload_speed = 2000000
# export PLATFORMIO_UPLOAD_FLAGS="-p 3232"


[env:openevse_esp-wrover-kit_latest]
extends = env:openevse_esp-wrover-kit
[env:espressif_esp-wrover-kit_latest]
extends = env:espressif_esp-wrover-kit
platform = espressif32

[env:openevse_huzzah32_dev]
[env:adafruit_huzzah32_dev]
board = featheresp32
build_flags =
${common.build_flags}
Expand All @@ -186,7 +186,7 @@ build_flags =
-D RAPI_PORT=Serial
-D DEBUG_PORT=Serial2

[env:openevse_huzzah32]
[env:adafruit_huzzah32]
board = featheresp32
build_flags =
${common.build_flags}
Expand All @@ -198,7 +198,7 @@ build_flags =
-D RAPI_PORT=Serial
-D DEBUG_PORT=Serial2

[env:openevse_featheresp32]
[env:adafruit_featheresp32]
board = featheresp32
build_flags =
${common.build_flags}
Expand Down Expand Up @@ -233,7 +233,7 @@ build_flags =
-D TX1=16
upload_command = curl -F firmware=@$SOURCE http://$UPLOAD_PORT/update --progress-bar | cat

[env:openevse_esp32-gateway-old]
[env:olimex_esp32-gateway-old]
# For hardware older than RevE
board = esp32-gateway
build_flags =
Expand All @@ -248,7 +248,7 @@ build_flags =
-D ENABLE_WIRED_ETHERNET
# https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/ETH_LAN8720/ETH_LAN8720.ino

[env:openevse_esp32-gateway-f]
[env:olimex_esp32-gateway-f]
# For hardware RevF and RevG
# https://github.com/OpenEVSE/ESP32_WiFi_V3.x/blob/master/docs/wired-ethernet.md
board = esp32-gateway
Expand All @@ -268,31 +268,31 @@ build_flags =
board_build.extra_flags = "-DARDUINO_ESP32_GATEWAY=\'F\'"
upload_speed = 921600

[env:openevse_esp32-gateway-e]
[env:olimex_esp32-gateway-e]
# For hardware RevE
# https://github.com/OpenEVSE/ESP32_WiFi_V3.x/blob/master/docs/wired-ethernet.md
extends = env:openevse_esp32-gateway-f
extends = env:olimex_esp32-gateway-f
build_flags =
${env:openevse_esp32-gateway-f.build_flags}
${env:olimex_esp32-gateway-f.build_flags}
board_build.extra_flags = "-DARDUINO_ESP32_GATEWAY=\'E\'"

[env:openevse_esp32-gateway-e_dev]
extends = env:openevse_esp32-gateway-e
[env:olimex_esp32-gateway-e_dev]
extends = env:olimex_esp32-gateway-e
build_flags =
${env:openevse_esp32-gateway-e.build_flags}
${env:olimex_esp32-gateway-e.build_flags}
${common.debug_flags}
build_type = debug
board_build.partitions = ${common.build_partitions_debug}

[env:openevse_esp32-gateway-f_dev]
extends = env:openevse_esp32-gateway-f
[env:olimex_esp32-gateway-f_dev]
extends = env:olimex_esp32-gateway-f
build_flags =
${env:openevse_esp32-gateway-f.build_flags}
${env:olimex_esp32-gateway-f.build_flags}
${common.debug_flags}
build_type = debug
board_build.partitions = ${common.build_partitions_debug}

[env:openevse_esp32-poe-iso]
[env:olimex_esp32-poe-iso]
# Tested against Rev C board
board = esp32-poe-iso
build_flags =
Expand All @@ -306,7 +306,7 @@ build_flags =
-D RESET_ETH_PHY_ON_BOOT=1
upload_speed = 921600

[env:openevse_esp32-heltec-wifi-lora-v2]
[env:heltec_esp32-wifi-lora-v2]
board = heltec_wifi_lora_32_V2
build_flags =
${common.build_flags}
Expand Down
10 changes: 5 additions & 5 deletions prepare-release.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!/bin/bash

# Script to compile all released enviroments and copy build artifacts to project root for easy upload to github releases.
# Script to compile all released enviroments and copy build artifacts to project root for easy upload to github releases.

pio run -e openevse_wifi_v1
cp .pio/build/openevse_wifi_v1/firmware.bin firmware.bin

pio run -e openevse_huzzah32
cp .pio/build/openevse_wifi_v1/firmware.bin openevse_huzzah32.bin
pio run -e adafruit_huzzah32
cp .pio/build/openevse_wifi_v1/firmware.bin adafruit_huzzah32.bin

pio run -e openevse_esp32-gateway-e
pio run -e olimex_esp32-gateway-e
cp .pio/build/openevse_wifi_v1/firmware.bin esp32-gateway-e.bin

echo "Done"
echo "Done"



2 changes: 1 addition & 1 deletion test/basic.http
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0g
Content-Disposition: form-data; name="firmware"; filename="firmware.bin"
Content-Type: application/octet-stream

< ./.pio/build/openevse_esp-wrover-kit_idf/firmware.bin
< ./.pio/build/espressif_esp-wrover-kit_idf/firmware.bin
----WebKitFormBoundary7MA4YWxkTrZu0gW
###

Expand Down
2 changes: 1 addition & 1 deletion test/update.http
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Content-Type: application/octet-stream

###

curl -F firmware=@.pio/build/openevse_esp-wrover-kit/firmware.bin {{baseUrl}}/update
curl -F firmware=@.pio/build/espressif_esp-wrover-kit/firmware.bin {{baseUrl}}/update

###
# Get the latest published relese (not pre-release)
Expand Down

0 comments on commit 881ad9e

Please sign in to comment.