How lumapu/ahoy works
Ahoy is ESP32/ESP8266 firmware that communicates with Hoymiles solar inverters over radio, exposes monitoring and configuration through a web/JSON interface, and publishes data through MQTT or serial. The principal runtime centers on app, which initializes inverter state and coordinates radio, scheduling, history, and publishing. The README documents power-limit control and zero-export use, but the excerpts do not show the complete command path or all web/network registrations; those links are omitted where their callers are not evidenced.
Main entry points: app.h Application coordinator · main.cpp Firmware runtime · hmSystem.h Inverter system · CmtRadio.h CMT radio
Components 19
Firmware core
- Firmware runtime
src/main.cpp - Application coordinator
src/app.h - Settings and configuration
src/config/settings.h - Task scheduler
src/utils/scheduler.h - Inverter system
src/hm/hmSystem.h - Inverter model
src/hm/hmInverter.h
Inverter radio
- Command communication
src/hm/Communication.h - NRF radio
src/hm/NrfRadio.h - CMT radio
src/hms/CmtRadio.h - CMT2300A driver
src/hms/cmt2300a.h
User interfaces
- Web interface
src/web/web.h - JSON REST API
src/web/RestApi.h - Access protection
src/web/Protection.h
Telemetry and output
- History data
src/plugins/history.h - MQTT publisher
src/publisher/pubMqtt.h - MQTT inverter data
src/publisher/pubMqttIvData.h - Serial publisher
src/publisher/pubSerial.h - Power limiting
src/plugins/MaxPower.h
Other components
- Solar operator
Connections 18
- Solar operator → Firmware runtime: monitors and configures
- Firmware runtime → Application coordinator: starts
src/main.cpp - Application coordinator → Settings and configuration: uses configuration
src/app.h - Application coordinator → Inverter system: coordinates
src/app.h - Inverter system → Inverter model: creates inverter
src/hm/hmSystem.h - Application coordinator → NRF radio: selects radio
src/app.h - Application coordinator → CMT radio: selects radio
src/app.h - Command communication → NRF radio: sends commands
src/hm/Communication.h - CMT radio → CMT2300A driver: uses driver
src/hms/CmtRadio.h - Application coordinator → Task scheduler: coordinates tasks
src/app.h - Application coordinator → History data: records history
src/app.h - Application coordinator → MQTT publisher: configures publisher
src/app.h - MQTT publisher → MQTT inverter data: publishes inverter data
src/publisher/pubMqtt.h - Application coordinator → Serial publisher: configures publisher
src/app.h - Application coordinator → Web interface: provides interface
src/app.h - Application coordinator → JSON REST API: provides JSON API
src/app.h - Application coordinator → Access protection: delegates access checks
src/app.h - Application coordinator → Power limiting: uses power limit
src/app.h