Author Topic: Squeezebox Server and Vera - Part I: Displaying cover art for the current song  (Read 11965 times)

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
How to display cover art for the current song on the dashboard

Create new camera device(s) for the room(s) equipped with Squeezebox(es)

Configure the new camera device(s):
  • IP address: IP address and port of your Squeezebox Server (<IP address>:<port number>)
  • Path: music/current/cover.jpg?player=<MAC address>
    (replace <MAC address> with the MAC address of the player; IP address should work too)

That's all. See attachment.

To be continued.
« Last Edit: June 01, 2010, 03:03:48 pm by Ap15e »

Offline 325xi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1101
  • Karma: +0/-0
  • V1, V2, still V2...
Incredible!
You made my day

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Nice Hack!

Did you get around the formalizing the request in Bug for this?  I know you'd posted about it a little while ago.

Offline 325xi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1101
  • Karma: +0/-0
  • V1, V2, still V2...
Now you could use camera pan-tilt controls for play-stop-next-prev :)

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Should be doable (ugly hack).

Unfortunately, Vera (at least @UI2) is lacking a flexible UI renderer.

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
@guessed:

I haven't yet found out how to control SBS via json.rpc (would have to dive into the json.rpc Lua code).
A workaround is to use a socket connection.

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
@Ap15e,
my "bug" reference was for the functionality of presenting an Image Device in Vera (the Presentation Layer stuff), as you'd commented when I filed the Bug for a Text component.

Seems like having a few of these "core" UI-centric components would allow us to build a bunch of different stuff, and be supported in the various control points (eg. iVera, Web and SQ Remote) as they're built out.

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
@guessed:

I regard the lack of an adequate GUI toolkit/builder as the main obstacle to the development of more complex Luup plugins.

IMHO it does not help much to request GUI renditions for images and texts. What we need is a full-flexed GUI toolkit/builder (buttons, radio buttons, drop-down menus, images, labels, frames, checkboxes, sliders, ...) and good layout managers.
« Last Edit: May 13, 2010, 05:33:05 pm by Ap15e »

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Agreed, but we don't need "all" the components to get a start.  Vera also tends to model the Data, or Action, component of things, and not really the UI.

Right now, no "model" exists for certain types of data, like Images (URL, Filename or Source/Sink) or the expression of "validator" lists (for 1-of-n or n-of-n Selection controls)

This is why SQRemote, iVera (etc) can all cater for different LnF, Device resolutions (etc) - since Vera isn't dictating the Layout to them, just the behaviors for certain control types (including Slider, Button, and a few Compound controls for Heaters and such)


So I think we should start to ask (formally, in Bug/Enh at http://bugs.micasaverde.com) for some of these to get a feeling for whether they can pull it off or not.

With Text, and Image, we'd go a long way.  Next would likely involve some sort of Selection control ("Pick from a list").  I imagine with those, and the existing ones, you could "build" the UI elements for a fairly reasonable UI to SB, and someone could build the same for AppleTV.

If we prove that can work, I'd believe we had a strong case to go "whole hog" with other component types.

I'd hate for them to go off and spent months trying to build an entire UI framework, only to have us come back and spend months telling them how wrong it is  8)

Offline heggen

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Hi, do you know if this will work with UI3? I tried, but only got an empty image

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
No, I don't know.

Does your internet browser display the image?

Offline heggen

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
No, only a black square


Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
If

http://<SBS IP address>:<SBS port>/music/current/cover.jpg?player=00:04:20:XX:XX:XX

(adjust <SBS IP address>:<SBS port> and MAC address accordingly) does not work, something is wrong with your SBS setup (or cover art for the current song is not available ...).


Offline heggen

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
thx, I forgot to add the port

Offline lostramblin

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Don't know if anyone is still monitoring this thread but...  Does this still function in UI5?

I'm unable to get the album art to display.

Logitech Media Server Version: 7.7.2 - r33893 @ Wed Mar 14 05:47:42 PDT 2012
Hostname: MusicServer
Server IP Address: 192.168.0.5
Server HTTP Port Number: 8000
SqueezeBox IP : 192.168.0.3
Squeezebox Mac Add : 00:04:20:2a:6a:9b

Here's the address I've been trying :
http://192.168.0.5:8000/music/current/cover.jpg?player=00:04:20:2a:6a:9b

Vera isn't able to see it and the link does not work in any browser.   
I can access the web interface through http://192.168.0.5:8000.

Any Ideas what I'm doing wrong?