I bought Sonos Move for cheap and I decided to add it in Home Assistant, so I can make it kind of a smart speaker.

Sonos Move is a battery powered speaker

I managed to make it play my music, custom sound effects and Text-To-Speech (TTS) announcements all of that automatically or after some events for example when I enter the room.

Now, I can also monitor the Sonos Move battery and the microphone state in my Home Assistant as well as bunch of other cool stuff

Sonos Move added in Home Assistant

More on that later, because now you may wonder what Sonos Move is and why I bought exactly this speaker and not something else.

Let’s find out together.

Why Sonos Move?

There are a lot Sonos speaker models with different purposes and form factors even IKEA use them but they are adding their strange names as usual (IKEA Symfonisk).

I choose the Sonos Move, because I can use it anywhere, inside or outside. It sounds great, its battery can lasts a long time. I can connect to it using Bluetooth, Wi-Fi or Apple Air Play 2 to play music. Plus, it has an embedded Alexa in it.

Home Assistant Sonos integration is one of the best

But most importantly, I bought Sonos Move,  because I knew that Home Assistant integration is good and because my Camper doesn’t have a good & loud music inside and  the camper Itself is noisy, especially at higher speeds (90km/h haha). I wanted to be able to listen to audio books while I’m traveling and books are usually even quieter than songs. So, I needed sound power and Sonos Move 1 was a perfect fit. 

Why not Sonos Move 2?

I know that there is Sonos Move 2 now but it is far more expensive. These people are crazy. See for yourself if you don’t believe me – Amazon Link

Sonos Move 2 in the official web site

And from my point of view Sonos Move 1 and Move 2 are not that much different.  Move 1 can be found a lot cheaper now and it is a hell of a speaker. If you want to check the current prices of both Move 1 and Move 2 you can use the affiliate links below.

I don’t want to read anymore…

Do you want to watch the whole fun effortlessly on your screen – no problems, check the my YT video

Home Assistant Sonos Integration

Now the fun part – Sonos Move Home Assistant integration. In general it was an easy and straightforward experience. Home Assistant auto discovered my Sonos Move, once I powered it up and once I added it to my Wi-Fi network using the Sonos App (iOS Link & Android Link) on my phone.

Home Assistant Sonos Integration auto discovered

Use Same Network or Do This…

There is one important network requirement here! Most of the time everything will work perfectly and transparently for users who have Home Assistant and Sonos in the same network, but if you are using separate networks, different VLANs and subnets or other network complications – you may have some issues. In such cases for Sonos devices to work well with Home Assistant TCP ports 1400 and 1443 should be opened. If these port are not accessible, there will be slower updates and you will have issues if you want to play Text-to-Speech (TTS) announcements.

Adding Sonos in Home Assistant

To add the Sonos Move (or other Sonos Speaker) in my Home Assistant I just have to go to the Home Assistant Integrations section and configure it with few mouse clicks.

Press "c" button on your keyboard to invoke the commands bar and type "Integrations". Select Navigate Integrations
Press “c” button on your keyboard to invoke the commands bar and type “Integrations”. Select Navigate Integrations

You can use the My Home Assistant Link below to do the same:

https://my.home-assistant.io/redirect/config_flow_start?domain=sonos

As end result, I gained control or remote visibility to the Alarms, Bass, Treble, Loudness, Crossfade, Status Light & Touch Controls represented in Home Assistant as number & switch entities as well as sensors and binary sensors.

Sonos Device Info screen in Home Assistant
Sonos Device Info screen in Home Assistant

Be aware that Status Light & Touch Controls sensors are disabled by default and you have to enable them

Enabling Status Light Sensor

Sonos Alarms in Home Assistant

The Home Assistant Sonos integration brings in a switch for every alarm you set in the Sonos app and they come with several attributes that help to monitor Sonos alarms.

Sonos Battery in Home Assistant

Battery sensors work well for Sonos Move 1 devices using S2 firmware. However, Sonos Move speakers still using S1 firmware might not update as often. So if you have such firmware It is recommended to update it from the Sonos App.

Sonos Move Battery is well visible in Home Assistant

For every speaker with a battery, there’s a sensor showing how much battery is left and another sensor indicating if the speaker is turned on or off. The sensor about the power source tells us if the speaker is currently using external power and what specific source it’s using. 

Sonos Charging Sensor is also available in Home Assistant

Sonos Mic in Home Assistant

The Sonos microphone can’t be turned on or off using Home Assistant. You can only control it by pressing the buttons on the actual Sonos device.

Home Assistant Sonos Integration | Why Sonos Move? 1

but there’s a sensor in Home Assistant that shows if the microphone is currently on or off.

Sonos Move Microphone Sensor in Home Assistant
Sonos Move Microphone Sensor in Home Assistant

What can Sonos Play in Home Assistant?

Sonos can be used as Media Player in Home Assistant and can play different types of media like songs, podcasts, or playlists using the “media_player.play_media” function.

You can use Spotify, Tidal, Plex, or even direct links to songs stored online or locally. Of course, If you want to use music services like Spotify, they need to be set up first in the Sonos app.

Announcements in Home Assistant using Sonos

You can make Sonos to play announcements or audio alerts, like a doorbells and anything you wish, by setting the announce feature to true. 

In the example below the audio file that I want to be played is upload in the Home Assistant built-in webserver which is freely accessible in my Home Network.

Home Assistant www folder must be manually created if it is not available
Home Assistant www folder must be manually created if it is not available

To use the same functionality you just have to upload the file in the homeassistant/www folder, but to refer to it as your Home Assistant IP and Port slash local slash the name of the audio file. These two samples below can be executed from the Home Assistant Developer Tools.

service: media_player.play_media
target:
  entity_id: media_player.sonos_move
data:
  announce: true
  media_content_type: "music"
  media_content_id: "http://10.0.0.5:8123/local/NinjaSound.mp3"
  extra:
    volume: 10

When you use announce, it plays the audio you choose over the current music, lowers the volume for the announcement, and then goes back to the previous volume when it’s done. You can also set a specific volume level for the alert if you want. 

service: media_player.play_media
target:
  entity_id: media_player.sonos_move
data:
  announce: true
  media_content_id: > 
    media-source://tts/google_translate?message="Subscribe To My Newsletter, Please"
  media_content_type: "music"
  extra:
    volume: 30

service: media_player.play_media

And if you read the TTS message in the snipped below here is the link where you can do that – My newsletter

Home Assistant Sonos Automation

Here is one simple demo automation that will make my Sonos Move to play music automatically when presence is detected. I’m using this cheap DIY Presence sensor that I build myself for an automation trigger and this is the full YAML code for the Home Assistant automation.

alias: When someone move start Sonos Move
description: ""
trigger:
  - type: motion
    platform: device
    device_id: 15d49101732949114ddaf6952fe63b52 #change this with yours
    entity_id: a7fdbf18bca5fae36218bc21103d1d92 #change this with yours
    domain: binary_sensor
    for:
      hours: 0
      minutes: 0
      seconds: 0
condition: []
action:
  - service: media_player.play_media
    target:
      entity_id: media_player.sonos_move
    data:
      announce: true
      media_content_type: music
      media_content_id: http://10.0.0.5:8123/local/Robot_City.mp3 #change this with yours
      extra:
        volume: 40
mode: single

What Next?

Now if you’re looking to start or expand your Smart Home, the next thing you should do is to register for my upcoming Home Assistant webinar, it is all free and the registration link is below:

https://automatelike.pro/webinar

Thanks for reading. I’m Kiril and I will see you next week again. Bye


1 Comment

Wagner · 26/12/2023 at 2:21 am

Thanks for the review!
Do you know if it is possible to group Sonos speakers, so you can play the same audio in all speakers belonging to the same group? (Some people call it pairing). Importantly, the audio must be in perfect sync among all speakers, otherwise it would create an annoying effect when the speakers are relatively close to each other.

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *