# The music follows you (presence sensors, multiroom speakers)

**URL:** <https://community.homey.app/t/the-music-follows-you-presence-sensors-multiroom-speakers/90271>\
**Category:** Ideas & Suggestions\
**Created:** [September 26, 2023, 9:16am UTC](https://community.homey.app/t/the-music-follows-you-presence-sensors-multiroom-speakers/90271 "2023-09-26T09:16:35Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![Ewen\_Le\_guennec](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ewen_le_guennec/32/25503_2.png) [@Ewen\_Le\_guennec](https://community.homey.app/u/Ewen_Le_guennec)\
**Post date:** [October 18, 2023, 10:13am UTC](https://community.homey.app/t/the-music-follows-you-presence-sensors-multiroom-speakers/90271/21 "2023-10-18T10:13:47Z")

</div>

Thanks for your reply  
Sadly i don’t have Sonos devices but have lots of google devices in any room,i have created group speakers in every room and i have to say"transfer music from room to room" every time…i try different flows but no luck…  
Hope Maybe one day Athom will integrate the option "join the group " like Sonos

---

<div class="post-metadata">

**Author:** ![mrPilloft](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mrpilloft/32/87781_2.png) [@mrPilloft](https://community.homey.app/u/mrPilloft)\
**Post date:** [October 18, 2023, 10:20am UTC](https://community.homey.app/t/the-music-follows-you-presence-sensors-multiroom-speakers/90271/22 "2023-10-18T10:20:35Z")

</div>

> [@Ewen\_Le\_guennec](#):
>
> Athom will integrate the option “join the group”…

This functionality is provided by SONOS, not Athom.  
It’s up to Google to develop group joining in their products. 🙂 👍

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [October 23, 2023, 7:52am UTC](https://community.homey.app/t/the-music-follows-you-presence-sensors-multiroom-speakers/90271/23 "2023-10-23T07:52:34Z")

</div>

Hey @mrPilloft ,

Better late than never 😉

I have rewriten my flow into an Advanced Flow for my kitchen sound.  
But this time i made it quite easy.

- The main room is the TV Bar in the living room.
- I have a Boolean(yes/No) Variable to enable the music to follow
- Whenever there is movement in the Kitchen, and the AudioFollowKitchen variable is set to True, and the Kitchen speaker is not yet in the TV Bar Group, it will connect the kitchen into the TV Bar group.
- I already had a timer for the Kitchen for when there is no movement for more than 5 minutes.
- I used that timer to UnGroup the kitchen.

So far, it works perfectly and pretty simple. And i have a button in the Kitchen to toggle the AutoFollow boolean.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/9/09b73994afb8d73ed81e1e373cd48b3a1074fa43.png)  
t

---

<div class="post-metadata">

**Author:** ![mrPilloft](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mrpilloft/32/87781_2.png) [@mrPilloft](https://community.homey.app/u/mrPilloft)\
**Post date:** [October 25, 2023, 12:19pm UTC](https://community.homey.app/t/the-music-follows-you-presence-sensors-multiroom-speakers/90271/24 "2023-10-25T12:19:53Z")

</div>

Thanks **Arie\_J\_Godschalk**. I got inspired and created my own flows and wanted to share my experience with you (spoiler alert: not all good).

Here’s my advanced flow:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/f/df8a6a088bbf024147d3664372de1047ff3cfa5b.png)

1, 2 and 3 are there rooms set up for this . (1) is my office. To get coffee, I need to go through room (2) to get to room (3). The sound follows me a) if something is playing on my “Loftstue” SONOS speaker and b) I’ve set the boolean variable “followAudio” = TRUE (4).

When going into room (2) I check (5) if I didn’t come from room (3) and if I just left room (1). If so (6), I include speaker in room (2) into the group (and set volumes for speakers in room (2) and (3)).

When going into room (3), I check if I come from room (2) (and am not just roaming around in room (3)). If so , I include speaker 3 into the SONOS speaker group.

Finally when I get back to room (1), I check if I just walked through room (2). If i did (7), I wait 5 seconds then remove the two other speakers from the group.

If I just roam around in room (1), I make sure another speaker near room (1) is included in the group.

**PROS:** Sometimes this works. I do not think theres anything (much?) wrong with my logic, but…  
**CONS:** …either my speakers are old (oldest \>11 years) or I have other SONOS related issued, cause very often the speakers are not included into the group. I tested with “…is playing” on some of the speakers and it was really miss’n’hit if it reported back TRUE when it was playing. The simple solution is just blindly to include/remove speakers from the group regardless if something’s playing…

**Added bonus:** When my wife comes home, there’s a flow that sets “followAudio”=FALSE 🙂

**Suggestions?** I’m more than open to suggestions on how to improve my flow or do you know what my SONOS issues are (why sometimes this works, other times not (maybe a topic for a [SONOS forum](https://en.community.sonos.com/)))?

---

<div class="post-metadata">

**Author:** ![Joka](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@Joka](https://community.homey.app/u/Joka)\
**Post date:** [October 25, 2023, 2:43pm UTC](https://community.homey.app/t/the-music-follows-you-presence-sensors-multiroom-speakers/90271/25 "2023-10-25T14:43:59Z")

</div>

My experience is that the Homey Sonos app is rather slow and the commands in the flows and under the cover are processed sequentially. Actions are sometimes lost in the process.

The fastest alternative I know is the node-sonos-http-api from Jishi. It is also available as a Docker container, but I have installed it natively on my Synolgy. It’s not without effort, but you’ll be rewarded with a higher performance and stability. You can also define presets, e.g. any groups with predefined volumes for each player that are activated with ONE http command. Not quite in real time, but almost.

> **[GitHub - jishi/node-sonos-http-api: An HTTP API bridge for Sonos easing...](https://github.com/jishi/node-sonos-http-api)**
>
> An HTTP API bridge for Sonos easing automation. Hostable on any node.js capable device, like a raspberry pi or similar. - GitHub - jishi/node-sonos-http-api: An HTTP API bridge for Sonos easing aut...

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/e/1e58a0dae7ceb6decb09cd7c6e0b3e0c58cd2114.png)

Preset TV.json:

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/f/4fdec3fd9917153c80e569aa1cf7cb85be0d9322.png)

---

<div class="post-metadata">

**Author:** ![mrPilloft](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mrpilloft/32/87781_2.png) [@mrPilloft](https://community.homey.app/u/mrPilloft)\
**Post date:** [October 25, 2023, 7:50pm UTC](https://community.homey.app/t/the-music-follows-you-presence-sensors-multiroom-speakers/90271/26 "2023-10-25T19:50:01Z")

</div>

> [@Joka](#):
>
> Homey Sonos app is rather slow

I’m not satisfied with the response in cards on SONOS devices myself, so this sounds interesting. Do you have a link to an install procedure?

Have a Synology DiskStation DS713+…  
As my speakers are so old, I can only use the SONOS S1 app. Is that of relevance here?

---

<div class="post-metadata">

**Author:** ![Joka](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@Joka](https://community.homey.app/u/Joka)\
**Post date:** [October 26, 2023, 7:16am UTC](https://community.homey.app/t/the-music-follows-you-presence-sensors-multiroom-speakers/90271/27 "2023-10-26T07:16:38Z")

</div>

I also only have older S1 speakers.

To install the node-sonos-http-api on my Synology I used the “Step-by-Step—RPi3-Install-of-Sonos-http-api” from Jishi. It works also for the Synology. Be carefull to avoid storage problems with your Synology do NOT install by mistake the api in the root directory !

## Install natively on Synology

based on:

> **[Step by Step RPi3 Install of Sonos http api](https://github.com/jishi/node-sonos-http-api/wiki/Step-by-Step---RPi3-Install-of-Sonos-http-api)**
>
> An HTTP API bridge for Sonos easing automation. Hostable on any node.js capable device, like a raspberry pi or similar. - jishi/node-sonos-http-api

**1. Package Center**  
git package  
node package (contains npm)

**2. Putty**  
`sudo git clone https://github.com/jishi/node-sonos-http-api.git`  
sudo cp -R node-sonos-http-api /volume1/homes/jk/  
ls (will display files folder)  
cd node-sonos-http-api //The application directory is used to store all local files that are required for the execution of the programme.  
Port auf 6000 umgestellt in settings.js (not absolutely necessary)  
sudo npm install --production // node package manager  
sudo npm start (this will start sonos-http-api service) You should see references to sonos rooms, etc

**3. Set up task for restart**  
pm2 process manager für node  
Install pm2 by running the following commands  
see [Step by Step RPi3 Install of Sonos http api · jishi/node-sonos-http-api Wiki · GitHub](https://github.com/jishi/node-sonos-http-api/wiki/Step-by-Step---RPi3-Install-of-Sonos-http-api)

**4. Stop process + restart**  
ps -aux | grep npm  
kill -9 npm //pm2 automatically restarts the server afterwards

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [November 4, 2023, 7:41am UTC](https://community.homey.app/t/the-music-follows-you-presence-sensors-multiroom-speakers/90271/28 "2023-11-04T07:41:58Z")

</div>

In the Homey Community Store, there is the Sonos Say app, which uses this node-sonos version aswell.

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [November 4, 2023, 7:43am UTC](https://community.homey.app/t/the-music-follows-you-presence-sensors-multiroom-speakers/90271/29 "2023-11-04T07:43:05Z")

</div>

> [@mrPilloft](#):
>
> The simple solution is just blindly to include/remove speakers from the group regardless if something’s playing…

Since the sonos app will not always be aware if music is really playing, i do not check for that. I just include it into the group. If there is no music or sound playing, it will not matter.

[Previous page](https://community.homey.app/t/the-music-follows-you-presence-sensors-multiroom-speakers/90271.md?page=1)
