Home of the Squeezebox™ & Transporter® network music players.
Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25
  1. #21
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,835
    Quote Originally Posted by Manul View Post
    How do they do that? I looked at the SlimProto description and could not find any client to server command that could tell the server the client's current volume. Do clients use the CLI as well or did I just overlook something.

    Thanks for the VolumeLock suggestion, I'll give that a look.
    Slimproto description is out of date - you need to look at code. IIRC Transporter had special knob and gave volume levels - all the other just gave vol up or down notifications. IIRC LMS sent a AUDx command to set volume level of hardware

  2. #22
    Thanks to both of you! Looking at the IRBlaster and VolumeLock plugins gave me a lot of ideas. I now seem stuck at creating a simple test plugin that just does some debug logging, but I guess that's a topic for a new thread.

  3. #23
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,835
    Quote Originally Posted by Manul View Post
    Thanks to both of you! Looking at the IRBlaster and VolumeLock plugins gave me a lot of ideas. I now seem stuck at creating a simple test plugin that just does some debug logging, but I guess that's a topic for a new thread.
    Use LMS logging facility for debug logging (see WebUI Settings/Advanced/Logging ). Log messages will be saved in log file and appear on console if LMS server is run from a command line. Don't use "print".

    The entries usually look something like
    Code:
    $log->error("Error level message");
    $log->info("Info level message");
    $log->debug("Debug level message");
    When developing I initially use "$log->error" so message are always output. Once plugin gets stable I change them to "info" and "debug" so that the level can be enabled using WebUI Settings/Advanced/logging.

  4. #24
    Thanks, @bpa, that's what I was trying to get to work but couldn't. Turned out to be a rather trivial oversight that I noticed while writing a post to ask for help and could fix myself. My "plugin" is logging fine now.

    My approach is to go with debug logging from the start and just change the default log level of my category for actual use.

  5. #25
    Senior Member cparker's Avatar
    Join Date
    Oct 2005
    Location
    Hampshire, United Kingdom
    Posts
    598
    Quote Originally Posted by Manul View Post
    How do they do that? I looked at the SlimProto description and could not find any client to server command that could tell the server the client's current volume. Do clients use the CLI as well or did I just overlook something.
    Not sure if this is any help to you but I put some volume fading code into my plugin and used this.. whether its the proper way to do it not sure but it worked

    #Read Volume level of a player
    my $player_volume = Slim::Player::Client::volume($client);


    #Change the volume level of a player $volume_level is between 0 and 100 I think
    $client->execute( [ "mixer", "volume", $volume_level ]);
    www.spicefly.com - ** Spicefly SugarCube ** - A hassle free acoustic journey through your music library using MusicIP. Plus the finest MusicIP installation guides, enhanced MIP Interface and SpyGlass MIP the Windows Automated MusicIP Headless Installer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •