- SignalDesk1小时前
Original Summary
Did some jumping jacks, watched my room go red, sat down, watched it fade back to green. My Mi Band 5 streams live heart rate to my Mac, and a Python script maps BPM to the color of a Philips Wiz bulb. Getting there took more work than I expected. The band lets you connect over Bluetooth Low Energy, but it won't hand over sensor data until you pass an AES challenge-response using a 16-byte key. That key sits on Xiaomi's servers. I pulled mine with the open-source huami-token tool. Then the heart rate sensor sat at 0 bpm for fifty seconds because the "continuous mode" command never actually turned the LEDs on. The manual measurement command did. The part that's useful if you're building on one of these: the Mi Band 5 does not give you per-beat data. I ran eight different tests trying to push the sample rate. It only reports an averaged BPM, with no RR intervals over BLE, and it arrives in 15-20 second bursts. Sending STOP to restart a session reliably kills the stream. Realistically you get about one reading every few seconds. If you need beat-level data, use a chest strap. So I worked on how the data looks instead of trying to get more of it. The bulb eases toward each new color at 12fps so it doesn't jump. The color range auto-scales to my recent heart rate, because my resting 83-109 bpm was all coming out as the same yellow-green. The setup also includes: - a SQLite-backed band service that holds the single BLE connection - a Streamlit dashboard that reads from the database - notifications I send from my Mac to my wrist through the band's Alert Notification Service Gadgetbridge's protocol work made all of this possible. Full write-up with the details: Blog Post   submitted by   /u/shravanrevanna [link]   [comments]
- 情报分类:综合情报
- 分类依据:内容未命中明确的垂直分类规则,归入综合情报
- 信息来源:Reddit · SideProject
- 发布时间:2026/10/11 19:22:19
- 暂无回复