Home of the Squeezebox™ & Transporter® network music players.
Page 3 of 216 FirstFirst 123451353103 ... LastLast
Results 21 to 30 of 2153
  1. #21
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,487
    Quote Originally Posted by epoch1970 View Post
    Gharris999, Attached is my contribution to your fine project.
    I can't claim this as my project. Adrian C did all the initial work for the windows SS6.5 version. See http://adrianonline.wordpress.com/projects/squeezebox/ But thanks again for the helpful Debian instructions.

    Quote Originally Posted by epoch1970 View Post
    ..when switched in Squeezenetworks.com mode, and the server appropriately dead, my Controller still shows the PowerControl menu under Extras, but it is empty.
    Yes, this is a bug. Harmless, but annoying. I'll need some help from Ben Klass or somebody else suitably jiveariffic to fix this, I think.

    Quote Originally Posted by epoch1970 View Post
    I have high hopes you're considering adding a WOL feature right there ?
    I'm confident that Richard's work on the SBC code will sort out all the WOL issues MUCH sooner than I could even dream of implementing a feature like this. Thanks for confusing me with a perl/lua programmer with other than my very rudimentary skills, though.

  2. #22
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    2,051
    Quote Originally Posted by gharris999 View Post
    Does this plugin work with Mac OSX? What has to happen to make it work?
    I think it does already. I tested this on X.5.3 but I guess most versions of OS X will work as well:
    - Install the plugin in ~/Library/Application Support/SqueezeCenter/Plugins
    - In the subroutine sub doSystemShutdown() of file Plugin.pm, make the following changes:

    a) comment out the "shutdown -r" (= reboot) lines
    # system "sudo", '/sbin/shutdown', '-r', 'now';
    and replace them with the following:
    system '/usr/bin/osascript', '-e', 'tell app "Finder" to restart';
    b) comment out the "shutdown -h" (=halt) lines
    # system 'sudo', '/sbin/shutdown', '-h', 'now';
    and replace them with this:
    system '/usr/bin/osascript', '-e', 'tell app "Finder" to shut down';
    or that (which is probably safer):
    system '/usr/bin/osascript', '-e', 'tell app "Finder" to sleep';

    No need to muck with sudo settings and that's a good thing, me thinks.

    Now there are a few caveats, here:
    1. On a desktop, and particularly on a multi-user machine like OS X, shutting down may not be such a great idea. That's why I suggest using "sleep" instead of shutdown
    2. To avoid losing data upon a shutdown or reboot, opened applications will offer to save documents or cancel shutdown. In case no one responds to applications prompts the shutdown times out. So you can't be certain the Mac will indeed stop or restart. But SC will die anyway I think.
    3. Perhaps you think you can log out and keep SC running in the background. Well that's certainly the way to go, but the Login Window is not as scriptable, AFAIK. You can't "tell app "Login Window" to shut down".

    So I believe the clean way of doing it is to write a small launchd Daemon that will have the power to shutdown/reboot the machine in the unix way; I suggest the deamon should check (with "who" ?) and refuse to shutdown or reboot if user sessions are opened on the machine or if SC is not running. I believe this would work on X.4 and X.5 machines.
    In order to support X.3 and prior systems the StartupItem init scheme should be used instead of Launchd.
    If you're interested, have a look at http://developer.apple.com/technotes/tn2005/tn2083.html for authoritative info on the topic.
    I have little interest, time and skills to code and test this myself.

  3. #23
    Quote Originally Posted by gharris999
    Heh! This shortcoming occurred to me a couple of days ago too. I'm working on adding a feature so that all connected clients get turned off at shutdown time. I'll post the new version today or tomorrow (I hope.)
    Quote Originally Posted by epoch1970
    pichonCalavera: The strange behaviour of the original script (killing immediately the server) I referred to in my last message to you was certainly coming from version incompatibility. For me SrvPowerControl works absolutely flawlessly with the current SC7.1, I didn't even need to take a peek at the plugin code.
    I must've miss the 7.1 requirement, I have now upgraded to 7.1 now and the plugin's Shutdown Server and Restart Server are working correctly, I can see the Squeezebox turns off correctly.

    Shutdown to SqueezeNetwork connects to Squeezenetwork correctly, but for some mysterious reason my Squeezebox displays Signing Off of Squeezenetwork, I'll try to replicate it again.

    Unfortunetly now IRBlaster is the one not working, i hope it gets supported for SC 7.1 soon.
    rip (eac) > convert (flac) > tag (musicbrainz/mp3tag) > normalize (replaygain/foobar2000) > albumart (www/firefox) > transport (winscp) > store (debian) > manage (squeezecenter) > control (ipodtouch/ipeng-app) > play (squeezebox) > preamplify (zpre2) > amplify (zampv3) > listen (axiomm2/sennheiser-hd595) > scrooble (last.fm) > enjoy (me :)

    http://www.last.fm/user/pichonCalavera

  4. #24
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,487
    Quote Originally Posted by pichonCalavera View Post
    Unfortunetly now IRBlaster is the one not working, i hope it gets supported for SC 7.1 soon.
    Try this at your own risk, but the fix to IRBlaster may be very simple:

    Edit IRBlaster's install.xml file so that the maxVersion line reads:

    <maxVersion>7.*</maxVersion>

    That may be all there is to it.

  5. #25
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,487
    epoch1970: thanks for the mac info. I'm working on an updated version that keeps the various shutdown/suspend/hibernate commands in prefs. That way, I'm hoping that OSX can be supported without having to edit the code. I hope to have this next version out in a day or so.

  6. #26
    Quote Originally Posted by gharris999
    Try this at your own risk, but the fix to IRBlaster may be very simple:

    Edit IRBlaster's install.xml file so that the maxVersion line reads:

    <maxVersion>7.*</maxVersion>

    That may be all there is to it.
    Hey!, thanks for the tip, IRBlaster is now working fine just like before.

    I tried the Shutdown to Squeezenetwork and it worked fine this time, altough it takes a longer time to shut the server down for some reason.

    As for a feature request, it would be cool to have an option for the sleep request on the Squeezebox, so that you could Shutdown the server too. Something like what these guys are trying to accomplish: http://forums.slimdevices.com/showthread.php?t=49013 .
    rip (eac) > convert (flac) > tag (musicbrainz/mp3tag) > normalize (replaygain/foobar2000) > albumart (www/firefox) > transport (winscp) > store (debian) > manage (squeezecenter) > control (ipodtouch/ipeng-app) > play (squeezebox) > preamplify (zpre2) > amplify (zampv3) > listen (axiomm2/sennheiser-hd595) > scrooble (last.fm) > enjoy (me :)

    http://www.last.fm/user/pichonCalavera

  7. #27
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,487
    Quote Originally Posted by pichonCalavera View Post
    I tried the Shutdown to Squeezenetwork and it worked fine this time, altough it takes a longer time to shut the server down for some reason.
    I have a long time-out hard-coded in that version. That's to allow a SBC to "follow along" when the player switches over to squeeze network. With my setup, it takes at least a minute+ for this to happen. Thus, I set the shutdown wait period to 2 minutes. Conceivably, I could make this a user configurable setting in a future version.

  8. #28
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,487
    Quote Originally Posted by pichonCalavera View Post
    As for a feature request, it would be cool to have an option for the sleep request on the Squeezebox, so that you could Shutdown the server too. Something like what these guys are trying to accomplish: http://forums.slimdevices.com/showthread.php?t=49013 .
    If the change that Phil proposes ever makes it into the server code, it shouldn't be too hard to add that functionality to "my" plugin. Or for that matter, make a generic "OnSleepEnd" plugin that would execute any user configurable CLI command.

    Since the SrvrPowerControl plugin adds the ability to initiate a shutdown/suspend/hibernate/switch to SN via the CLI, a OnSleepEnd plugin could easily make that call.

    A less elegant short-term solution would be for you to modify the plugin code and add a new menu item "Sleep 15 then shutdown". The next version of the plugin that I post up here will be much easier to modify in this regard.
    Last edited by gharris999; 2008-06-27 at 08:18.

  9. #29
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,487
    I suppose one circumstance where this would be handy is where the user wants to listen to 15 minutes of music on "sleep" mode; have the player then switch to squeeze network (where they might have an alarm set) and power off the local server. This actually sounds handy to me. But the right way to do it is the way Phil is suggesting.

  10. #30
    Can't get it working on SlimNAS (FreeNAS)

    Appears as though I don't have Sudo, have tried pkg_add -r sudo but the package is not available on the freebsd repository (anyone know how to install SUDO in FreeNAS?)

    Your plugin does in fact shutdown squeezecentre so perhaps I'll work on a cron job in SlimNAS that determines whether anyone is using the system as a NAS server and then see if SqueezeCentre is running.

    Gives me a partial option.

    Thanks

    Edit-------------
    I have found a copy of the sudo package for freebsd that seems to work on SlimNAS
    ftp://ftp.freebsd.org/pub/FreeBSD/po...1.6.9.15_1.tbz
    pkg_add sudo-1.6.9.15_1.tbz

    However, i'm still in a situation whereby it only shutsdown squeezecentre. A little further investigation shows that mysqld & perl are running as 'root', and I don't have /etc/init.d directory.

    What command is the plugin trying to call to shutdown the server, i'm sorry but programming isn't my bag and I can't really understand this at the moment.

    I should add, I'm running squeezecenter-7.1-21304-noCPAN.
    Also, in testing with SoftSqueeze, it doesn't shutdown the SoftSqueeze client.

    Cheers

    Mark
    Last edited by fredbloggs; 2008-07-03 at 18:09.

Posting Permissions

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