We have moved at community.getvera.com

Author Topic: New Squeezebox plugin - Request For Comments  (Read 47959 times)

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
New Squeezebox plugin - Request For Comments
« on: February 11, 2012, 03:23:01 pm »
Code: [Select]
UPnP device specification (first draft, should be matched against AV services defined by the UPnP Forum)


Luup Controller:

 State variables:

  UserName (login)
  Password (login)
  Authorize (pref authorize)
  Version (version ?)
  Players (player count ?)
  SyncGroups (syncgroups ?)
  TotalGenres (total genres)
  TotalArtists (total artists)
  TotalAlbums (total albums)
  TotalSongs (total songs)
  Rescan (rescanprogress rescan)
  RescanProgress (rescanprogress)

 Actions:

  Shutdown (shutdown)
  DisplayAll (show line1, line2, duration, brightness, font, centered, charset)
  Rescan
  AbortScan
  WipeCache

 Events:

  ?


Luup child device:

 State variables:

  [device tab 1]
  PlayerID (player id)
  PlayerName (player name)
  PlayerIP (player IP)
  PlayerModel (player model)
  IsPlayer (player isplayer)
  DisplayType (player displaytype)
  CanPoweroff (player canpoweroff)
  SignalStrength (player signalstrength)
  Connected (connected)
  LinesPerScreen (linesperscreen ?)
  Display (display ? ?)
  DisplayNow (displaynow ? ?)
  IREnabled (irenable)

  [device tab 2] 
  Sleep (sleep)
  SyncedWith (sync ?)
  Volume (mixer volume)
  Muted (mixer muting)
  Bass (mixer bass)
  Treble (mixer treble)
  Pitch (mixer pitch)
 
  Cover
  Title (songinfo or title ?)
  Genre (songinfo or genre ?)
  Artist (songinfo or artist ?)
  Album (songinfo or album ?)
  Duration (songinfo or duration ?)
  Year (songinfo)
  Bitrate (songinfo)
  Filesize (songinfo)
  ReplayGain (songinfo)
  AlbumReplayGain (songinfo)
  SampleRate (songinfo) 
  Url (songinfo or path ?)
  Mode (mode ?)

  [device tab 3]
  <playlist variables>

  [device tab 4]
  <alarm variables>

  [device tab 5]
  LOUIS4Vera:
  UIEnabled
  UIRemote
  UIRemoteCommandUp
  UIRemoteCommandDown
  UIRemoteCommandLeft
  UIRemoteCommandRight
  <some more LOUIS4Vera variables>

  [device tab 6]
  <MusicIP variables>

 Actions:
 
  Name (name)
  Sleep (sleep)
  Sync (sync)
  UnSync (sync -)
  PowerOn (power 1)
  PowerOff (power 0)
  Volume (mixer volume) | RenderingControl1:SetVolume
  Mute (mixer muting)
  UnMute (mixer muting)
  Bass (mixer bass)
  Treble (mixer treble)
  Pitch (mixer pitch)
  Display (show line1, line2, duration, brightness, font, centered, charset)
  Button (button)
  SimulateIR (ir)
  IROn (irenable)
  IROff (irenable)
  DisconnectPlayer (connect)
  Forget (client forget)
  CatchPlayer (disconnect)
  SwitchPlayer
  Play (play) | MediaNavigation1:Play
  Stop (stop) | MediaNavigation1:Stop
  Pause (pause) | MediaNavigation1:Pause
  PreviousTrack | MediaNavigation1:Rewind
  NextTrack | MediaNavigation1:QuickSkip
  <playlist actions>
  <alarm actions>
  RandomPlay (randomplay)
  <MusicIP actions>
  <shift player command>

  LOUIS4Vera:
   EnableUI
   DisableUI

  SendIR (remote, command)

  PlayAnnouncement(see SAD, using a file accesible from LMS)

  SynthesizeAnnouncement (using flite)
 
 Events:
 
  NotificationReceived ('catch all')

  more specific:
   Alarm
   PresetButtonPressed (#1-#6) (see SPB)
   IRReceived (remote, command)

 
UI design:

 Luup Controller:

  Dashboard:

   Some information about the LMS (name, version, players, rescan active, some database statistics)

  Device tabs:

   - some information about the scanning process
   - some information about sync groups
   - actions: Shutdown, Rescan, AbortScan, WipeCache


 Luup child devices:

  Dashboad:

   variables: Volume, Muted, Title, Cover
   actions  : play, pause, stop, power on/off, ...

  Device tabs:

   [see above]
 

Remarks:
- Use compound queries (serverstatus, status, displaystatus) as much as possible.
- Evaluate special notifications: client, rescan done, library changed, unknownir, playlist newsong, playlist stop/pause, prefset, alarm


Questions:
- The latest LMS version is said to be accessible via UPnP. Should we use UPnP instead of LMS-CLI to control the LMS?
- Is there a generic way to remotely pipe a WAV file into LMS (see WaveInput plugin for Windows)?
- Are we affected by http://bugs.micasaverde.com/view.php?id=1501 ?
« Last Edit: February 21, 2012, 05:47:29 pm by Ap15e »

Offline cokeman

  • Full Member
  • ***
  • Posts: 119
  • Karma: +2/-0
Sv: New Squeezebox plugin - Request For Comments
« Reply #1 on: February 11, 2012, 03:27:08 pm »
Hi,

Om the  devices gui add power  on and off,  current cover.

Sendt fra min GT-P7500
Vera 3 in the summerhouse, Vera Plus at home
@Denmark

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: New Squeezebox plugin - Request For Comments
« Reply #2 on: February 11, 2012, 03:42:55 pm »
Done.

Offline radarengineer

  • Moderator
  • Sr. Member
  • *****
  • Posts: 402
  • Karma: +4/-0
Re: New Squeezebox plugin - Request For Comments
« Reply #3 on: February 11, 2012, 04:16:00 pm »
@Ap15e, the repository is up at:

http://code.mios.com/trac/mios_squeezebox

I gave you trac and svn permissions. I would think  LMS-CLI would be more reliable than UPnP but I'm not sure.

Offline myhomeserver

  • Hero Member
  • *****
  • Posts: 874
  • Karma: +3/-5
  • http://www.MyZwave.net
Re: New Squeezebox plugin - Request For Comments
« Reply #4 on: February 16, 2012, 11:17:56 am »
Hi Ap15e, love the Squeezbox plugin but recently I am having some problems where I can't control the SB anymore.  I noticed that my SB Connect plugin says "no port" and it seems that it cant connect to the CLI port of 9090

I checked my SB server and everything is working fine. I have 3 players and one server.  I also tried to remove and re-add the SB plugin and still the same error...

any ideas on how I can troubleshoot this????

Thanks for this great plugin, I love it when it was working!

MyZWave.net - See Our Z-Wave product Reviews
(formerly MyHomeServer)

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: New Squeezebox plugin - Request For Comments
« Reply #5 on: February 16, 2012, 11:25:09 am »
telnet <LMS IP address> 9090
to your LMS and type in version ? then press RETURN. You should see the version of your LMS.

Quote
Thanks for this great plugin, I love it when it was working!

The Squeezebox plugin available from the market isn't my work. It was written by javier, a former employee of MCV.

The new plugin would be a major development task, so I cannot do it for free and I'm currently looking for some funding.
« Last Edit: February 16, 2012, 11:30:11 am by Ap15e »

Offline myhomeserver

  • Hero Member
  • *****
  • Posts: 874
  • Karma: +3/-5
  • http://www.MyZwave.net
Re: New Squeezebox plugin - Request For Comments
« Reply #6 on: February 16, 2012, 12:06:13 pm »
Thanks for the info, its 7.7.1

does the old SB plugin not work with the newer LMS?

I'd love to help in any way but funding and coding are not my strong points :) Testing on the other hand would be up my alley.  Thanks for any other help you can provide, I was loving the ability to stop all my Squeezeboxes when I hit the all off command at night before bed...and the ability to start them all from the in-wall scene controller was nice too!


MyZWave.net - See Our Z-Wave product Reviews
(formerly MyHomeServer)

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: New Squeezebox plugin - Request For Comments
« Reply #7 on: February 16, 2012, 12:55:00 pm »
Quote
does the old SB plugin not work with the newer LMS?

By telneting to your LMS you made sure that your CLI is working. Try restarting your LMS and your Vera. If that doesn't help: please complain at MCV ...

Offline radarengineer

  • Moderator
  • Sr. Member
  • *****
  • Posts: 402
  • Karma: +4/-0
Re: New Squeezebox plugin - Request For Comments
« Reply #8 on: February 16, 2012, 11:41:03 pm »
@myhomeserver, Ap15e laid out some very interesting (and ambitious!) plans for a new squeezebox server that I hope he gets a chance to implement.

I am going to do some work on the squeezebox plungin too but I'm just concerned about fixing bugs introduced with the change to UI5 and come incremental improvements, so I am very interested in hearing what is and isn't working for you. Do you think your issues with the plugin have anything to do with UI5?

It should work with 7.7.1. I'm running 7.7.1 on a OSX host with two clients: a squeezebox touch and squeezeplay running on the host. The plugin isn't perfect but it is working for me. I'm going to be moving the code to a different .lua file and adding some more debugging code sometime soon (been pretty swamped recently!) so hopefully that will help.

Offline myhomeserver

  • Hero Member
  • *****
  • Posts: 874
  • Karma: +3/-5
  • http://www.MyZwave.net
Re: New Squeezebox plugin - Request For Comments
« Reply #9 on: February 17, 2012, 02:28:27 pm »
Thanks, Im not sure why its not working, but with the screenshot you can see that it says MISSING PORT on the main SB plugin component.  It detects my three squeezeboxes (duet, classic v3 and radio)

I can telnet into the server at port 9090 and it answers and all my squeezeboxes can play from the server.  I suspect it's something wacky with UI5. I'll submit a support ticket
MyZWave.net - See Our Z-Wave product Reviews
(formerly MyHomeServer)

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: New Squeezebox plugin - Request For Comments
« Reply #10 on: February 17, 2012, 03:28:45 pm »
IIRC, socket connections (as used by MCV's Squeezebox plugin) were broken in earlier UI5 versions.

Offline radarengineer

  • Moderator
  • Sr. Member
  • *****
  • Posts: 402
  • Karma: +4/-0
Re: New Squeezebox plugin - Request For Comments
« Reply #11 on: February 18, 2012, 02:44:13 pm »
I have been making some changes to the code, I'll be uploading them shortly. I have found out that there is an irritating issue with UI5 where 'require' isn't looking for compressed .lua code files even though supposedly support for those has been added. I hear this may be fixed in the private beta.

What this means is that for now you actually have to ssh the .lua file I have been working with into Vera. Because of this I probably will hold off on releasing another app version until this is fixed.

The only thing I have done so far is clean up the code a bit (few minor bug fixes too) and added support for reading names from the squeezebox server. This means that instead of 'player <mac>' you actually have the name you program into the server.

You can do this from some players themselves (squeezeplay and sb touch for instance), or you can do this from a telnet session into the server (and probably other ways too):

Code: [Select]
telnet <server_ip> 9090
And then:

Code: [Select]
<player's mac address> name <your_new_name>

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: New Squeezebox plugin - Request For Comments
« Reply #12 on: February 18, 2012, 02:55:04 pm »
@radarengineer,
If you wanted a truly ugly hack(tm), you could os.execute(...)    using pluto-lzo d on the LZO lib file, and "decompress" it during startup, as a short-term workaround   8)

I had code that was effectively doing that for some .xml files I wanted people to upload.  There are a bunch of them going on in my code here:
    http://code.mios.com/trac/mios_sqblaster/browser/trunk/I_SQBlasterController1.xml

you can also do stuff so that you only do it 'once, ever' per upload of the plugin files..

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: New Squeezebox plugin - Request For Comments
« Reply #13 on: February 19, 2012, 10:15:53 am »

Offline massilia

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: New Squeezebox plugin - Request For Comments
« Reply #14 on: March 05, 2012, 11:17:06 am »
I have this problem me too, i run Logitech Media Server Version : 7.7.1 on synology Nas and vera 2 ui5 latest firmware    1.5.322
Before i run ui4 and it's work very good ?
I can run  cli on telnet on port 9090

Can you update the module please
Thanks  :)

Thanks, Im not sure why its not working, but with the screenshot you can see that it says MISSING PORT on the main SB plugin component.  It detects my three squeezeboxes (duet, classic v3 and radio)

I can telnet into the server at port 9090 and it answers and all my squeezeboxes can play from the server.  I suspect it's something wacky with UI5. I'll submit a support ticket