{"slug": "why-my-esf-551-scale-kept-disconnecting-from-home-assistant-japan-s-measurement", "title": "Why My ESF-551 Scale Kept Disconnecting from Home Assistant: Japan's Measurement Act", "summary": "A developer traced a Home Assistant BLE integration failure with an Etekcity ESF-551 body scale to Japan's Measurement Act, which bars selling scales that display non-statutory units like pounds and stones, prompting manufacturers to strip the unit-switch feature from Japanese firmware. Using Claude Code, the developer found the integration's unit-write command caused the scale to disconnect after about 0.4 seconds, and a local patch skipping the write restored all 14 sensors. The upstream library shipped v0.8.8 and the Home Assistant integration 0.8.3 the day after the issue was filed, resolving the problem.", "body_md": "I connected an Etekcity ESF-551, a BLE body scale, to Home Assistant, and not a single measurement arrived. I had Claude Code chase the cause, and it ended at Article 9 of Japan's Measurement Act. Units sold in Japan have the unit switch removed because of that law.\n\nI know nothing about firmware or law. What I did was step on the scale and decide what to have it look into next. Without AI, I couldn't have done this investigation.\n\nI used the HACS integration `etekcity_fitness_scale_ble`, which wraps `etekcity_esf551_ble==0.8.4`. Claude Code read the log: it showed the integration connecting, reading the HW/SW versions, writing the unit command `a5220305002b0163a10000` (unit 0, kg), and getting disconnected about 0.4 seconds later. Then it reconnected and did it again. No notification ever came when I stepped on the scale, and every sensor stayed `unavailable`.\n\nIt happened even when the command changed nothing, kg to kg.\n\nI left the narrowing down to it too. Claude Code subscribed to `0000fff1` from another machine with plain `bleak` and left out only the unit write. No disconnect. While I stood on the scale, 22-byte notifications arrived about every 45 ms, around 80 of them.\n\nSo Claude Code wrote a local patch that passes `display_unit=None` and skips the write. All 14 sensors filled in. I had it write the upstream issue too, and filed it ([etekcity_esf551_ble #15](https://github.com/ronnnnnnnnnnnnn/etekcity_esf551_ble/issues/15)).\n\nUp to here it was a story about fixing a library bug.\n\nI had it look for why only the Japanese version lacks a unit switch. The VeSync app has no unit setting, while the US manual has the steps.\n\nPutting the back label next to the US spec showed this was a different market variant, not just a firmware revision. Japanese devices and IoT, again, I thought.\n\n|  | US ESF-551 | The unit I bought in Japan | \n|---|---|---|\n| Capacity | 400 lb / 180 kg | 2–150 kg | \n| Resolution | 0.05 lb / 0.02 kg | 100 g | \n| Radio approval | FCC ID 2AB22-ESF551 | Giteki R 210-252428 | \n| Measurement Act | none | household \"正\" mark | \n\nClaude Code also pulled the Measurement Act from the e-Gov law API and read it. Article 9 forbids selling, or displaying for sale, a measuring instrument marked in non-statutory units. A scale that can show lb or st can't be sold in Japan, so manufacturers drop the unit-switch feature from the Japanese firmware. Weighing myself is neither a transaction nor a certification, so Article 8 doesn't touch the user. Only the seller is bound.\n\nThe Ministry of Economy, Trade and Industry's FY2015 test-purchase report even has a real case: a vendor who didn't know pounds and stones were prohibited was told to seal the device so it couldn't be switched.\n\nWhat I know is why the Japanese version has no unit switch. I can't tell whether the disconnect itself is intended, or just firmware that doesn't know the command and drops the link sloppily. Removing the feature is fine. I just suspect it was removed carelessly. I only have one unit, so I can't say that model identifier 12 in the manufacturer data marks the Japanese variant. For upstream I suggested registering identifier 12 with `display_unit_settable=False` so the write is skipped, and left the call to the maintainer.\n\nAn experiment that sends an unknown opcode to see how it disconnects is still undone.\n\nThe day after I filed the issue, the maintainer replied.\n\nThat's interesting to know about that Japanese regulation. That would explain it I guess, and since the option doesn't even show up in the app that pretty much confirms it I think.\n\nLibrary v0.8.8 and the HA integration 0.8.3 came out the same day. I updated the integration to 0.8.3, removed my local patch, stepped on the scale, and the measurements came through. That was surprisingly fast, and I'm grateful.\n\nSelf-hosting Home Assistant is a chore. But it brings lessons like this one, from a bathroom scale all the way to a statute, and I'm glad I do it.\n\n*This post was written with AI assistance and reviewed by the author.*", "url": "https://wpnews.pro/news/why-my-esf-551-scale-kept-disconnecting-from-home-assistant-japan-s-measurement", "canonical_source": "https://dev.to/kohei_wada/why-my-esf-551-scale-kept-disconnecting-from-home-assistant-japans-measurement-act-4cko", "published_at": "2026-11-01 05:45:02+00:00", "updated_at": "2026-11-01 05:52:38.382711+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "artificial-intelligence"], "entities": ["Etekcity", "Home Assistant", "Claude Code", "Anthropic", "Ministry of Economy, Trade and Industry", "etekcity_esf551_ble"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/why-my-esf-551-scale-kept-disconnecting-from-home-assistant-japan-s-measurement", "markdown": "https://wpnews.pro/news/why-my-esf-551-scale-kept-disconnecting-from-home-assistant-japan-s-measurement.md", "text": "https://wpnews.pro/news/why-my-esf-551-scale-kept-disconnecting-from-home-assistant-japan-s-measurement.txt", "jsonld": "https://wpnews.pro/news/why-my-esf-551-scale-kept-disconnecting-from-home-assistant-japan-s-measurement.jsonld"}}