- Replace the blocking WiFi and MQTT connect loops with non-blocking
retry-on-timer functions, so the MQTT task never parks forever on an
unreachable broker
- Publish data on a fixed cadence as well as on new BLE packets, adding
data_age_s so stale values are visible
- Track successful publishes; force an MQTT reconnect after 5 minutes
without one (half-open TCP socket) and reboot after 60 minutes with no
success at all
- Retry Home Assistant discovery every 30s until every config topic has
been accepted instead of silently giving up
- MQTT keepalive 30s, socket timeout 5s, publish buffer 1024 bytes
- Scan continuously with a 50% duty cycle (interval 100ms / window 50ms)
instead of a 99% window that leaves almost no airtime for WiFi
- Drop the 5s scan / 10s idle loop cadence, which created regular 10s
holes in BLE reception
- Restart the scan only when the controller reports it as stopped
- setMaxResults(0): callbacks only, no per-device allocations
- Disable WiFi modem sleep and auto-reconnect on
- Initialise WiFi before BLE and create the MQTT task afterwards so the
two radio drivers are never brought up concurrently
- Log WiFi association, IP and disconnect reason codes
- Publish solar/mppt/diag every 60s: uptime, WiFi status/RSSI, free and
min-free heap, WiFi disconnect count, MQTT connect count, publish
failures, BLE valid/ignored packet counts and BLE packet age
- Count and log failed MQTT data publishes instead of dropping silently
- Log failed BLE scan starts
- Document the new diag topic