Home AMX User Forum NetLinx Modules & Duet Modules

New Module: Squeezecontrol

13»

Comments

  • vining wrote: »
    The VB appliance now ships with a dvd drive so you can also rip dvds in mkv or mp4.

    There's also an audiophile version $$$ http://vortexbox.org/content/141-SOtM-sMS-1000-audiophile-VortexBox

    The VB appliance runs the logitech squeezebox server at that't what the module interfaces with for playing music. For dvds you control a WD, boxee, popcorn, dune, oppo or other streaming appliance.

    The VB can't do Rhapsody for that you need a logitech player.

    Since it doesn't do Rhapsody i've been using a logitech touch with a 2TB usb hard drive and rip using dbPowerAmp. I think Rhapsody is the only app the VB won't do. I canceled the spotify, mog and other apps when i was done testing and now i don't actually recall if the VB did those too or just the touch.

    Thank You for the quick reply, so the VB appliance has the squeezebox server, and so the module interfaces directly for the AMX controller?
  • viningvining Posts: 4,368
    Yep, AMX talks directly to the SB server hosted on the VB appliance. You can do the same thing directly to a Logitech Touch if you start the on board SB server. To start the server on a touch you need at least an SD card inserted or usb drive if you also want to store music. Of course you can get pretty large SD drives now a days. SD drive or usb drive but not both.
  • vining wrote: »
    Yep, AMX talks directly to the SB server hosted on the VB appliance. You can do the same thing directly to a Logitech Touch if you start the on board SB server. To start the server on a touch you need at least an SD card inserted or usb drive if you also want to store music. Of course you can get pretty large SD drives now a days. SD drive or usb drive but not both.

    Awesome Thank you so much.
  • glr-ftiglr-fti Posts: 286
    I have a used Vortexbox in excellent condition if you want one. It is about three years old with very little usage. Used it with the RocketGUI module until their module supported without the need for a server. PM me if you are interested.
  • sphere27sphere27 Posts: 40
    Is there a functional sample for the Squeezebox code on SourceForge

    I know I am repeating something that was mentioned earlier in the the thread but I don't know that it was clear.

    The squeezecontol.axi and squeezecontrol.axs files that are on sourceforge are a starting point for integrating a squeezebox. There's also a touch panel file, but it doesn't have any channel or address numbers in it.

    What's expected is for us to write the UI code to link it all together.

    Am I correct?
  • I got the Module working from this link

    http://sourceforge.net/projects/netlinx-modules/files/

    V1.0 has all the files necessary, and i got it to work on a the Logitech Media Server on my PC, with softsqueeze virtual player. Only thing that doesnt work is the volume control.
  • viningvining Posts: 4,368
    Interesting new device by Fusion Research, 3 and 5 zone players built for integrators.
    http://fusionrd.com/ovation.htm
    It lists Rhapsody but i don't know if that's possible for non Logitech players running SBS.
  • vining wrote: »
    The port may be 9000 not 9001. Maybe the NAS is using that port and kicked you to 9001? I recall having that issue with a VotexBox and when I installed SubSonic it kicked my SS port to 9001. Check your SS > settings > Information > Server HTTP Port Number: 9000 (?).

    Settinting > Advanced > CLI > list the command port which should be 9090.

    Her's my function for the cover art:
    DEFINE_FUNCTION fnFB_SetCoverArtPath(INTEGER iUI_Indx,INTEGER iForce,INTEGER iRemoveArt)
        
         {
         LOCAL_VAR CHAR cSentRMFStr[SS_LEN_URL] ;
         STACK_VAR CHAR cNewRMFStr[SS_LEN_URL] ;
         STACK_VAR INTEGER nForce ;
         STACK_VAR INTEGER nIsApp ;
              
         nForce = iForce ;     
         
         nIsApp  = sSqzBox.sAppStat.nAppType == SS_infoApps ;
           
         //fnDevMod_DeBug("'fnFB_SetCoverArtPath: IS_APP-[ ',itoa(nIsApp),' ], IS_APP_URL-[ "',sSqzBox.sPlaylist[1].cArtworkURL,'" ], FORCE-[ ',itoa(nForce),' ] :DEBUG <',ITOA(__LINE__),'>'") ;
         if(nIsApp)
    	  {
    	  if(LENGTH_STRING(sSqzBox.sPlaylist[1].cArtworkURL))
    	       {
    	       STACK_VAR INTEGER nFBS ;
    	       STACK_VAR CHAR cProtocol[1] ;
    	       STACK_VAR CHAR cFileName[256] ;
    	       
    	       //fnDevMod_DeBug("'fnFB_SetCoverArtPath: artwork_URL-[ "',sSqzBox.sPlaylist[1].cArtworkURL,'" ] :DEBUG <',ITOA(__LINE__),'>'") ;
    	       cFileName = sSqzBox.sPlaylist[1].cArtworkURL ;
    	       if(find_string(cFileName,'http://',1) || find_string(cFileName,'HTTP://',1))
    		    {
    		    cProtocol = '0' ;
    		    }
    	       else if(find_string(cFileName,'ftp://',1) || find_string(cFileName,'FTP://',1))
    		    {
    		    cProtocol = '1' ;
    		    }
    	       if(LENGTH_STRING(cProtocol))
    		    {
    		    cNewRMFStr = "'%P',cProtocol" ;
    		    REMOVE_STRING(cFileName,'://',1) ;
    		    nFBS = find_string(cFileName,'/',1)
    		    if(nFBS)
    			 {
    			 STACK_VAR CHAR cPath[256] ;
    			 
    			 cLstArtHost = "cNewRMFStr,'%H',GET_BUFFER_STRING(cFileName,nFBS-1)" ;
    			 cNewRMFStr = cLstArtHost ;
    			 GET_BUFFER_CHAR(cFileName) ;
    			 
    			 WHILE(find_string(cFileName,'/',1))
    			      {
    			      cPath = "cPath,REMOVE_STRING(cFileName,'/',1)" ;
    			      }
    			 if(length_string(cPath))
    			      {
    			      SET_LENGTH_STRING(cPath,LENGTH_STRING(cPath)-1) ; //remove ending "/"
    			      cNewRMFStr = "cNewRMFStr,'%A',cPath" ;
    			      }
    			 cNewRMFStr = "cNewRMFStr,'%F',cFileName" ;
    			 //fnDevMod_DeBug("'fnFB_SetCoverArtPath: RMF STR-[ "',cNewRMFStr,'" ] :DEBUG <',ITOA(__LINE__),'>'") ;
    			 }
    		    else
    			 {
    			//fnDevMod_DeBug("'fnFB_SetCoverArtPath: BAD URL format, no "/" found artwork_URL-[ "',sSqzBox.sPlaylist[1].cArtworkURL,'" ] :DEBUG <',ITOA(__LINE__),'>'") ;
    			 }
    		    }
    	       else
    		    {
    		    nFBS = find_string(cFileName,'/',1)
    		    if(nFBS)
    			 {
    			 STACK_VAR CHAR cPath[256] ;
    			 
    			 cLstArtHost = "'%P0%H',sSqzBox.sPlayer.cArtHost" ;
    			 WHILE(find_string(cFileName,'/',1))
    			      {
    			      cPath = "cPath,REMOVE_STRING(cFileName,'/',1)" ;
    			      }
    			 if(length_string(cPath))
    			      {
    			      SET_LENGTH_STRING(cPath,LENGTH_STRING(cPath)-1) ; //remove ending "/"
    			      cNewRMFStr = "cNewRMFStr,'%A',cPath" ;
    			      }
    			 cNewRMFStr = "cLstArtHost,'%F',cFileName" ;
    			 //fnDevMod_DeBug("'fnFB_SetCoverArtPath: RMF STR-[ "',cNewRMFStr,'" ] :DEBUG <',ITOA(__LINE__),'>'") ;
    			 }
    		    else
    			 {
    			//fnDevMod_DeBug("'fnFB_SetCoverArtPath: BAD URL format, no "/" found artwork_URL-[ "',sSqzBox.sPlaylist[1].cArtworkURL,'" ] :DEBUG <',ITOA(__LINE__),'>'") ;
    			 }
    		    }
    	       }
    	  else
    	       {
    	       cLstArtHost = "'%P0%H',sSqzBox.sPlayer.cArtHost" ;
    	       cNewRMFStr = "cLstArtHost,'%Amusic/-235991648%Fcover.png'" ;
    	       }
    	  }
         else
    	  {
    	  if(cLstArtHost != sSqzBox.sPlayer.cArtHost)
    	       {
    	       cLstArtHost = "'%P0%H',sSqzBox.sPlayer.cArtHost" ;
    	       cNewRMFStr = cLstArtHost ;
    	       }
    	  if(length_string(sSqzBox.sPlaylist[1].cID) && !iRemoveArt)//length_string(sSqzBox.sPlaylist[1].cTitle) && 
    	       {//http://<server>:<port>/music/<track_id>/cover.jpg
    	       cNewRMFStr = "cNewRMFStr,'%Amusic/',sSqzBox.sPlaylist[1].cID,'%Fcover.jpg'" ;
    	       }
    	  else
    	       {
    	       cNewRMFStr = "cNewRMFStr,'%Amusic/0%Fcover.png'" ;     //music/0            music/current   cover.jpg?player=0.0.0.0
    	       }
    	  }
         if(cSentRMFStr != cNewRMFStr || nForce)
         	  {
    	  nForce = 1 ;//in case it isn't already for the next step
    	  cSentRMFStr = cNewRMFStr ;
    	 //fnDevMod_DeBug("'FB_SetCoverArtPath: UI CMD-[ "^RMF-Cover_Art,',cNewRMFStr,'" ] :DEBUG <',ITOA(__LINE__),'>'") 
    	  fnFB_DoSend_UI_CMD(iUI_Indx,"'^RMF-Cover_Art,',cSentRMFStr") ;
    	  }
    	  
         if(nForce || iRemoveArt)
    	  {
    	 //fnDevMod_DeBug("'FB_SetCoverArtPath: UI CMD-[ "^RFR-Cover_Art" ] :DEBUG <',ITOA(__LINE__),'>'") 
    	  fnFB_DoSend_UI_CMD(iUI_Indx,"'^RFR-Cover_Art'") ;
    	  }
    	  
         RETURN ;
         }
    

    Specifically this section should provide the cover art for files on oyur NAS:
    else
    	  {
    	  if(cLstArtHost != sSqzBox.sPlayer.cArtHost)
    	       {
    	       cLstArtHost = "'%P0%H',sSqzBox.sPlayer.cArtHost" ;
    	       cNewRMFStr = cLstArtHost ;
    	       }
    	  if(length_string(sSqzBox.sPlaylist[1].cID) && !iRemoveArt)//length_string(sSqzBox.sPlaylist[1].cTitle) && 
    	       {//http://<server>:<port>/music/<track_id>/cover.jpg
    	       cNewRMFStr = "cNewRMFStr,'%Amusic/',sSqzBox.sPlaylist[1].cID,'%Fcover.jpg'" ;
    	       }
    	  else
    	       {
    	       cNewRMFStr = "cNewRMFStr,'%Amusic/0%Fcover.png'" ;     //music/0            music/current   cover.jpg?player=0.0.0.0
    	       }
    	  }
    
    If I recall if you don't have a song ID to use you can use the generic "music/0/cover.jpg" for the file path and this will return what the SS is showing as the now playing song.

    I don't recall if Jeff originally used the song ID or if that's something I added to my adapted version.

    Pandora does work with the SS through AMX code but it's not the easiest thing to add into the module. You also need to get a Logitech hardware player to get Rhapsody to work even with RocketGUI (I think), can't just have SS running on something. I just happened to be looking into it today to see what's required and that's my take so far.


    Sorry to quote a long post, but im working on using 2 different servers, and i am having issues with the cover art, and the 2nd server.

    I can get the the cover art just fine on the first server, by using this path on the dynamic image http://192.168.1.82:9000/music/0/cover.jpg.

    since im using a different page for my second server, and my server is different i have to use a different dynamic image so i named cover_art2 and added this path for it
    http://192.168.1.66:9000/music/0/cover.jpg.

    the problem i am seeing is that the module just refreshes cover_art dynamic image when enter the player. i couldnt find the area in the module where the touch panel get refreshed with:

    ^RMF, and ^RFR commands

    thanks
  • John NagyJohn Nagy Posts: 1,734
    You can have your touch panel project manage the frequency of refreshes if you like.
    Go to the DYNAMIC IMAGES tab in the Resource manager, select the dynamic image, and you will see you get to edit the properties including the refresh rate. The dynamic image itself in the panel sets the initial rate, and if the module/code does not alter it with explicit commands, you should be fine.
  • John Nagy wrote: »
    You can have your touch panel project manage the frequency of refreshes if you like.
    Go to the DYNAMIC IMAGES tab in the Resource manager, select the dynamic image, and you will see you get to edit the properties including the refresh rate. The dynamic image itself in the panel sets the initial rate, and if the module/code does not alter it with explicit commands, you should be fine.

    Awesome thank you, that worked like a charm. I also had my paths wrong, the album art path for the current song playing is

    http://192.168.1.82:9000/music/current/cover.jpg.

    you can also have the server stretch the cover image, by changing cover.jpg to cover_300x300.jpg, and it will stretch the image to 300x300.
  • viningvining Posts: 4,368
    Awesome thank you, that worked like a charm. I also had my paths wrong, the album art path for the current song playing is

    http://192.168.1.82:9000/music/current/cover.jpg.

    you can also have the server stretch the cover image, by changing cover.jpg to cover_300x300.jpg, and it will stretch the image to 300x300.
    I believe the default image served is 512x512 but you can pass it any number like JN stated for the server to provide a scaled version of the image it you don't want to use the "scale to fit" feature in TPD4. Also that isn't even an option for multi-state buttons (general or bargraphs) so sending ex: cover_350x350 or cover_800x800 might be the only solution for these types of buttons. The music server will probably also do a better/faster job of scaling and allow the TP to work less. Note that you don't actually need the file extension either but you might as well use it.

    Just using :9000/music/current/cover.jpg will usually work fine on a single stream player but if you have a 3-5 stream box that might not work since the request doesn't go through the socket that the modules uses for coms so you're probably safer using :9000/music/current/cover.jpg and adding the specific player/stream's MAC (note this isn't actually the physical MAC of the device but the virtual MAC you create or is automatically generated for each stream) like: "......../cover.jpg?player=',cMAC". Obviously cMAC is a variable that holds the virtual MAC for the stream/module instance you're connected to.

    I've never done any testing on this but sending the non specifc :9000/music/current/cover.jpg on a multi-stream box (all streams using the same IP:PORT for artwork) would probably just reference what the box considers the #1 stream or player. Unless the MAC is used how else could it know what cover art to supply?

    Also this is another reason to use the actual cover art URL that's provided by Song_Info then you don't need to rely on the box to determine the "current" artwork. So I personally use the URL if provided and if not then I use the "current" with the MAC appended. Then for clearing the cover art I send music/0/cover.jpg which can also be re-sized as required.
Sign In or Register to comment.