Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8db5bd0
pioarduino support
Oct 20, 2025
359350b
prepare for modbus integration
Oct 20, 2025
250ceef
modbus class
Oct 20, 2025
f3fb702
read topics
Nov 3, 2025
7e25e9d
prepare set topics
Nov 3, 2025
a93f97d
binary for model-type-large
Nov 3, 2025
e0cd421
md5 hash
Nov 3, 2025
295b297
incorrect bracket in ui
Nov 3, 2025
f0f0c9e
readme
Nov 3, 2025
972e674
binary
Nov 3, 2025
1364cb6
Mixing plain with scaled temp topics #6
Nov 5, 2025
92578ff
Rename and extend isTemperatureTopic function to isTopicScale100 for …
Nov 12, 2025
33f0558
Add MD5 checksum for HeishaMon.ino.esp32-v4.02ALPHA binary
Nov 12, 2025
6f2b3ab
remove x100 from r/min
Nov 12, 2025
3e2bf4d
Remove RotationsPerMin from isTopicScale100 function for accuracy in …
Nov 12, 2025
5045ea9
#7 modbus float register
Nov 12, 2025
1a60595
line break
Nov 12, 2025
5267829
#1 error information
Nov 25, 2025
4334f68
Loxone Integration Sample
Feb 27, 2026
72563ae
Merge upstream 4.2.2 preserving Modbus TCP and blue theme
Sep 21, 2026
5517a8c
update fork to 4.2.2
Sep 21, 2026
bcd8a65
Enhance navigation and commands in the web interface; update Modbus r…
Sep 21, 2026
53dbeb4
Add S0 input support with Modbus integration and update documentation
Sep 21, 2026
f625e8a
Add opt-in Modbus TCP server for ESP32
Nov 5, 2025
67eacb1
Modbus: float32 writes, relay readback, sorted address layout
Sep 30, 2026
bad51ce
- run_tests.py: expect the sorted register layout, also check the
Sep 30, 2026
10bbde0
Merge remote-tracking branch 'upstream/main'
Sep 30, 2026
2305481
Modbus: map sterilization commands, fix Loxone template
Sep 30, 2026
eaae595
Fix include guard for HeishaModbusServer and adjust includes for ESP32
Oct 1, 2026
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
4 changes: 4 additions & 0 deletions .devcontainer/postCreate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
set -e

pre-commit install

# Libraries needed by the Modbus TCP server (ESP32). eModbus is not in the Arduino registry.
arduino-cli lib install "Async TCP"
ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/eModbus/eModbus.git#v1.7.5stable
8 changes: 7 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v7

- name: Test Modbus register map
run: python3 tests/modbus/run_tests.py

- name: Set version env var
run: echo "GIT_SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
shell: bash
Expand Down Expand Up @@ -59,7 +62,10 @@ jobs:
arduino-cli core install esp32:esp32@3.3.11

- name: Install dependencies
run: arduino-cli lib install ringbuffer pubsubclient arduinojson dallastemperature onewire "Adafruit NeoPixel"
run: |
arduino-cli lib install ringbuffer pubsubclient arduinojson dallastemperature onewire "Adafruit NeoPixel" "Async TCP"
# eModbus is not in the Arduino library registry, install it from git
ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/eModbus/eModbus.git#v1.7.5stable

