Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[squeezebox] Add channels for composer, band and conductor tags. #13353

Closed
schup011 opened this issue Sep 3, 2022 · 10 comments · Fixed by #14201
Closed

[squeezebox] Add channels for composer, band and conductor tags. #13353

schup011 opened this issue Sep 3, 2022 · 10 comments · Fixed by #14201
Labels
enhancement An enhancement or new feature for an existing add-on

Comments

@schup011
Copy link

schup011 commented Sep 3, 2022

In the squeezebox add-in, there is only a limited set of tags of the played music piece, such as title, artist, year and so on available as player thing channels.

It would be great to enhance this set by some tags commonly used with classical music pieces, such as:

COMPOSER
BAND
CONDUCTOR

Is it possible to add those?

@schup011 schup011 added the enhancement An enhancement or new feature for an existing add-on label Sep 3, 2022
@mhilbush
Copy link
Contributor

mhilbush commented Sep 5, 2022

If those tags are returned by the LMS in the status message, then it would be pretty straightforward to add new channels for those tags.

To see the status message, and whether or not those tags are included, you would need to enable TRACE level logging.

@schup011
Copy link
Author

schup011 commented Sep 5, 2022

I looked with TRACE level enabled, but unfortunately the status message doesn't contain those tags. I am not familiar with the LMS CLI, so maybe the status message can be configured to display those?

@schup011
Copy link
Author

schup011 commented Sep 5, 2022

OK, I found something. You can configure the status query to contain more (or other?) tags.

This is what I could get (first line my query, from second on the response from the server):

aa:bb:cc:dd:ee:ff status - 1 tags:A
aa%3Abb%3Acc%3Add%3Aee%3Aff status - 1 tags%3AA player_name%3ApiCorePlayer player_connected%3A1 player_ip%3A192.168.x.y%3A39052 power%3A1 signalstrength%3A0 mode%3Aplay time%3A525.891481090546 rate%3A1 duration%3A1644.711 can_seek%3A1 mixer%20volume%3A36 playlist%20repeat%3A0 playlist%20shuffle%3A0 playlist%20mode%3Aoff seq_no%3A0 playlist_cur_index%3A0 playlist_timestamp%3A1662403022.92523 playlist_tracks%3A5 digital_volume_control%3A0 playlist%20index%3A0 id%3A112368 title%3ADas%20Buch%20mit%20den%20sieben%20Siegeln%20-%20Erster%20Teil albumartist%3A%C2%A0 band%3ASymphonieorchester%20und%20Chor%20des%20Bayerischen%20Rundfunks composer%3AFranz%20Schmidt conductor%3AFranz%20Welser-M%C3%B6st trackartist%3AStig%20Andersen%2C%20Ren%C3%A9%20Pape

@schup011
Copy link
Author

schup011 commented Sep 5, 2022

The documentation says that the standard tag configuration is "tags:gald" = genre, artist, album, duration.
Should be sufficient to query "... tags:Agald". The "A" stands for a whole list of all artists such as:
albumartist
trackartist
artist
band
conductor
composer

Each of these artist types can also contain a list of multiple entries, as can be seen in my example above.

@mhilbush
Copy link
Contributor

mhilbush commented Sep 5, 2022

Yeah makes sense. The binding currently sends this.

tags:yagJlNKjc

@schup011
Copy link
Author

schup011 commented Sep 5, 2022

I found the status query in SqueezeBoxServerHandler.java, line 100:

private static final String JSONRPC_STATUS_REQUEST = "{\"id\":1,\"method\":\"slim.request\",\"params\":[\"@@MAC@@\",[\"status\",\"-\",\"tags:yagJlNKjcB\"]]}";

would have to be changed to

private static final String JSONRPC_STATUS_REQUEST = "{\"id\":1,\"method\":\"slim.request\",\"params\":[\"@@MAC@@\",[\"status\",\"-\",\"tags:yagJlNKjcBA\"]]}";

I would request to add channels for:

albumartist
trackartist
band
conductor
composer

@mhilbush
Copy link
Contributor

mhilbush commented Jan 9, 2023

@schup011 Are you interested in trying out a version of the binding that includes channels for those tags?

@schup011
Copy link
Author

Yes, would be happy to, thanks a lot! Could you provide some instructions how to install the new version of the binding?

@mhilbush
Copy link
Contributor

This is the file to download
https://github.com/mhilbush/openhab-binding-releases/blob/master/squeezebox/org.openhab.binding.squeezebox-3.4.2-SNAPSHOT.jar?raw=true

Instructions for installing are here.
https://github.com/mhilbush/openhab-binding-releases/tree/master/squeezebox

Note: The new channels are designated "advanced", so you need to tick the advanced checkbox in the UI to see them.

@schup011
Copy link
Author

It works perfectly. Thank you very much. I tested albumartist, trackartist, composer, conductor, band.
They all display the correct values! Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants