Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
f7cabf5
change to 3.3.1, update ElegantOTA, fix custom firmware upload
tobiasfaust Dec 24, 2024
ed5d97d
Update modbus.cpp
Lazgar Dec 26, 2024
16566f9
Create Solax-X3-PRO.json
Lazgar Dec 26, 2024
2c7f868
Update Solax-X3.json
Lazgar Dec 26, 2024
69a0b95
Merge pull request #108 from Lazgar/Split-Solax-X3-json
tobiasfaust Dec 26, 2024
ddeefbc
Merge pull request #107 from Lazgar/near-original
tobiasfaust Dec 26, 2024
0988cd9
fix null-termination of string handling (#96)
tobiasfaust Dec 27, 2024
e5b47d3
some additional infos per mqtt with debuglevel > 4
Lazgar Dec 28, 2024
2c13cb8
Update mqtt.cpp
Lazgar Dec 28, 2024
b0fd3c6
Update mqtt.cpp
Lazgar Dec 28, 2024
c28ddd1
Merge pull request #110 from Lazgar/near-original
tobiasfaust Dec 28, 2024
94020a3
Update modbus.cpp
Lazgar Dec 28, 2024
977c08d
support for OpenWB 2.0 Api (#100)
tobiasfaust Dec 28, 2024
03b5a23
update
tobiasfaust Dec 28, 2024
e854901
Merge branch 'development' of https://github.com/tobiasfaust/SolaxMod…
tobiasfaust Dec 28, 2024
aa3cac5
remove unused buffer and improve clarity
tobiasfaust Dec 28, 2024
a438201
Merge branch 'tobiasfaust:development' into near-original
Lazgar Dec 29, 2024
456d791
Update modbus.cpp
Lazgar Dec 29, 2024
b5c7808
minor fixes
tobiasfaust Dec 29, 2024
9eec85d
add optional WIFISSID/WIFIPASSWORD
tobiasfaust Dec 29, 2024
05196d3
Merge branch 'tobiasfaust:development' into near-original
Lazgar Dec 29, 2024
d1a7910
change ESP32-S2 board
tobiasfaust Dec 29, 2024
a33c8cc
adjust openWB topics
tobiasfaust Dec 29, 2024
92e22ef
fix
tobiasfaust Dec 29, 2024
5f1ed4a
priorize requesting ID Data higher than LiveData (#76)
tobiasfaust Dec 29, 2024
5523dc3
update WiFi credentials in platformio.ini to use fixed values
tobiasfaust Dec 29, 2024
24fd8ba
some fixes
tobiasfaust Dec 29, 2024
b6c6192
Merge branch 'tobiasfaust:development' into near-original
Lazgar Dec 30, 2024
dc6eca6
Update modbus.cpp
Lazgar Dec 30, 2024
3c5359e
Update modbus.cpp
Lazgar Dec 30, 2024
365c673
delete unnecessary newlines, fix serial-pins
tobiasfaust Dec 30, 2024
982085d
Update modbus.cpp
Lazgar Dec 30, 2024
a41e6e7
Update modbus.cpp
Lazgar Dec 30, 2024
35c2c2a
Update modbus.cpp
Lazgar Dec 30, 2024
ac14603
Merge branch 'tobiasfaust:development' into near-original
Lazgar Dec 30, 2024
04f39f9
use checkbox for selection instead of radiobuttons
tobiasfaust Dec 30, 2024
422012b
Merge pull request #111 from Lazgar/near-original
tobiasfaust Dec 30, 2024
4f95363
Revert "use checkbox for selection instead of radiobuttons"
tobiasfaust Dec 30, 2024
e7217b3
prevent watchdog timer event
tobiasfaust Dec 30, 2024
cb7516a
update
tobiasfaust Dec 30, 2024
0e2bb33
Update modbus.cpp
Lazgar Dec 30, 2024
eb6b078
Merge pull request #112 from Lazgar/near-original
tobiasfaust Dec 31, 2024
c968d3d
add TotalEnergyPV for GroWatt (#100)
tobiasfaust Dec 31, 2024
c53948d
Merge branch 'development' of https://github.com/tobiasfaust/SolaxMod…
tobiasfaust Dec 31, 2024
13cde6a
bugfix: fix esp crash for /getitems if using an huge register table (…
tobiasfaust Jan 3, 2025
e081b23
use internal logging method
tobiasfaust Jan 4, 2025
8494d23
fix register id definition (#113)
tobiasfaust Jan 4, 2025
f2a3c14
remove unnecessary webserver in mqtt class
tobiasfaust Jan 4, 2025
6c4918a
remove unnecessary webserver in mqtt class
tobiasfaust Jan 4, 2025
adddfc8
handle out-of-range crash (#96 #113)
tobiasfaust Jan 4, 2025
2014a6f
correct unit from kVarh to kWh in Deye_SUN_SG04LP3.json
tobiasfaust Jan 4, 2025
f7ffcc3
add bitwise mappings
tobiasfaust Jan 5, 2025
1d31efe
datatype "binary" now available for json register definitions (PR #115)
tobiasfaust Jan 6, 2025
b5fb2d2
fix openwb topic (#114)
tobiasfaust Jan 6, 2025
3aaf786
fix array access direction for datatype binary (PR #115)
tobiasfaust Jan 6, 2025
8fb7cda
fix: 1 item less than map size, because last item is default value
tobiasfaust Jan 6, 2025
b5bcb5c
fix: resolve CORS issue when downloading a stable release
tobiasfaust Jan 11, 2025
5e70fe1
Merge branch 'stable' into development
tobiasfaust Jan 11, 2025
a858970
fix: update button elements for actions and add confirmation dialogs …
tobiasfaust Jan 12, 2025
5a2811e
Merge branch 'development' of https://github.com/tobiasfaust/SolaxMod…
tobiasfaust Jan 12, 2025
c9f6f03
add confirmation dialog for ESP reset or Wifi-Reset (#120)
tobiasfaust Jan 12, 2025
0a50686
feature: add confirmation dialog for file deletion
tobiasfaust Jan 12, 2025
c831fb6
Enhance WebSocket and JSON handling with new features (#126)
tobiasfaust Jan 20, 2025
08b2ed6
Visualisierung der Settopics (#127)
tobiasfaust Jan 22, 2025
2eec165
add "newUpdate available" info in WebUI header (#129)
tobiasfaust Jan 23, 2025
e15fafb
Update Solax-X3.json (#128)
Lazgar Jan 23, 2025
eec827e
fix: correct update availability message in WebUI
tobiasfaust Jan 23, 2025
8712f10
refactor: update subscription field to MQTT topic and enhance tooltip…
tobiasfaust Jan 23, 2025
2afca2d
fix: normalize case for mapped values in modbus mapping function
tobiasfaust Jan 24, 2025
8426a65
Correct bootloader offsets as not all ESP32 variants use 0x1000 (#130)
NHellFire Jan 25, 2025
2710049
add toggle buttons at ModbusItems WebUI to change all items at once (…
tobiasfaust Jan 29, 2025
3ea9a20
add Growatt-SPH-V124 register file (thanks to @StefanNouza) (#109)
tobiasfaust Jan 29, 2025
2784579
add support for additional file types in BuildAndDeploy workflow
tobiasfaust Jan 29, 2025
237ae47
add toggle functionality for Modbus items
tobiasfaust Feb 3, 2025
a195e5e
add titles to toggle icons for better accessibility in Modbus item co…
tobiasfaust Feb 7, 2025
87d859f
Merge branch 'stable' into development
tobiasfaust Feb 7, 2025
90e0f69
Update Solax-X3.json (#134)
Lazgar Feb 9, 2025
1b11cb2
refactor logging methods to use logN for consistency and improved rea…
tobiasfaust Feb 11, 2025
0727df1
bump version to 3.3.3
tobiasfaust Feb 11, 2025
1be235e
Merge branch 'development' of https://github.com/tobiasfaust/SolaxMod…
tobiasfaust Feb 11, 2025
367ff9e
Update Solax-X3.json (#135)
Lazgar Feb 15, 2025
96116f2
Lowercase nur fürs Mapping bei Set Befehlen (#141)
Lazgar Feb 23, 2025
49d3280
Add backup functionality to handlefiles for complete filesystem zipping
tobiasfaust Feb 24, 2025
bc20b6d
Add clipboard copy functionality for raw data in web interface
tobiasfaust Feb 24, 2025
13fbe12
bugfix: Set Befehle sind limitiert auf 19 #137
tobiasfaust Feb 24, 2025
5b8caab
refactor: Remove deprecated JSON handling functions from MyWebServer …
tobiasfaust Feb 24, 2025
7f99fa4
Update Solax-X3.json (#143)
Lazgar Mar 3, 2025
b725b30
fix: Improve visibility check and correct IP address assignment in MQ…
tobiasfaust Mar 4, 2025
e52c96f
chore: Update ChangeLog for release 3.3.3 with bug fixes and Solax-X3…
tobiasfaust Mar 19, 2025
bd35b47
yml; warnings; ESPAsyncWebServer@3.6.0 (#150)
Obihoernchen80 Apr 24, 2025
fa83bde
Change default pins for ESP32-C3 (fixes #148) (#149)
NHellFire Apr 28, 2025
8c690d3
fix: Update ChangeLog for release 3.3.4 to include default pin change…
tobiasfaust Apr 28, 2025
7e5c265
Write multiregister (#154)
Lazgar Jun 24, 2025
d1c2718
remove deprecated backup functionality from Elegant-OTA
tobiasfaust Aug 18, 2025
a96d3b6
add python.env file with HTML_DIR variable for handlefiles script
tobiasfaust Aug 18, 2025
2e9788e
remove: delete handleFiles copy
tobiasfaust Aug 18, 2025
2cf9fb0
splitting LittleFS partition into SystemFS and ConfigFS
tobiasfaust Aug 19, 2025
0b7c801
refactor: handleReset function
tobiasfaust Aug 19, 2025
be6e176
- feature: add new webserial log monitor page for all variants
tobiasfaust Oct 1, 2025
35b4618
fix compiler warning of wring attr order init
tobiasfaust Oct 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/createManifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
if os.path.isfile(os.path.join(args.binarypath, "littlefs.bin")):
files_data["parts"].append({
"path": f"https://tobiasfaust.github.io/{args.repository}/firmware/{SubDir}/{FIRMWARENAME}/littlefs.{FileExtension}.bin",
"offset": int(readOffsetFromPartitionCSV("partitions.csv", "spiffs"), 16),
"offset": int(readOffsetFromPartitionCSV("partitions.csv", "webdata"), 16),
"filetype": "filesystem"
})

Expand Down
39 changes: 27 additions & 12 deletions .github/scripts/createMergedFirmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
-b, --BuildDir (str): The build directory containing the built firmware binaries. Required.
-p, --PathOfPartitionsCSV (str): The path to the partitions.csv file. Default is 'partitions.csv'. Required.
Functions:
readOffsetFromPartitionCSV(path: str, name: str) -> int:
readOffsetFromPartitionCSV(path: str, partitionLabel: str) -> int:
Args:
Returns:
Example:
Expand All @@ -31,31 +31,46 @@
args = parser.parse_args()
result = None

# Bootloader offsets vary by chip
bootloader_offsets = {
"ESP32": "0x1000",
"ESP32-S2": "0x1000",
"ESP32-S3": "0x0",
"ESP32-C2": "0x0",
"ESP32-C3": "0x0",
"ESP32-C5": "0x2000",
"ESP32-C6": "0x0",
"ESP32-H2": "0x0",
"ESP32-P4": "0x2000",
}

if(not os.path.isfile(args.PathOfPartitionsCSV)):
logging.error(f'File {args.PathOfPartitionsCSV} does not exist')
exit(1)

if args.BuildDir and os.path.isdir(args.BuildDir):
if 'ESP32' in args.ChipFamily:
result = f'esptool.py --chip {args.ChipFamily} merge_bin \
bootloader_offset = bootloader_offsets[args.ChipFamily]

result = f'esptool --chip {args.ChipFamily} merge-bin \
--output {args.BuildDir}/merged-firmware.bin \
--flash_mode dout \
--flash_freq 80m \
--flash_size 4MB \
0x1000 {args.BuildDir}/bootloader.bin \
--flash-mode dout \
--flash-freq 80m \
--flash-size 4MB \
{bootloader_offset} {args.BuildDir}/bootloader.bin \
0x8000 {args.BuildDir}/partitions.bin \
{readOffsetFromPartitionCSV("partitions.csv", "app0")} {args.BuildDir}/firmware.bin'

if os.path.isfile(f'{args.BuildDir}/littlefs.bin'):
result += f' {readOffsetFromPartitionCSV("partitions.csv", "spiffs")} {args.BuildDir}/littlefs.bin'
result += f' {readOffsetFromPartitionCSV("partitions.csv", "webdata")} {args.BuildDir}/littlefs.bin'

elif 'ESP8266' in args.ChipFamily and os.path.isfile(f'{args.BuildDir}/littlefs.bin'):
result = f'esptool.py --chip {args.ChipFamily} merge_bin \
result = f'esptool --chip {args.ChipFamily} merge-bin \
--output {args.BuildDir}/merged-firmware.bin \
--flash_mode dout \
--flash_freq 40m \
--flash_size 4MB \
--flash-mode dout \
--flash-freq 40m \
--flash-size 4MB \
0x0000 {args.BuildDir}/firmware.bin \
{readOffsetFromPartitionCSV("partitions.csv", "spiffs")} {args.BuildDir}/littlefs.bin'
{readOffsetFromPartitionCSV("partitions.csv", "webdata")} {args.BuildDir}/littlefs.bin'

print(f'command={result}')
14 changes: 7 additions & 7 deletions .github/scripts/myUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def deleteVersions(root: str, keepVersions: int, json: list = None) -> None:
# Lade die 'versions.json' Datei
versions_file = os.path.join(root, 'versions.json')
json = read_json_file(versions_file)
if versions is None:
if json is None:
logging.error(f"Fehler beim Verarbeiten der Datei {versions_file}")
return

Expand Down Expand Up @@ -358,18 +358,18 @@ def changeURL(root: str, url: str) -> None:
except Exception as e:
logging.error(f"Fehler beim Verarbeiten der Datei {manifest_path}: {e}")

def readOffsetFromPartitionCSV(path: str, name: str) -> int:
def readOffsetFromPartitionCSV(path: str, partitionLabel: str) -> int:
"""
Reads a CSV file and calculates the offset for a given name.
Reads a CSV file and calculates the offset for a given partition label.
This function reads the specified CSV file with a delimiter of ','.
It fills in the Offset column if it is empty by adding the previous offset
and the value from the Size column of the previous row. It returns the calculated
offset from the row where the value in the first column matches the given name as a hexadecimal number.
offset from the row where the value in the first column matches the given partition label as a hexadecimal number.
If the file does not exist or cannot be read, it returns None.

<b>Args:</b>
path (str): The path to the CSV file.
name (str): The name to search for in the first column.
partitionLabel (str): The partition label to search for in the first column.

<b>Returns:</b>
int: The calculated offset as a hexadecimal number, or None if the file cannot be read.
Expand All @@ -379,7 +379,7 @@ def readOffsetFromPartitionCSV(path: str, name: str) -> int:
with open(path, 'r') as file:
lines = file.readlines()
headers = lines[0].strip().split(',')
name_index = 0
partition_label_index = 0
offset_index = 3
size_index = 4

Expand All @@ -391,7 +391,7 @@ def readOffsetFromPartitionCSV(path: str, name: str) -> int:
columns[offset_index] = str(previous_offset + previous_size)
previous_size = int(columns[size_index], 0)
previous_offset = int(columns[offset_index], 0)
if columns[name_index] == name:
if columns[partition_label_index] == partitionLabel:
return hex(previous_offset)
except (FileNotFoundError, IndexError, ValueError):
return None
19 changes: 10 additions & 9 deletions .github/workflows/BuildAndDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ on:
- '**.yml'
- '**.sh'
- '**.py'
- '**.json'
- '**.js'
- '**.css'
- '**.html'

jobs:
build:
Expand Down Expand Up @@ -46,9 +50,6 @@ jobs:
- firmware: firmware_ESP32-C3
architecture: ESP32-C3
subvariant: standard
- firmware: firmware_ESP32-WebSerial
architecture: ESP32
subvariant: webSerial

steps:
- name: checkout repository
Expand Down Expand Up @@ -250,7 +251,7 @@ jobs:
continue
fi
echo "Uploading $file"
gh release upload -R tobiasfaust/${{ env.GITHUB_REPOSITORY }} ${{ steps.set_env_var.outputs.tagname }} "$file" --clobber
gh release upload -R ${{env.GITHUB_OWNER}}/${{ env.GITHUB_REPOSITORY }} ${{ steps.set_env_var.outputs.tagname }} "$file" --clobber
fi
done
done
Expand All @@ -263,18 +264,18 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: |
mkdir -p manifests
tagNames=$(gh release ls -R tobiasfaust/${{ env.GITHUB_REPOSITORY }} --json tagName)
tagNames=$(gh release ls -R ${{env.GITHUB_OWNER}}/${{ env.GITHUB_REPOSITORY }} --json tagName)

for tag in $(echo "$tagNames" | jq -r '.[].tagName'); do
for asset in $(gh release view $tag -R tobiasfaust/${{ env.GITHUB_REPOSITORY }} --json assets --jq '.assets[].name' | grep -E 'manifestAll|filesAll'); do
echo "Downloading file: gh release download $tag -R tobiasfaust/${{ env.GITHUB_REPOSITORY }} --pattern '$asset' --dir 'manifests/${tag}/'"
for asset in $(gh release view $tag -R ${{env.GITHUB_OWNER}}/${{ env.GITHUB_REPOSITORY }} --json assets --jq '.assets[].name' | grep -E 'manifestAll|filesAll'); do
echo "Downloading file: gh release download $tag -R ${{env.GITHUB_OWNER}}/${{ env.GITHUB_REPOSITORY }} --pattern '$asset' --dir 'manifests/${tag}/'"
gh release download $tag \
-R tobiasfaust/${{ env.GITHUB_REPOSITORY }} \
-R ${{env.GITHUB_OWNER}}/${{ env.GITHUB_REPOSITORY }} \
--pattern "$asset" \
--dir "manifests/${tag}/" || true
done
mkdir -p manifests/${tag}/
gh release view $tag -R tobiasfaust/${{ env.GITHUB_REPOSITORY }} --json assets > "manifests/${tag}/assets.json"
gh release view $tag -R ${{env.GITHUB_OWNER}}/${{ env.GITHUB_REPOSITORY }} --json assets > "manifests/${tag}/assets.json"
done
python app/.github/scripts/createReleaseVersions.py \
--ManifestDir manifests \
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.pio/
.vscode/
.git/
data/web/handlefiles*
data/web/webserial*
3 changes: 3 additions & 0 deletions CPPLINT.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
linelength=120
root=src
filter=-build/include_what_you_use
26 changes: 26 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
Release 3.4.0:
+++++++ This version is not OTA compatible with older versions +++++++
+++++++ Please do a fresh installation by web-installer +++++++
- add python.env file with HTML_DIR variable
- splitting LittleFS partitions: Separating system files (web UI, static assets) and user configuration/data (settings, user uploads) into distinct partitions (sysFS/configFS) improves reliability, allows safe firmware updates without overwriting user data, and enables easier backup/restore of user settings independently from system files.
- feature: add new webserial log monitor page for all variants
- fix broken ethernet connection handling by adding global gpio handling

Release 3.3.4:
- Change default pins for ESP32-C3 (#149), thanks to @NHellFire
- remove deprecated backup functionality from Elegant-OTA

Release 3.3.3:
- improve logging functionality methods
- fixing some bugs
- updated Solax-X3 json (thanks to @Lazgar)

Release 3.3.2:
- new feature: add confirmation dialog for ESP reset
- migrate from old ajax communication to standard websocket communication
- new feature: show set topics in WebUI (thanks to @laszgar)
- new feature: add "newUpdate available" info in WebUI header
- new feature: add toggle buttons at ModbusItems WebUI to change all items at once (#96)
- new Inverter: add Growatt-SPH-V124 register file (thanks to @StefanNouza) (#109)

Release 3.3.1:
- new Feature: datatype "binary" now available for json register definitions (PR #115)
- BugFix: fix null-terminationof string handling (#96)
- new feature: support for OpenWB 2.0 Api (#100)
- bugfix: fix esp crash for /getitems if using an huge register table (#76)
- fix CORS Issue when download a stable release
- bugfix: fix register id definition (#113)

Release 3.3.0:
- new feature: WebSerial as remote serial output (#74)
Expand Down
Loading