- name: Compile Sketch for ESP8266
run: cd HeishaMon && arduino-cli compile --output-dir . --fqbn=esp8266:esp8266:d1_mini:xtal=160,vt=flash,ssl=basic,mmu=3216,non32xfer=fast,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=921600 --warnings=none --verbose HeishaMon.ino
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
pio
.vscode
.pioenvs
tests/modbus/build
.cache
build_output
firmware.map
Expand Down
5 changes: 3 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ scripts/build_esp8266.sh # builds HeishaMon/HeishaMon.ino for the small (Wemos
scripts/build_esp32s3.sh # builds HeishaMon/HeishaMon.ino for the large (ESP32-S3) PCB
```

Both scripts `cd HeishaMon` first and output the compiled binary/map alongside the sketch. Required libraries (installed via `arduino-cli lib install`, see `LIBSUSED.md` and `.github/workflows/main.yml`): `ringbuffer`, `pubsubclient`, `arduinojson`, `dallastemperature`, `onewire`, `Adafruit NeoPixel`. Board cores needed: `esp8266:esp8266` and `esp32:esp32@3.0.7`.
Both scripts `cd HeishaMon` first and output the compiled binary/map alongside the sketch. Required libraries (installed via `arduino-cli lib install`, see `LIBSUSED.md` and `.github/workflows/main.yml`): `ringbuffer`, `pubsubclient`, `arduinojson`, `dallastemperature`, `onewire`, `Adafruit NeoPixel`, `Async TCP` (the ESP32Async one; not `AsyncTCP`, which resolves to an outdated fork). Install eModbus separately with `ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/eModbus/eModbus.git#v1.7.5stable`; it is not in the Arduino registry. Board cores needed: `esp8266:esp8266` and `esp32:esp32@3.3.11`.

There is a devcontainer (`.devcontainer/`) preconfigured with `arduino-cli` and these dependencies (image `ghcr.io/the78mole/heishamon-dev`) — prefer developing/building inside it if available, since board cores and libs are already installed there.

There is no unit test suite for the firmware itself. Verification is: does it compile for both boards, and (when possible) manual testing against real hardware or logged serial captures. `Tools/chksumChecker.js` is a standalone Node script for computing/verifying checksums of raw heat pump command packets documented in the README — run with plain `node Tools/chksumChecker.js`.
Run `python3 tests/modbus/run_tests.py` for the Modbus register map and request-handler regression tests (host build, no Arduino toolchain). There is no other unit test suite for the firmware itself. Verification is: does it compile for both boards, and (when possible) manual testing against real hardware or logged serial captures. `Tools/chksumChecker.js` is a standalone Node script for computing/verifying checksums of raw heat pump command packets documented in the README — run with plain `node Tools/chksumChecker.js`.

The **rules engine and example rulesets do have tests**: `Examples/Rules/run_tests.sh` builds a host-side harness (`Examples/Rules/harness/`, plain `g++`, no Arduino toolchain) that compiles the real rules engine for Linux and runs each example's `tests/` scenarios against it, asserting the exact `@Set…` command stream. Run it after any change to `src/rules/`, `src/common/timerqueue.cpp`, the decode/command tables, or an example ruleset.

Expand Down Expand Up @@ -60,6 +60,7 @@ Rulesets can be validated and behavior-tested **off-device**: `Examples/Rules/ha
### Other subsystems

- **`dallas.cpp`/`dallas.h`**: DS18B20 1-wire temperature sensors on GPIO4, aliasing support, periodic MQTT resend.
- **`HeishaModbusServer.cpp`/`.h`, `ModbusRegisterMap.h`** (ESP32 only): opt-in Modbus TCP server (Settings: *Enable Modbus TCP*, *Allow Modbus writes*, both default off). eModbus callbacks run in the AsyncTCP task, so they only read a data snapshot and queue writes; `loop()` refreshes the snapshot and executes the queued writes. Modbus command IDs live in `ModbusRegisterMap.h` (name→ID tables), not in `commands.h`. Register map: `Modbus-Register-Mapping.md`.
- **`s0.cpp`/`s0.h`**: S0 kWh-meter pulse counting on GPIO12/GPIO14, with persisted running totals (restorable from a retained MQTT value on boot).
- **`gpio.cpp`/`gpio.h`**: generic extra GPIO configuration/control, also reachable from rules via the `gpio()` function and from MQTT (`gpio/` topic prefix).
- **`HeishaOT.cpp`/`HeishaOT.h`**: OpenTherm thermostat integration (`?`-prefixed rule variables, `mqttOTCallback`).
Expand Down
Loading
Loading