Creating a scene with music playback on a Sonos speaker

Hello,

I want to create a scene in Gladys that triggers several actions when the front door opens, via an Ikea door sensor.
The scene works; the light turns on, there is a 30s pause then the light brightens.
I have Gladys speak via a Sonos speaker, which greets me nicely.
I would now like to add an action to play music on the Sonos speaker.
That’s where I’m stuck.
I added an action to control a device, selected my speaker but it asks me to provide a simple or calculated value and I don’t know what value to enter.
Is there another way to play music on a Sonos speaker in a scene?

Thanks for your help :smiley:

Hi @Rico3564 and welcome to Gladys :slight_smile:

Currently we don’t have this option in Gladys, but it could be a useful feature, so feel free to create a feature request at Demande de fonctionnalités - Gladys Assistant community !

Otherwise, in the meantime you can use Node-RED to fill that gap — run a Node-RED container in Gladys via the official integration:

Then you can create a scene that triggers a scenario in Node-RED; there have already been tutorials on the forum:

1 Like

Hi Pierre-Gilles,

Thanks for your feedback.
I’ll look into Node-RED :wink:
How could I phrase this feature request, playing music via a scene on a Sonos speaker?

In any case, I’m really enjoying Gladys. I had found your assistant at the very beginning but hadn’t found a use case, which is now the case.

So thank you for your project and the work you do :smiley:

1 Like

I think the wording is very good for the feature request :ok_hand:

2 Likes

Great @Rico3564 :slight_smile: Don’t hesitate if you have any questions about Node-RED!

Thanks for the request! I edited the name to make it more concise.

Thanks! It’s always nice to read that :slight_smile:

Good evening,

I’m getting back to this topic.
I’m stuck on deployment in Node-RED.
When I click deploy, the mqtt in node remains on the status Connexion.
I followed one of your YouTube tutorials where you created an MQTT setup with a lamp but I get the

Hi @Rico3564 and best wishes!
I have the same connection issue to my MQTT Docker.
By any chance is it an external MQTT you have? On a port other than 1883?

Hi @mutmut, best wishes to you :tada:
Everything I use comes from Gladys. I don’t have enough knowledge to set up an external MQTT.
I installed it by default.
Could a port conflict occur with another instance?

Good evening

, I had this issue when I wanted to switch to the Node-RED integrated into Gladys. Before I had an external Node-RED and to configure Gladys’s MQTT server I had set localhost and port 1883. When I switched to the Gladys integration I had to replace localhost with the IP address of the mini PC where Gladys is located.
![Capture d’écran (51)|690x387](upload://9XBrIK7ZL3O3iIMMHeX23pVyEY8

it’s possible, you’d need to check.

The service is not started in the list.

However, it indicates that it’s started:

Which one should I believe? ^^

I’d rather go with the screen on the Node-RED side; I don’t think the service status has anything to do with whether the Node-RED container is online or stopped :slight_smile: