Control Sonos Remotely (over VPN)



Show first post
This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

56 replies

Userlevel 1
Badge
You realise Sonos is an audio product and won't make anything "look" like something? But hey your course
, your horse.


LOOK LIKE. Its a figure of speech. It's like saying SEEM LIKE. You need to get out more.
Once again, the answer is a remote computer.
I need it because of the following...
My mother who is having memory problems calls me and asks me if I can turn it on for her and put some music for her. When I am home I can do that but not if I am away. It seems simple but it is necessary. I do set it as an alarm clock to play everyday on something that she likes when I am not there but she then has to run it off if she is watching tv or reading. Not a b deal for you and me but for her and her problems it is another phone call and another difficult task for her to perform. I hope Sonos helps...
Hi all, I'm in the IT enterprise mobility industry and this is solvable and pretty easily for an apps dev team. All depends on what's the on wish list and how badly customers want that feature.

1. Enable micro-vpn on Sonos mobile app
2. install remote agent on Sonos device
3. Open random (predefined port) on WiFi Router
4. Control Sonos from anywhere using existing Sonos mobile app.

No need for full VPN and RDP type service or even a PC.

C
After playing with it for a little while I made it work with L2TP IKEv2 VPN setup.

The idea is to get it on the same network as your Sonos devices and make multicast and broadcast work.

You can use:

1) raspberry pi or any linux device you're willing to use as a VPN gateway. Raspberry PI is cheap, small and has no fans
2) StrongSwan software on the server side for L2TP VPN connection. Required plugins: dhcp (for getting an IP address from your home router), farp (for proxying ARP to make it look like device is on the same network) , forecast (for broadcast / multicast forwarding)

To save people some time:

1) You don't have to join the same network but having your controller on a separate network will complicate the setup even more. it doable, though.
2) The most obvious setup - OpenVPN with 'tap' device won't fly. Android doesn't support TAP devices. making it work with TUN device is a nightmare.
3) Sonos controller must be connected to a wifi network to function properly, so you'll have to use public / private wifi or wifi hotspot on some other device in conjunction with VPN

Enjoy your music.
Here's another scenario where remote access for Sonos is desired. I have a rental property that is used for short term rentals. I thought it would be a nice touch to have music playing when our guests arrive. It would be great if I could turn music on shortly before check-in time and even better if the speakers could be triggered by certain actions in the house through IFTTT. We love our Sonos speakers in our primary home, but probably won't spend the money on Sonos speakers in the rental unless, or until, easy remote access controls are available.
Userlevel 7
Badge +22
I just ran into this easily fixable problem as well today. I have a little vpn server at my parents house and even when I'm connected to it, the sonos app won't even try the vpn interface to see that there is indeed sonos on my network. It just tries the wifi adaptor and if's down it gives up. If I turn on wifi in my house, the sonos app will start to find the controller at my own home. As others have mentioned, this could easily be fixed. Probably one line of code.

Best send it to Sonos


Delighted they will be
Sigh.

If I had a nickel for every time . . .
But it's easy! Just one line!

🙂
I have ordered some Sonos speakers for my small business and have been following posts about this extensively. To everyone who asks about why you would need remote control, as a small business owner, I want my Sonos system to play music for the environment of my shop and continue to play when I leave the store. I know this can be done by having a device that always stays at the store but if I can avoid that extra expense and control it remotely, that would be ideal. I also employ a lot of teenagers and leaving a device at the store that they would be able to control isn't something I'd want. Adding official support for this within the Sonos app would be great, as I'm sure I'm not the only business owner using a Sonos system.
Matt5215,

In the case you seem to be describing, the solution that I would consider would be to put a simple NAS on your office network, and allow the music to play from there. No need to add a controller to your PC, you could control it from your mobile device while in the office, and because the mobile device is a controller only, the music would continue to play from your NAS while you were gone. Sure, you wouldn't be able to change anything or turn it off while you weren't there, but it doesn't sound like that's your priority.

Frankly, I'd put it on a separate wifi system, so no one in the shop had access to that wifi signal, so that they couldn't just download and install their own controllers on their phones and connect to your system, but a separate router/wifi system is only around $100?

I get that if you want to start or stop it while not being connected to the wifi is an issue, but at least this would give you music while not being connected. And in fact, as long as you kept the separate wifi (the obverse of a guest wifi) password private, you could be connected to any source that Sonos has access to, and your phone wouldn't need to be attached in that case, either.
Userlevel 7
Badge +23
The new Sonos Cloud API makes this kind of thing (stopping playback remotely) pretty trivial. Starting playback is iffy, but stopping looks simple enough.
I am also wondering the point of it
What is the practical application for this? I don't see why you want to be able to turn on music if you aren't home to listen to it?
For example, I'm out of hose and I want to disable the wakeup alarm......
Since most solutions posted here look to having a remote computer (e.g. Raspberry Pi), I’d consider the most elegant solution to be for the controller to be easily accessed via any browser connecting over the VPN.

This looks like this could be quite an elegant solution to the problem. Might try setting this up in a jail on my FreeNAS box and give it a try...

https://github.com/Villarrealized/sonos-web
That's cool now i have a question as i am using 3rd party vpn services so this will be same for or its only for specific vpn? I am using Ipvanish which is best us vpn serivce provider..
What is the practical application for this? I don't see why you want to be able to turn on music if you aren't home to listen to it?
Userlevel 3
Dog/Cat ... I am also wondering the point of it, apart from pets. IFTTT understandable, Home automation both great ideas, but being able to vpn when I am at work? Burglar deterrent maybe?
What is the practical application for this? I don't see why you want to be able to turn on music if you aren't home to listen to it?

I wouldn't want to turn it ON as much as make sure it is OFF.
Userlevel 7
Badge +22
Seriously I'd worry more about the electric hob or the gas hob.
Userlevel 1
It was left on, volume was loud- need to be able to access to turn off
Userlevel 7
Badge +22
Give your neighbour or even a couple of neighbours a key
1. Get one of the IFTTT modules with an AC outlet
2. Plug Sonos device into said module
3. Shut off module via app on phone while away via internet


No- we didn't have it 'blaring'. We left and babysitter told us it was on, not blaring but loud enough & needing to be turned off. The app is on our phones & couldn't turn it off after we left. Not sure what is so confusing about that

Ah. That makes sense. My question was based on this:

It was left on, volume was loud- need to be able to access to turn off
One possibility would be to connect to a computer in your home via RDP/VNC and control your Sonos system that way. Not ideal, and you'll need the computer running all the time. (Maybe a Raspberry Pi w/Android and the Sonos app? There are VNC servers for Android. Just a thought)