Skip to content

yunmai.scales.ms104 xiaomihome source fails in 0.4.2 in Docker and HA add-on #24

@ckoc76

Description

@ckoc76

Problem

from: xiaomihome ... fails for my Xiaomi S400 EU scale (yunmai.scales.ms104) with:
load data error: Get "": unsupported protocol scheme ""

The same error happens:

in the Home Assistant add-on
and in Docker on a separate VM
So this does not look like a Home Assistant webhook issue. The destination works. The failure seems to happen while loading data from xiaomihome.

### Environment
SmartScaleConnect version: 0.4.2
Scale model: yunmai.scales.ms104
Scale/app: Xiaomi Home
Regions tested: ru, de
Home Assistant: current version in April 2026
Docker: Docker version 20.10.24+dfsg1
Docker Compose: v2.5.0
Timezone: Europe/Berlin

### What works
Home Assistant destination works
This config successfully sends test data to Home Assistant:

sync_test:
  from:
    Weight: 82.4
    BMI: 24.1
    BodyFat: 18.2
  to: json/latest http://homeassistant.local:8123/api/webhook/REDACTED

Result:

log shows sync_test: OK
Home Assistant receives the webhook
the automation runs correctly
Received payload in Home Assistant:

{
  "Date": "2026-04-06T22:06:06.497965262+02:00",
  "Weight": 82.4,
  "BMI": 24.1,
  "BodyFat": 18.2
}

So to: json/latest http://... works.

What fails

Docker
Docker compose:

services:
  scaleconnect:
    image: alexxit/smartscaleconnect:latest
    container_name: scaleconnect
    restart: unless-stopped
    environment:
      - TZ=Europe/Berlin
    volumes:
      - /root/scaleconnect:/config

Config:

sync_hass:
  from: xiaomihome my_email my_password ru yunmai.scales.ms104
  to: json/latest http://homeassistant.local:8123/api/webhook/REDACTED

Log:

2026/04/06 22:03:17 scaleconnect version 0.4.2
2026/04/06 22:03:17 sync_hass: load data error: Get "": unsupported protocol scheme ""

Same with de region:

2026/04/06 21:43:34 scaleconnect version 0.4.2
2026/04/06 21:43:34 sync_hass: load data error: Get "": unsupported protocol scheme ""
Docker test with CSV instead of webhook
This also fails with the same error:

sync_test:
  from: xiaomihome my_email my_password ru yunmai.scales.ms104
  to: csv /config/test.csv

Result:

same error
no CSV file created
This suggests the problem is in from: xiaomihome ..., not in the destination.

Home Assistant add-on
Tested via hassio.addon_stdin:

action: hassio.addon_stdin
data:
  addon: a889bffc_scaleconnect
  input:
    sync_hass:
      from: "xiaomihome my_email my_password ru yunmai.scales.ms104"
      to: "json/latest http://homeassistant.local:8123/api/webhook/REDACTED"

Result:

same unsupported protocol scheme "" error

Additional note

The README explicitly lists yunmai.scales.ms104 as supported via:

from: xiaomihome {username} {password} ru yunmai.scales.ms104
I also found issue #21, which looks related to Home Assistant/add-on input handling, but in my case the same problem is reproducible in Docker, so it looks broader than only HA add-on parsing.

Also, the Home Assistant custom integration hass-xiaomi-miot is able to handle Xiaomi account security verification / login flow much better in practice. It may be useful as a reference for Xiaomi authentication/session handling:
https://github.com/al-one/hass-xiaomi-miot

Question

Is this a known regression in the xiaomihome source implementation in 0.4.2?

If needed, I can test a debug build or provide additional logs.

All the best,
cK

PS: This may be related to PR #20:
#20

The PR description explicitly mentions:

  • Xiaomi 2FA auth logic
  • "Sync setup fails with unclear 'unsupported protocol scheme' error"

That seems very close to my case with xiaomihome ... yunmai.scales.ms104.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions