Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/_components/media_player.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Available services: `turn_on`, `turn_off`, `toggle`, `volume_up`, `volume_down`,

#### {% linkable_title Service `media_player/shuffle_set` %}

Currently only supported on [Spotify](/components/media_player.spotify/), [MPD](/components/media_player.mpd/), [Kodi](/components/media_player.kodi/), and [Universal](/components/media_player.universal/).
Currently only supported on [Spotify](/components/media_player.spotify/), [MPD](/components/media_player.mpd/), [Kodi](/components/media_player.kodi/), [Squeezebox](/components/media_player.squeezebox/) and [Universal](/components/media_player.universal/).

| Service data attribute | Optional | Description |
| ---------------------- | -------- | ---------------------------------------------------- |
Expand Down
22 changes: 22 additions & 0 deletions source/_components/media_player.squeezebox.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,25 @@ Configuration variables:
- **password** (*Optional*): The password, if password protection is enabled.

<p class='note'>This platform now uses the web interface of the Logitech Media Server to send commands. The default port of the web interface is 9000. It is the same port that you use to access the LMS through your web browser. Originally, this platform used the telnet interface, which defaults to 9090. If you previously specified the port in your configuration file, you will likely need to update it.</p>

### {% linkable_title Service `squeezebox_call_method` %}

Call a custom Squeezebox JSONRPC API.

See documentation for this interface on http://HOST:PORT/html/docs/cli-api.html?player= where HOST and PORT are the host name and port for your Logitech Media Server.

| Service data attribute | Optional | Description |
| ---------------------- | -------- | ----------- |
| `entity_id` | no | Name(s) of the Squeezebox entities where to run the API method.
| `command` | no | Command to pass to Logitech Media Server (p0 in the CLI documentation).
| `parameters` | yes | Array of additional parameters to pass to Logitech Media Server (p1, ..., pN in the CLI documentation).

This service can be used to integrate any Squeezebox action to an automation.

It can also be used to target a Squeezebox from IFTT (or DialogFlow, Alexa...).

For example, to play an album from your collection, create an IFTT applet like this:
- Trigger: Google assistant, with sentence: `I want to listen to album $`
- Action: JSON post query with such JSON body:
`{ "entity_id": "media_player.squeezebox_radio", "command": "playlist", "parameters": ["loadtracks", "album.titlesearch={{TextField}}"] }`
This can work with title search and basically any thing. The same wouldn't have worked by calling directly Squeezebox server as IFTT cannot escape the text field.