Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
> squeezy -pcp3l -play playlist://clear Initial CLI testing has been successful. I will incorporate it into the cronjob. Thank you, -- Logitech Media Server Version: 7.9.1 - 1498799744 @ Fri Jun 30 05:45:05 UTC 2017 OS: Debian - EN - utf8 Platform: i686-linux Perl Version: 5.24.1 - i686-linux-gnu-thread-multi-64int Database Version: DBD::SQLite 1.34_01 (sqlite 3.7.7.1) Total Players Recognized: 4 Squeezebox3: Firmware: 137 Duet: (2 receivers, 1 controller) Firmware: 77 Boom Firmware: 57 -- teeitup's Profile: http://forums.slimdevices.com/member.php?userid=14402 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
For me this works: Code: $ squeezy -pcp3l -play playlist://clear keys on reference is experimental at /usr/local/bin/squeezy line 812. pcp3l selected pcp3l genre pcp3l artist pcp3l album pcp3l title pcp3l duration pcp3l time 0 pcp3l remote pcp3l current_title pcp3l path However I have slightly modified (uncommented) stuff in squeezy.pl around line 812. Does it work for you as is? 3 SB 3 Libratone Loop, Zipp Mini iPeng (iPhone + iPad) LMS 7.9 (linux) with plugins: CD Player, WaveInput, Triode's BBC iPlayer by bpa IRBlaster by Gwendesign (Felix) Server Power Control by Gordon Harris Smart Mix, Music Walk With Me, What Was That Tune? by Michael Herger PowerSave by Jason Holtzapple Song Info, Song Lyrics by Erland Isaksson AirPlay Bridge by philippe_44 WeatherTime by Martin Rehfeld Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins. epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
I have had a lot of fun configuring my system withe various cron jobs, aliases, and shortcuts. With the help of posts to this thread I've been able to automate continuous random play (my favorite mode), radio station for morning wake up, and even my wife's Pandora station for evening play. The only function I haven't been able to figure out is clearing the playlist. Removing an individual track is easy but clearing the playlist has proved to be elusive. Shutting off the players works but is clumsy when there are multiple players in a sync group. Any ideas? Thanks, -- Logitech Media Server Version: 7.9.1 - 1498799744 @ Fri Jun 30 05:45:05 UTC 2017 OS: Debian - EN - utf8 Platform: i686-linux Perl Version: 5.24.1 - i686-linux-gnu-thread-multi-64int Database Version: DBD::SQLite 1.34_01 (sqlite 3.7.7.1) Total Players Recognized: 4 Squeezebox3: Firmware: 137 Duet: (2 receivers, 1 controller) Firmware: 77 Boom Firmware: 57 -- teeitup's Profile: http://forums.slimdevices.com/member.php?userid=14402 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
So here is the crontab I plan to use in the morning. The idea is to "reboot" the audio setup every morning: redefine sync groups, possibly reset volume, and start playing. I found the group concept in Squeezy very handy to rebuild sync groups. With one Squeezy group per "zone" where players should play in sync, the Squeezy config file offers the reference setup, and then LMS sync groups are built with what players are effectively online that morning. There is a mix of long and fast actions, so the bash script is made of multiple loops among the different zones. It's an eyesore so here are the key statements, in "pseudo-code" (which it is, really...) Code: # Runs as a cron job once a day # Work on these groups as per squeezy.conf SQUEEZY_GROUPS=( 0 1 ) # What will each group play? GROUP_PROGS=( 'randomplay://tracks' 'playlistplay://LFS3' ) for G in "${SQUEEZY_GROUPS[@]}"; do # Get players configured in Squeezy for the group DATA=$("${SQUEEZY}" -group "$(( G ))" -power 2>/dev/null) # Grab the name of the 1st player in this group actually alive - 'power ?' # means squeezy has a player configured that does not exist in LMS. mapfile -t LEADER < <(echo "${DATA}" | grep -m 1 -v "power ?" | awk '{print $1}') # Names of all online players in the Squeezy group (incl. the leader) mapfile -t FOLLOWERS < <(echo "${DATA}" | grep -v "power ?" | awk '{print $1}') # Sleep all players - We need to reconfigure the group DELAY=2 # in minutes "${SQUEEZY}" -silent -group "$(( G ))" -sleep "$(( DELAY ))" done # Now we wait for players to have fade-out sleep $(( DELAY * 60 )) for G in "${SQUEEZY_GROUPS[@]}"; do # Assert power off just in case "${SQUEEZY}" -silent -group "$(( G ))" -off # Break sync among players "${SQUEEZY}" -silent -group "$(( G ))" -unsync # With this, players in the group are ready to play 'nothing' "${SQUEEZY}" -silent -group "$(( G ))" -play "playlistplay://clear" # Power on players in group. Now they are all on, in stop mode; with Squeezy "on" means "on+play" "${SQUEEZY}" -group "$(( G ))" -silent -on # Grab the lead player and resync it with all the others available in the group for P in ${FOLLOWERS[$G]}; do [[ "${P}" == "${LEADER[$G]}" ]] && continue "${SQUEEZY}" -silent -"${LEADER[$G]}" -sync "${P}" done # Set our leader on the chosen program. All synced players will follow. "${SQUEEZY}" -silent -"${LEADER[$G]}" -json "playlist add ${GROUP_PROGS[$(( G ))]}" done for G in "${SQUEEZY_GROUPS[@]}"; do # Start our leaders - Fade-in max is 119 secs apparently. FADEIN=119 "${SQUEEZY}" -silent -"${LEADER[$G]}" -json "play $(( FADEIN ))" done (The actual code has to "eval" the JSON statements, because there is need to interpolate variables and also pass quotes literally. Urgh.) The config file that goes with it looks like this, players-wise: Code: playerdiscover no # Group 0: Zone #1 player 0 pcp1R 192.168.1.150 b8:27:eb:01:01:01 player 0 pcp2R 192.168.1.151 b8:27:eb:02:02:02 player 0 pcp3R 192.168.1.152 b8:27:eb:03:03:03 # Group 1: Zone #2 player 1 pcp1L 192.168.1.153 b8:27:eb:05:05:05 player 1 pcp2L 192.168.1.154 b8:27:eb:06:06:06 # Group 2: elsewhere player 2 Berlin-Boombox 192.168.1.155 02:02:02:43:ef:99 I've run the actual code and it does produce smooth take-off of the sync groups. 3 SB 3 Libratone Loop, Zipp Mini iPeng (iPhone + iPad) LMS 7.9 (linux) with plugins: CD Player, WaveInput, Triode's BBC iPlayer by bpa IRBlaster by Gwendesign (Felix) Server Power Control by Gordon Harris Smart Mix, Music Walk With Me, What Was That Tune? by Michael Herger PowerSave by Jason Holtzapple Song Info, Song Lyrics by Erland Isaksson AirPlay Bridge by philippe_44 WeatherTime by Martin Rehfeld Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins. epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
pssc wrote: > I will dig out my dev kit. Very cool. I will soon post the crons I plan on using end and beginning of the day, horrible shell script but I think you'll have a view of what I am (was) after. Right now the machine is powered off. Me too... 3 SB 3 Libratone Loop, Zipp Mini iPeng (iPhone + iPad) LMS 7.9 (linux) with plugins: CD Player, WaveInput, Triode's BBC iPlayer by bpa IRBlaster by Gwendesign (Felix) Server Power Control by Gordon Harris Smart Mix, Music Walk With Me, What Was That Tune? by Michael Herger PowerSave by Jason Holtzapple Song Info, Song Lyrics by Erland Isaksson AirPlay Bridge by philippe_44 WeatherTime by Martin Rehfeld Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins. epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
Hi, Thanks for the patches and info, I would think pid not being defined is an artifact of no player discovery, it should probably be populated if missing before certain commands, >From memory the sync command is one of the few that requires a player id and will not take a name(server end). The smooth take off for sync groups we can also look at, The wake option is probably only a minor tweak. I will dig out my dev kit. Phill. epoch1970 wrote: > Hey thanks for Squeezy! > I was ready to dig out one of my old perl scripts and painfully process > the JSON commands I needed, but I had the good idea to check out what > squeezy was about, and it's great. > It has helped me a lot. > > I wanted (among other things) to reset a group of players and start them > as a syncgroup via a crontab. Yes, alarms can do sort-of-that, but a > script is better in my case. > I am not using discovery at all in squeezy.conf, neither for server nor > players. I found out that "-sync" wasn't working in this case > (player->{$pid} is not created at startup). Here is my patch (against > squeezy current, AFAIK): > Code: > > diff ./squeezy /home/admin/squeezy-master/squeezy > 309,310d308 > < #JPM > < if ( $#arg == 4 ) { push @{$group[$arg[1]]}, { name=>$arg[2], pid=>$arg[4] }; next; }; > > > In addition, a config file must look like this :> Code: > > grep '^player' /usr/local/bin/squeezy.conf > playerdiscover no > player 0 zipp 192.168.1.161 aa:aa:b5:31:46:62 > player 0 Berlin-Boombox 192.168.1.161 02:02:02:43:ef:99 > ... > > > > Other things I missed: > > > > - Player "on" without actually starting: in the syncgroup if the > leader starts and only after the other players are started, there is > a bit of rebuffering. I worked my way around by setting all players > in the group to "-play playlistplay://clear" and then starting them. > Last, I load my chosen lead player with an actual playlist and the > group takes off gently. - FadeInSecs parameter in playlistplay: there is a "-sleep" command > that fades out, I would have liked a "-wakeup" equivalent. I tried > hacking another version of "-play" to handle something like > "-fadein_play randomplay://tracks 120" but only got back "squeezy > error: unknown argument (120)" and left it at that.> > > > Again, thanks a lot for this utility. It works great and offers a > great balance of simplicity vs. features. > > EDIT. I can achieve fade-in with the stock functions " squeezy -zipp > -json 'playlist play randomplay://tracks Program 60' " -- Great! pssc's Profile: http://forums.slimdevices.com/member.php?userid=5644 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
Hey thanks for Squeezy! I was ready to dig out one of my old perl scripts and painfully process the JSON commands I needed, but I had the good idea to check out what squeezy was about, and it's great. It has helped me a lot. I wanted (among other things) to reset a group of players and start them as a syncgroup via a crontab. Yes, alarms can do sort-of-that, but a script is better in my case. I am not using discovery at all in squeezy.conf, neither for server nor players. I found out that "-sync" wasn't working in this case (player->{$pid} is not created at startup). Here is my patch (against squeezy current, AFAIK): Code: diff ./squeezy /home/admin/squeezy-master/squeezy 309,310d308 < #JPM < if ( $#arg == 4 ) { push @{$group[$arg[1]]}, { name=>$arg[2], pid=>$arg[4] }; next; }; In addition, a config file must look like this : Code: grep '^player' /usr/local/bin/squeezy.conf playerdiscover no player 0 zipp 192.168.1.161 aa:aa:b5:31:46:62 player 0 Berlin-Boombox 192.168.1.161 02:02:02:43:ef:99 ... Other things I missed: - Player "on" without actually starting: in the syncgroup if the leader starts and only after the other players are started, there is of rebuffering at start. I worked my way around by setting all players in the group to "-play 'playlistplay://clear'" and then starting them. Last, I load my chosen lead player with an actual playlist and the group takes off nicely. - FadeInSecs parameter in playlistplay: there is a "-sleep" command that fades out, I would have liked a "-wakeup" equivalent. I tried hacking another version of "-play" to handle something like "-fadein_play randomplay://tracks 120" but only got back "squeezy error: unknown argument (120)" and left it at that. Again, thanks a lot for this utility. It works great and offers a great balance of simplicity vs. features. 3 SB 3 Libratone Loop, Zipp Mini iPeng (iPhone + iPad) LMS 7.9 (linux) with plugins: CD Player, WaveInput, Triode's BBC iPlayer by bpa IRBlaster by Gwendesign (Felix) Server Power Control by Gordon Harris Smart Mix, Music Walk With Me, What Was That Tune? by Michael Herger PowerSave by Jason Holtzapple Song Info, Song Lyrics by Erland Isaksson AirPlay Bridge by philippe_44 WeatherTime by Martin Rehfeld Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins. epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
Errik128 wrote: > how to get from the player volume level in Tasker variable > > I can change volume, and create tasker shortcuts on phone desktop > http://192.168.1.36:9000/ > p0=mixer > p1=volume > p2=+5 > player=%PLAYER Code: '-volume' => { help=> "set the player's volume (absolute or relative, use \'?\' to query the current volume)", do_shift => 1, command => sub { my $vol = shift; if ( $vol ne '?' ) { if ( ! ( $vol =~ m/^[+-]?[0-9]{1,}$/ ) ) { die "squeezy -volume: invalid volume specifier ($vol)\n"; } if ( 100 < $vol || $vol < -100) { die "squeezy -volume: invalid volume specifier ($vol, should be min/max 100)\n"; } send_command urlencode($player)." mixer volume $vol"; } report 'volume', pick_field 3, send_command urlencode($player)." mixer volume ?"; } }, Does your '+' need to be encoded? , I just send the delta. For a volume query p2 blank or '?' ? Phill. pssc's Profile: http://forums.slimdevices.com/member.php?userid=5644 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
https://github.com/pssc/squeezy/releases/tag/0.26 Bug fix release to handle resetting not properly after an -if_ clause Also more explicitly useful help for missing dependences pssc's Profile: http://forums.slimdevices.com/member.php?userid=5644 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
britcowboy wrote: Solved the problem, cheers! Out of interest what does that do? Because it did seem to work fine without it. Something to do with JSON parsing/serialisation? Thanks It's currently used in the discovery phase, and for sending custom commands.So not essential unless you have a squeeze server on a non standard port in witch case auto discovery would fail. Hence why it just moans about it , moving forward more commands will be using this as not everything is mapped to the cli. Phill. pssc's Profile: http://forums.slimdevices.com/member.php?userid=5644 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
Solved the problem, cheers! Out of interest what does that do? Because it did seem to work fine without it. Something to do with JSON parsing/serialisation? Thanks britcowboy's Profile: http://forums.slimdevices.com/member.php?userid=63049 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
Hi, Great app :) it's not major as everything seems to work without it (although it's just spammy!) but I'm getting JSON features not supported: JSON::RPC::(Legacy::)Client not available... Trying to cope. at /Users/tv/Scripts/squeezy/squeezy line 122. on a OS X machine. I'm not sure how I fix it though? Thanks britcowboy's Profile: http://forums.slimdevices.com/member.php?userid=63049 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
squeezy - a command-line wrapper around the squeezeserver telnet/CLI https://github.com/pssc/squeezy/releases/tag/0.25 New:- Skip action for -if_XXX options. Fixes:- Fix for later versions of JSON::RPC Fixes for bash completion and verboseness Fixes to reporting to player name rather than player id pssc's Profile: http://forums.slimdevices.com/member.php?userid=5644 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
rcampbel3 wrote: Something changed... I was running 0.21 or .22 for some time. Did a git pull and updated. Now it's complaining about libjson-rpc-perl not being installed. I'm using the native distro package and have even reinstalled it. rcampbel@Godzilla~/project/squeezy $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.1 LTS Release: 14.04 Codename: trusty rcampbel@Godzilla~/project/squeezy $ git pull Already up-to-date. rcampbel@Godzilla~/project/squeezy $ ./squeezy Install JSON support: sudo apt-get install libjson-rpc-perl at ./squeezy line 113. JSON features not supported: JSON::RPC::Client not available... Trying to cope. at ./squeezy line 115. rcampbel@Godzilla~/project/squeezy $ sudo apt-get install libjson-rpc-perl Reading package lists... Done Building dependency tree Reading state information... Done libjson-rpc-perl is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Then I looked above line 113 in squeezy... return 1 if defined $INC{'JSON/RPC/Client.pm'}; so, I ran 'locate Client.pm' rcampbel@Godzilla~/project/squeezy $ locate Client.pm /usr/lib/perl5/SVN/Client.pm /usr/share/perl/5.18.2/CPAN/HTTP/Client.pm /usr/share/perl5/JSON/RPC/Legacy/Client.pm-- aha!! /usr/share/perl5/RPC/PlClient.pm So, I hacked... and added in Legacy in all the right places, and it appears to work. rcampbel@Godzilla~/project/squeezy $ diff /usr/local/bin/squeezy squeezy 58c58 my $module = JSON::RPC::Legacy::Client; --- my $module = JSON::RPC::Client; 105c105 return 1 if defined $INC{'JSON/RPC/Legacy/Client.pm'}; --- return 1 if defined $INC{'JSON/RPC/Client.pm'}; 108,109c108,109 require JSON::RPC::Legacy::Client; JSON::RPC::Legacy::Client-import(); --- require JSON::RPC::Client; JSON::RPC::Client-import(); 240c240 my $client = $server-{JSONC} ? $server-{JSONC} : new JSON::RPC::Legacy::Client; --- my $client = $server-{JSONC} ? $server-{JSONC} : new JSON::RPC::Client; I don't quite know the best way to submit this as a patch that will work for both cases - otherwise I would have simply submitted a merge request in github. Hope this helps someone else out :) Hi yeah it looks like a new version of JSON-RPC rather than a change in squeezy, they have moved the modules about breaking squeey, I will work up a new release today to address this if you wouldn't mind testing at some point, that would be great, Thanks, Phill. pssc's Profile: http://forums.slimdevices.com/member.php?userid=5644 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
Something changed... I was running 0.21 or .22 for some time. Did a git pull and updated. Now it's complaining about libjson-rpc-perl not being installed. I'm using the native distro package and have even reinstalled it. rcampbel@Godzilla~/project/squeezy $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:Ubuntu 14.04.1 LTS Release:14.04 Codename: trusty rcampbel@Godzilla~/project/squeezy $ git pull Already up-to-date. rcampbel@Godzilla~/project/squeezy $ ./squeezy Install JSON support: sudo apt-get install libjson-rpc-perl at ./squeezy line 113. JSON features not supported: JSON::RPC::Client not available... Trying to cope. at ./squeezy line 115. rcampbel@Godzilla~/project/squeezy $ sudo apt-get install libjson-rpc-perl Reading package lists... Done Building dependency tree Reading state information... Done libjson-rpc-perl is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Then I looked above line 113 in squeezy... return 1 if defined $INC{'JSON/RPC/Client.pm'}; so, I ran 'locate Client.pm' rcampbel@Godzilla~/project/squeezy $ locate Client.pm /usr/lib/perl5/SVN/Client.pm /usr/share/perl/5.18.2/CPAN/HTTP/Client.pm /usr/share/perl5/JSON/RPC/Legacy/Client.pm-- aha!! /usr/share/perl5/RPC/PlClient.pm So, I hacked... and added in Legacy in all the right places, and it appears to work. rcampbel@Godzilla~/project/squeezy $ diff /usr/local/bin/squeezy squeezy 58c58 my $module = JSON::RPC::Legacy::Client; --- my $module = JSON::RPC::Client; 105c105 return 1 if defined $INC{'JSON/RPC/Legacy/Client.pm'}; --- return 1 if defined $INC{'JSON/RPC/Client.pm'}; 108,109c108,109 require JSON::RPC::Legacy::Client; JSON::RPC::Legacy::Client-import(); --- require JSON::RPC::Client; JSON::RPC::Client-import(); 240c240 my $client = $server-{JSONC} ? $server-{JSONC} : new JSON::RPC::Legacy::Client; --- my $client = $server-{JSONC} ? $server-{JSONC} : new JSON::RPC::Client; I don't quite know the best way to submit this as a patch that will work for both cases - otherwise I would have simply submitted a merge request in github. Hope this helps someone else out :) rcampbel3's Profile: http://forums.slimdevices.com/member.php?userid=38284 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
Squeezy: A command-line utility for controlling squeezebox network audio players via their squeezeserver. https://github.com/pssc/squeezy/releases/tag/0.24 New commands for checking connection to players and alarms thanks to D.J Added new testing functionality in the shape of -if_ with the action -exit and cant be negated with -not -alarms : enabled alarms count (can only sound if not generally disabled) -alarms_enabled : alarms generally enabled? -playlist_shuffle : shuffle control -playlist_repeat : repeat control -if_alarm : if alarms are disabled generally or no alarm is enabled -if_connected : if this player is not connected -if_playing : if this player is on and playing -if_sleeping : is powered and on countdown to sleep -exit : set up action for -if_ to exit with specified code -not : -if_ can be prefixed with not Enhanced:- -time : can now take ? to query time. -playing : How gives comprehensive information on the playing track -title : now uses the title command -current_title : uses the current title_command -exit_if_XXX,-die_if_XXX : Deprecated in favour of new -if_XXX commands Fixes:- UTF-8 Based player names syncgroups display now displays more than one syncgroup pssc's Profile: http://forums.slimdevices.com/member.php?userid=5644 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
Simon_rb wrote: Roland0 wrote: If your OS is using package management, you shouldn't use CPAN - install the pre-built package instead (e.g. libjson-rpc-perl for Debian) /QUOTE] Sorry to sound stupid but how does one install libjson-rpc-perl? Regards Simon apt-get install libjson-rpc-perl pssc's Profile: http://forums.slimdevices.com/member.php?userid=5644 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
Roland0 wrote: If your OS is using package management, you shouldn't use CPAN - install the pre-built package instead (e.g. libjson-rpc-perl for Debian)/QUOTE] Sorry to sound stupid but how does one install libjson-rpc-perl? Regards Simon Simon_rb's Profile: http://forums.slimdevices.com/member.php?userid=56871 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
This is very cool. I no longer have to find the Controller in order to set sleep for the bedroom duet. That alone is worth the price of admission. I'm not understanding the use of shortcuts. Does anyone have any examples of playing favorites, playlists or the Random Songs feature. Thanks, Randy G -- Logitech Media Server Version: 7.7.3 - 1375965195 OS: Debian - EN - utf8 Platform: i686-linux Perl Version: 5.14.2 - i486-linux-gnu-thread-multi-64int Database Version: DBD::SQLite 1.34_01 (sqlite 3.7.7.1) Total Players Recognized: 4 Squeezebox3: Firmware: 137 Duet: (2 receivers, 1 controller) Firmware: 77 Boom Firmware: 57 -- teeitup's Profile: http://forums.slimdevices.com/member.php?userid=14402 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
I also just installed squeezy and run into the same error: JSON features not supported: JSON::RPC::Client not available I see it needs this perl module: JSON/RPC/Client.pm but I'm not clear yet how to do that... gadgetchris's Profile: http://forums.slimdevices.com/member.php?userid=62314 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
...OK, got the first error down. Needed to install cpanp(lus), then could install JSON::RPC::Client (0.93) Now I get the error: Undefined subroutine main::urnencode called at /usr/local/bin/squeezy line 1058, GEN2 line 6. ... chop, chop :confused: gadgetchris's Profile: http://forums.slimdevices.com/member.php?userid=62314 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
Changed the type error 'urn' - 'url' :p Code: send_command urlencode($player). mixer volume $vol; :D But why is the volume query not working -volume ? and -- and ++ don't use the same step size. ... :confused: gadgetchris's Profile: http://forums.slimdevices.com/member.php?userid=62314 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
gadgetchris wrote: Needed to install cpanp(lus), then could install JSON::RPC::Client (0.93) If your OS is using package management, you shouldn't use CPAN - install the pre-built package instead (e.g. libjson-rpc-perl for Debian) But why is the volume query not working -volume ? Define not working and -- and ++ don't use the same step size. They should (+/- 10). What makes you think they don't ? Try using -Louder and -Quieter. If they work as expected, it might be a cli quoting issue. [ extGUI4LMS - an alternative web interface: 'forum' (http://forums.slimdevices.com/showthread.php?98186-Announce-Alternative-Web-Interface-(beta)) / 'homepage' (http://code.google.com/p/extgui4lms/) ] Roland0's Profile: http://forums.slimdevices.com/member.php?userid=56808 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
Hello, I'm starting using the squeezy wrapper which seems really helpful. Has anybody improved it since the new version of Phill? (https://github.com/pssc/squeezy) It would be great to include controls of shuffle modes as well as add a play command (without arguments, to be sure it will restart playing if the player was stopped or in pause)... Cheers, V. virx71's Profile: http://forums.slimdevices.com/member.php?userid=50716 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
This is great, I particularly appreciate the fact you added bash completion scripts! jamespo's Profile: http://forums.slimdevices.com/member.php?userid=7435 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
DoXer wrote: I'm looking for the similar tool for Windows/DOS. Any suggestions. http://www.nicobaumgartner.ch/blog/?p=237 ralphy's Profile: http://forums.slimdevices.com/member.php?userid=3484 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
I'm looking for the similar tool for Windows/DOS. Any suggestions. DoXer's Profile: http://forums.slimdevices.com/member.php?userid=30596 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
Excellent stuff! I have configured my MacBook's media keys (well the fn-keys) to control my player - saves me fumbling for the remote when working. Thanks for sharing your work. -- tufty tufty's Profile: http://forums.slimdevices.com/member.php?userid=47700 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
cmmh;635920 Wrote: I'm missing a few pieces ... Is it possible to make shortcuts for something like a Pandora (or other My Apps ) thing? I haven't tried to dig into that yet. I'm afraid the functionality is limited at the moment to just the things I use -- and I don't use Pandora (or any other apps). It would be difficult to for me to test such an extension. Please feel free to go ahead and implement it yourself, if you like. The main part of the implementation is just a big associative array binding command names to perl functions. I'll happily incorporate any reasonable patches. cmmh;635920 Wrote: It would be nice to be able to perform actions on all players with an option to exclude one or more players. My example is that I like to control the music to my infant's room separately. Interesting idea. I'll think about that. The way I have things set up is with two groups: Kitchen, Living room and (my) Bedroom in one group, and my kids' two players in the other group. Groups were implemented really only with this setup in mind. Thanks for the feedback. Steve -- smblott smblott's Profile: http://forums.slimdevices.com/member.php?userid=2248 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
Very cool! This is exactly what I need. I'll be playing with this in the next few days. -- Mark Miksis Mark Miksis's Profile: http://forums.slimdevices.com/member.php?userid=529 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix
Re: [SlimDevices: Unix] squeezy - a command-line wrapper around the squeezeserver telnet/CLI
smblott;630672 Wrote: (And, should a moderator happen to look at this page: perhaps you could fix the typos in the thread's subject line? Thanks.) Thanks, mods. -- smblott smblott's Profile: http://forums.slimdevices.com/member.php?userid=2248 View this thread: http://forums.slimdevices.com/showthread.php?t=87636 ___ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix