The story of micro-ebusd
From the very beginning it was my intention to bring ebusd directly on the adapter itself instead of requiring another process running somewhere on a host.
However small ebusd may be, this was really challenging and basically impossible to realize in just 400KB of RAM, especially due to the small remainder when the network stack is running.
First of all I rewrote and stripped down the original ebusd with a dedicated driver for the ESP32-C series, which worked fine but consumed a lot of memory which is just not available, so only a few message definitions were possible.
Consequently I had to redesign that and wrote a complete eBUS codec engine based on CBOR files for message definitions which was done in parallel to the move from CSV to TypeSpec “saving” the findings of that process there.
That one also worked fine, but even though CBOR suggests “compressed binary” it was still way too big and still consumed too much RAM.
So the idea was born to create an eBUS codec engine that is able to run with almost no RAM usage at all - driven by tables residing in ROM.
Combined with my own Huffman context compression all of the message definitions of the ebusd-configuration repository
- can be bundled into the firmware,
- the eBUS participants can be scanned using the scan definitions
- including manufacturer specific scan, and
- the relevant messages for each environment can be activated as needed.
All of this took roughly 18 months using only my spare time but I think it was worth it.