Skip to content

Add support for Eufy C20#1355

Closed
cvoinf wants to merge 0 commit intooliexdev:masterfrom
cvoinf:master
Closed

Add support for Eufy C20#1355
cvoinf wants to merge 0 commit intooliexdev:masterfrom
cvoinf:master

Conversation

@cvoinf
Copy link
Copy Markdown

@cvoinf cvoinf commented Apr 19, 2026

Addresses issue #1352

@cvoinf
Copy link
Copy Markdown
Author

cvoinf commented Apr 19, 2026

At the moment, weight and heartrate is measured, although the log says, the impedance is transmitted, too.

? 2026-04-20 00:16:03.241 D/openScaleLog: Initial markdown-diff headers written to: /storage/emulated/0/Android/data/com.health.openscale.debug/files/logs/openScale_current_log.txt
? 2026-04-20 00:16:03.257 D/openScaleLog: Initial markdown-diff headers written to: /storage/emulated/0/Android/data/com.health.openscale.debug/files/logs/openScale_current_log.txt
+ 2026-04-20 00:16:03.257 I/openScaleLog: File logging enabled during runtime – started fresh session log.
? 2026-04-20 00:16:31.316 D/BluetoothActionButton: User clicked bluetooth icon connect → trying to connect to saved device Debug
+ 2026-04-20 00:16:31.318 I/BleConnector: Attempting to connect to Debug
? 2026-04-20 00:16:31.319 D/BleConnector: Switching to new device: Releasing active communicator: null
? 2026-04-20 00:16:31.319 D/BleConnector: Switching to new device: Active communicator released and set to null.
? 2026-04-20 00:16:31.320 D/ScaleHandlerFactory: createCommunicator: Searching for communicator for 'Debug' (BC:0F:B7:02:31:9D). Handler hint: 'Eufy C20 (T9130)'
+ 2026-04-20 00:16:31.321 I/ScaleHandlerFactory: Modern handler 'Eufy C20 (T9130)' supports 'Debug'.
+ 2026-04-20 00:16:31.327 I/ScaleHandlerFactory: Modern communicator 'BroadcastScaleAdapter' created for 'Debug' with linkMode=BROADCAST_ONLY.
+ 2026-04-20 00:16:31.328 I/BleConnector: ActiveCommunicator successfully created: BroadcastScaleAdapter. Starting observation job...
? 2026-04-20 00:16:31.329 D/BleConnector: Adapter isConnected: false for Debug (Status: CONNECTING)
+ 2026-04-20 00:16:31.330 I/BleConnector: Adapter no longer reports connected for Debug. Current status: CONNECTING. Expecting Disconnected Event.
? 2026-04-20 00:16:31.334 D/EufyC20: attach()
? 2026-04-20 00:16:31.343 D/BleConnector: BluetoothEvent received: Listening(deviceAddress=BC:0F:B7:02:31:9D) for Debug
+ 2026-04-20 00:16:31.343 I/BleConnector: Event: Listening for broadcasts from BC:0F:B7:02:31:9D
? 2026-04-20 00:16:31.349 D/BroadcastScaleAdapter: Broadcast scan started (attempt 1/3) for BC:0F:B7:02:31:9D
? 2026-04-20 00:16:31.424 D/BroadcastScaleAdapter: Discovered advertisement from BC:0F:B7:02:31:9D RSSI=-48 payload=[02 01 06 1B FF 64 BC 0F B7 02 31 9D 00 40 54 E5 69 65 00 22 1F 00 00 00 …(+19b)]
? 2026-04-20 00:16:31.426 D/BroadcastScaleAdapter: Forwarding advertisement to handler: BC:0F:B7:02:31:9D RSSI=-48 payload=[02 01 06 1B FF 64 BC 0F B7 02 31 9D 00 40 54 E5 69 65 00 22 1F 00 00 00 …(+19b)]
+ 2026-04-20 00:16:31.434 I/EufyC20: Eufy C20 final: weight=79.7 kg hr=0 imp=464.6
+ 2026-04-20 00:16:31.434 I/EufyC20: ← publish measurement to app
? 2026-04-20 00:16:31.436 D/BleConnector: BluetoothEvent received: MeasurementReceived(measurement=ScaleMeasurement(userId=255, dateTime=null, weight=79.7, fat=0.0, water=0.0, muscle=0.0, visceralFat=0.0, bone=0.0, lbm=0.0, bmr=0.0, heartRate=0, impedance=464.6), deviceAddress=BC:0F:B7:02:31:9D) for Debug
+ 2026-04-20 00:16:31.437 I/BleConnector: Event: Measurement received from Debug: Weight 79.7
+ 2026-04-20 00:16:31.437 I/BleConnector: (Debug): Saving measurement for App User ID 1.
? 2026-04-20 00:16:31.438 D/BroadcastScaleAdapter: Handler returned CONSUMED_STOP for BC:0F:B7:02:31:9D
? 2026-04-20 00:16:31.439 D/BroadcastScaleAdapter: Measurement stabilized → BroadcastComplete for BC:0F:B7:02:31:9D
Screenshot_20260420-003848_openScale

@cvoinf
Copy link
Copy Markdown
Author

cvoinf commented Apr 20, 2026

impedance is still seldomly transmitted and if transmitted, not analysed.
openScale_current_log (3).txt

@cvoinf
Copy link
Copy Markdown
Author

cvoinf commented Apr 20, 2026

Could it be that openscale doesn‘t read the impedance?
Perhaps we have to use these algorythms: https://github.com/dckiller51/bodymiscale/blob/main/custom_components/bodymiscale/metrics/impedance.py

Bodymiscale uses Xiaomi (Legacy 2017) formulas to derive metrics.
Legacy Mode: Uses the original 2017 formulas (ideal for historical consistency).
Scientific Mode: A new, more precise calculation mode for BMR and Body Composition, specifically tuned for active profiles.

@cvoinf
Copy link
Copy Markdown
Author

cvoinf commented Apr 21, 2026

Ah, I found exactly these formulas in com.health.openscale.core.bluetooth.libs.MiScaleLib. Now I added ScaleMeasurement as in MiScaleS400Handler, and everything works as expected.

@cvoinf
Copy link
Copy Markdown
Author

cvoinf commented Apr 21, 2026

Transmission is only sometimes possible. It seems the time between first handshake and heatrate-measurement has to be as small as possible. Thus if openscale is opened when the measurement of the heartrate starts results in successful transmission most of the time (set auto-connection of scale to true)

Any ideas?

Screenshot_20260422-010605_openScale

implemented = setOf(
DeviceCapability.LIVE_WEIGHT_STREAM,
DeviceCapability.BODY_COMPOSITION
),
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could add here a parameter tuningProfile where you can set a pre-config BLE tuning profile or you can even set a custom profile with your scale specific settings, see ModernScaleAdapter what you can set.

@oliexdev
Copy link
Copy Markdown
Owner

Thanks for your PR 👍
You could add a BLE tuningProfile where you can set a pre-config tuning profile or you can even set a custom profile with your scale specific settings, see ModernScaleAdapter which parameter can be set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants