--- title: "Sonos action in a Link’nX scenario: playback, volume and groups" description: "Prepare a Sonos action for a Link’nX scenario: play, pause, volume, mute, groups, optical source or favorite, on one or more Sonos speakers." canonical: https://wiki.can-nx.com/en/guides/link-sonos-action/ language: en product: Link’nX audience: - administrateur - installateur context: "Link’nX web: Actions form, Sonos type, for declared Sonos devices" --- # Sonos action in a Link’nX scenario: playback, volume and groups Context: Link’nX web: Actions form, Sonos type, for declared Sonos devices A Sonos action in Link’nX prepares a command for one or more Sonos speakers: play, pause, track, volume, mute, group, optical source, favorite or URL. A scenario then runs it; saving the action does not run it. Intended for installers and administrators. For a KNX push button to control the speaker directly, without a scenario, use the [Sonos gateway table](https://wiki.can-nx.com/en/guides/link-sonos-gateway/) instead. ## Before you start - The speakers are [declared in Link’nX](https://wiki.can-nx.com/en/guides/link-sonos-device/), in the relevant context. ## Create the action 1. Open **Actions**, click **Add**, then choose **Sonos** in **Select an action type**. 2. Enter **Name**, required and limited to 64 characters. 3. In **Sonos device**, check the devices to control. **Select all** checks or unchecks all the devices offered. Reopen the list to check the names hidden behind **(+N others)**. 4. Choose **Sonos command**, then fill in its parameter, if any, using the table below. 5. Check the devices, the command and its value, then use the **floppy disk at the bottom right**. Wait for **Success!** and find the action in the list. 6. [Add the action to the scenario](https://wiki.can-nx.com/en/guides/link-compose-scenario/), set its order and delay, then save the scenario. Creating the action alone does not add it to any existing scenario. ## Choose the Sonos command | Command | Parameter | Good to know | | --- | --- | --- | | **Start**, **Pause**, **Stop**, **Next track**, **Previous track**, **Mute**, **Unmute** | None | | | **Set volume** | **Command value**: whole number from **0 to 100** | Unmutes the sound before setting the volume | | **Volume +/-** | Whole-number offset from **-100 to 100** | Unmutes the sound; the fictitious example **-5** lowers the volume by five units | | **Group** | None | At least two devices selected; changes their existing groups | | **Ungroup** | None | The selected devices leave their group | | **Play optical** | None | Compatible device and optical source, already configured | | **Play favorite** | Offered favorite | See the [favorites guide](https://wiki.can-nx.com/en/guides/link-sonos-favorites/) | | **Play from URL** | **URL**: full web address, protocol included, of an audio resource, for example an MP3 file | Listen to the result on the targeted speakers | The two volume commands therefore do not keep mute mode. The form does not offer an explicit choice of a group’s coordinator. If this choice or keeping an existing group is needed, have the procedure established with support. Likewise, if the device’s optical compatibility is not established, contact support before preparing **Play optical**. ## Edit an existing action To change the volume of an action, open its name or its pencil, re-enter the desired value and follow the [action change validation](https://wiki.can-nx.com/en/guides/link-action-edit/), in particular the confirmation of the affected scenarios. To switch to a command without a parameter, create a new action with the steps above. Then replace the old action in the relevant scenarios, after checking where they use it. In a scenario’s details, the **Sonos device** list is for viewing the associated devices: choosing a name there does not change the saved recipients. To change them, open the action itself. ## Check the result **Success!** confirms that the action is saved, not the audio result. A run can change the actual playback, volume or groups: check the devices before using the [run commands](https://wiki.can-nx.com/en/guides/link-run/), then listen to the speakers concerned. ## Troubleshooting If the expected command has no effect or if a field remains uncertain, follow the [Sonos troubleshooting guide](https://wiki.can-nx.com/en/guides/link-sonos-help/). If these checks do not resolve it, contact support@can-nx.com with the action name, the devices, the command, its value and the tests carried out.