Fixed
-
Device metadata now reaches the API after a restart. The hub caches the
metadata snapshot the BLE worker pushes when it attaches to the IPC socket,
but that was the only push: the metadata itself is not discovered until
afterwards, in the initial GATT reads. Because the hub attaches first, it
cached the empty metadata and then served blank firmware, memory and
biorhythm names for the rest of the process's life — restarting the hub was
the only cure. The reads were never broken; nothing republished their result.In practice: saved memory and biorhythm names no longer come up blank after a
restart. Metadata is now published on change, exactly like state, and
reproduced by a test that fails against the previous code. -
Failed metadata reads are no longer silent. A read that raised, or that
came back unusable, was discarded without leaving a trace anywhere — which is
what made this present as a flaky BedJet rather than a delivery bug. Failures
now log, as does a handshake that yields no metadata at all. -
Metadata writes to a client now log and drop the writer on failure, matching
the state broadcast instead of failing silently.
Interface note
IpcServer.start() now requires subscribe_metadata() on the BLE manager object
alongside subscribe(). Only relevant if you supply your own implementation.
Upgrading
The change is in the BLE worker, so restart both units:
sudo systemctl restart bedjet-ble bedjet-hub