Commit Graph

10 Commits

Author SHA1 Message Date
Michael Holzmann 4cd4fbe41a fix: recover from WiFi/MQTT dead states
- 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
2026-11-14 14:49:36 +00:00
Michael Holzmann 98ac623423 fix: stop BLE scan from starving WiFi
- 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
2026-11-14 14:47:08 +00:00
Michael Holzmann 780df35131 feat: add runtime diagnostics
- 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
2026-11-14 14:46:17 +00:00
MrSossidge 9f459f0d97 docs: rewrite README in house style with support link 2026-09-14 21:49:53 +01:00
MrSossidge 55496cf613
Add donation button to README
Add a 'Buy Me a Coffee' button to the README.
2026-05-27 21:12:54 +01:00
MrSossidge cd534c4d0b Add HA dashboard, configuration template and update README 2026-05-18 14:39:07 +01:00
MrSossidge 35d37e1fe8 Add external load power calculation 2026-05-18 14:17:19 +01:00
MrSossidge 1c19d29353 Add external device load sensor 2026-05-18 13:49:59 +01:00
MrSossidge 27a362b5b3 Add README 2026-05-17 20:41:37 +01:00
MrSossidge 8de1704adc Working Victron SmartSolar BLE to MQTT bridge with HA discovery 2026-05-17 20:32:53 +01:00