Add DiFluid Microbalance BLE scale support#3
Open
FabianSperrle wants to merge 2 commits into
Open
Conversation
Adds a DIFLUID scale_type for the DiFluid Microbalance / Microbalance Ti. - Matched by advertised-name prefix MICROBALANCE and data service 000000EE. - Weight read from the cleartext AA01 characteristic; FF01 in the same service is encrypted and is never subscribed to. - Auto-send enabled on connect via DF DF 01 00 01 01 C1 (write-with-response); the Acaia IDENTIFY/NOTIFICATION_REQUEST handshake is skipped and no heartbeat is required. - Sensor frame DF DF 03 00 0D <13B> carries a signed big-endian int32 weight at offset 5, scaled x0.1 g, validated by a sum checksum (NOT XOR). The Func1 echo and Func3/Cmd5 status frames are excluded by the guards. - Tare maps to a single power-button click (DF DF 03 02 01 01 C5); on-scale timer is stubbed (command bytes unverified). Protocol verified via nRF Connect on a real Microbalance 299172 and tested working on hardware via CleverCoffee (2026-05-24). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds the DiFluid Microbalance to the Scale Compatibility table and the roadmap checklist. Auto-tare verified on hardware; timer columns marked not-implemented (command bytes unverified). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4e8acac to
9225ad0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add DiFluid Microbalance BLE scale support
Summary
Adds a new
DIFLUIDscale_typeso the library can read weight from a DiFluid Microbalance (and, by protocol, the Microbalance Ti). It slots into the existing per-type pattern (name match → service discovery → notify parser → tare), so downstream consumers like CleverCoffee need no changes beyond selecting the Bluetooth scale type.Motivation
I ended up with a DiFluid Microbalance — a hand-me-down from a family member who wasn't using it — and wanted to run it as a brew scale, but the library didn't support it. Unlike the existing scales it ships a dual-channel GATT (one encrypted, one cleartext), which is why a naive connection only ever sees ciphertext — this PR documents and handles that.
How it works (protocol)
The Microbalance exposes data service
000000EE-0000-1000-8000-00805F9B34FBwith two characteristics:FF01— encrypted channel (emitsDA DA …ciphertext; ignored)AA01— cleartext channel, notify and write (used here)Both are on by default on current firmware; no DiFluid-server/app handshake is required, so an offline ESP32 can read weight directly.
Flow once connected on
AA01:DF DF 01 00 01 01 C1(Func 1 / Cmd 0 = Auto Send on) — the scale does not stream until asked. No periodic heartbeat is needed afterwards.sum(all preceding bytes) & 0xFF(a byte-sum, not XOR).AA01and are excluded by the parse guards: the Func 1 auto-send echo, and the Func 3 / Cmd 5 device-status frame (pData[3] == 0x05).Tare maps to a single power-button click:
DF DF 03 02 01 01 C5(Func 3 / Cmd 2).Implementation notes
MICROBALANCEplus discovery of service000000EE.IDENTIFY/NOTIFICATION_REQUESThandshake (likeGENERIC) and instead sends the auto-send-enable on connect;heartbeatRequired()staysfalse.AA01characteristic advertises Write-with-response).startTimer/stopTimer/resetTimer) so DiFluid never receives Acaia timer bytes — the timer command bytes aren't verified yet.Testing
az-delivery-devkit-v4, esp32) — build green.Limitations / follow-ups
v4.0.1; may need a rebase ontodevelop.000000DD), discovery would need that UUID added. TheMICROBALANCEname gate already covers its name.Checklist
scale_typefollows the existing discovery/parse/tare structure