Fix Renpho ES-30M (QN-Scale) support #1301
Open
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.
I recently got an ES-30M scale and since it wasn't working with openScale decided to do some investigating. The ES-30M scale was connecting but not recording measurements due to incomplete protocol handshake and incorrect frame parsing.
Fixes #986
Problem
The ES-30M scale (advertises as "QN-Scale") was connecting successfully but not
recording measurements. The app showed "step on barefoot" but weight data never
appeared.
Root Cause
before sending weight data
scales
Solution
1. Fixed Protocol Handshake
response)
fixed bytes)
2. Added Format Detection for 0x10 Weight Frames
ES-30M uses a different byte layout:
ES-30M format:
byte[3] = unit (kg/lb)
byte[4] = stable flag (0x00/0x01/0x02)
bytes[5,6] = weight (big-endian)
bytes[7-10] = resistances
Original QN format:
bytes[3,4] = weight (big-endian)
byte[5] = stable flag (0x01)
bytes[6-9] = resistances
Detection logic: If
byte[4] <= 0x02ANDweightScaleFactor == 10.0, useES-30M format.
3. Added Opcode Handlers
Backward Compatibility
Format detection ensures existing QN scales continue working with the original
format. ES-30M is auto-detected based on:
Testing
Technical Details
This is based on BLE traffic capture comparing the official Renpho app (working) vs openScale (not
working). The ES-30M requires a complete handshake sequence before transmitting
weight data.