Skip to content

v0.2.0 — Bluetooth data collection

Choose a tag to compare

@teian teian released this 19 Aug 09:03
· 15 commits to main since this release
72104c4

First release in which Bluetooth data collection actually works against real
inverters, plus a security fix in the MQTT dependency chain.

Bluetooth

  • Requests are addressed per inverter, the way SBFspot does it: spot values
    with control byte 0xA0 in a frame to addr_unknown, archive commands with
    0xE0 in a frame addressed to the inverter itself, both carrying the
    device's SUSyID and serial instead of the any wildcards. The previous
    broadcast form left most queries unanswered.
  • Replies larger than one Bluetooth frame are reassembled. Such a reply
    arrives split over several L1 frames whose continuations carry raw payload
    behind their own header; both halves used to be discarded, so archive, DC and
    AC queries ran into the 30-second retry budget every cycle.
  • The shipped systemd unit permits AF_BLUETOOTH. Without it the client
    could not even open a socket (os error 97). An existing installation can
    either reinstall packaging/smalog.service or add the override documented in
    the README.
  • Raw frame capture for protocol debugging: set capture_file in a
    Bluetooth inverter entry, or run
    smalog test-bluetooth --all --capture <file>. Every L1 frame is appended in
    both directions as a hex line, before de-escaping and reassembly. Dropped
    reply frames are now logged with the reason they were dropped.

Security

The MQTT client moved from the unmaintained rumqttc 0.25.1 to
rumqttc-v4-next. That clears four rustls-webpki advisories — one high
(GHSA-82j2-j2ch-gfr8, panic on a malformed CRL BIT STRING), one moderate and
two low — which are fixed only in the 0.103 line that no rumqttc release
depends on. The connection remains plain TCP; TLS is now a feature flag away on
a patched webpki.

Migration tool

migrate-sbfspot names the missing URL scheme when --source or --target
is given as a bare filesystem path, instead of quoting the leading directory as
a database engine. Engine errors now show complete example URLs.

Toolchain

Builds on Rust 1.97.1. The declared minimum supported Rust version is 1.89.

Upgrading

Install the package or binary for your architecture as usual. Bluetooth users
should reinstall the systemd unit (or apply the RestrictAddressFamilies
override) — otherwise the service still cannot open a Bluetooth socket.

Full changelog: v0.1.0-rc.1...v0.2.0

What's Changed

  • read Bluetooth inverters again: SBFspot addressing, fragment reassembly, AF_BLUETOOTH by @teian in #6
  • swap the MQTT client for rumqttc-v4-next and build on Rust 1.97.1 by @teian in #7
  • release 0.2.0 by @teian in #8

Full Changelog: v0.1.0-rc.1...v0.2.0

Docker images