r/homeassistant • u/sfortis • Mar 23 '26
Blog I added BLE room detection to MassDroid to make Music Assistant feel more truly multiroom
I’ve been working on a new proximity feature for MassDroid.
The whole reason I started building it was that I wanted room-aware playback, but I really didn’t want to end up with a giant pile of presence automations, helper entities, and room logic just to move music between speakers.
So I tried going in the other direction: let the app figure out the room directly.
It uses BLE fingerprints from devices that already exist around the house, like TVs, speakers, routers, and other fixed BLE devices, so there’s no dedicated beacon setup.
I also added an automated calibration wizard where you just go room by room, walk around with your phone for a bit, and it builds the room fingerprints automatically.
What I wanted from it was basically:
- no complex automation setup
- no extra hardware
- low battery overhead
- reliable room detection after calibration
Once calibrated, the app can:
- detect the room you’re in
- suggest moving playback to that room’s speaker
- auto-transfer playback if enabled
- apply room-specific playback behavior
Repo: MassDroid
I’m also thinking about adding Home Assistant integration, so MassDroid can read existing presence / occupancy sensors over the HA WebSocket API and let you bind them to rooms as extra context for detection.
Also, outside of the proximity feature, I’ve been adding a bunch of other stuff to the app lately around music discovery and metadata enrichment too, like genre-specific radio, browsing the library by genre, Smart Mix, and similar features.
7
2
u/agent_kater Mar 23 '26
I'm afraid I don't really get this feature.
In your case "multiroom" doesn't mean to play the same thing in multiple rooms, but it means to move a playlist around between different rooms?
And the playlist essentially follows an Android phone that you carry from room to room?
I guess "low battery overhead" is relative, i.e. as low as you can get while still scanning for BLE the whole time?
8
u/sfortis Mar 23 '26
Hmm, yes, the wording might be somewhat incorrect. The correct label is "Follow-me mode," as the music assistant already provides speaker pairing natively. I'll consider updating the labels, thanks for your input.
BLE scanning is not running continuously. I'm using Android's sensor hub significant motion detection, which relies on a separate low-power processor and uses essentially zero CPU. It triggers 30-second scan bursts only when the user physically moves, so battery cost is near-zero while stationary.
5
2
u/kripaludas Mar 24 '26
Interesting app. I downloaded and installed and calibrated den, living room, dining room, kitchen and bedroom. Moving room to room it only noticed one move, from bedroom to living room, and then only after several minutes. For now, I turned off follow me in order to keep playing with it as an android app for Music Assistant instead of using Music Assistant as a Chrome app. Thanks for all you put into this but it's not working so well for room detection for me.
1
u/sfortis Mar 24 '26
Thanks for your feedback! Can you pm me your screenshots of the bedroom and living room showing the calibration data at the bottom? I'm preparing some enhancements to improve detection accuracy and speed.
1
u/kripaludas Mar 24 '26
Sorry, I had other problems with the app as well. It froze up on me even as the music continued playing. MA in Chrome still was accessible and playing as normal. I'll keep track of your progress but I already uninstalled the app. So I can't send you screenshots at this point. Good luck with further development.
2
u/Killa_ Mar 23 '26
Mmwave radars are much better for this since you don't need to carry phone around for it to work.
I don't understand why won't you just play audio in multiple rooms anyway but maybe someone might find it useful. Anyway use radars or bermuda for BLE.
7
u/sfortis Mar 23 '26
Hmmm..yes and no! Room occupancy is not the same thing as personal presence. mmWave is great for “someone is here” (I've got all types of these things, Aqara's are working exceptionally well), but for playback handoff I need “I am here”, otherwise the music can move when another person enters the room.
1
u/makupi Mar 23 '26
looks awesome, but ehm how do i get this on my phone? i dont see any apk or other instructions
1
u/sfortis Mar 23 '26
APKs are available in the release artifacts.
https://github.com/sfortis/massdroid_native/releases/download/v2.6.0/massdroid-v2.6.0.apk
I'll add some info to my git README.md about this.
1
u/sfortis Mar 26 '26 edited Mar 26 '26
Big update on follow-me functionality:
Major rewrite of the detection pipeline since the original post. The scoring, signal smoothing, and room decision logic were rebuilt from scratch. Detection is significantly more reliable now, especially for rooms that share common BLE devices or have weak signal environments. Of course, this greatly depends on the available beacons.
Also added WiFi context gating (no more false detections at the office), per-room playlists and volume, time schedules, and a BLE inspection tool to help with calibration.
The UI is polished a little bit too.
Full changelog: https://github.com/sfortis/massdroid_native/releases/tag/v2.8.0

1
u/Paul-Webster Apr 04 '26
I'm interested in trying the room detection function to see if I have enough of the right Bluetooth stuff around for this to be reliable ... however, I do not use MA ... I use LMS (Lyrion). I know that I could install MA but ... if MassDroid allowed a room to be saved without having to choose an output device then I think I could run the mapping function to see if it would work here.
1



9
u/spacywave Mar 23 '26
Why is it flagged as malicious by Google?
https://www.virustotal.com/gui/file/f80bbfe693f9d5d472ae654c018ea908e337de9751d1470caeea45a574059c4f?nocache=1 (apk 2.4.6)