Home of the Squeezebox™ & Transporter® network music players.
Page 101 of 206 FirstFirst ... 519199100101102103111151201 ... LastLast
Results 1,001 to 1,010 of 2059
  1. #1001
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,299
    Quote Originally Posted by peterw View Post
    Array of arrays, so I can use the scheduler API and minimize the impact on server responsiveness. Keywords like ALL and OTHERS will result in mutiple command arrays, each with one $client reference.
    Ah. That's a much more sophisticated (and better) approach than what I've taken. I'll probably just lift your code verbatim, if you don't mind.

  2. #1002
    Quote Originally Posted by gharris999 View Post
    Ah. That's a much more sophisticated (and better) approach than what I've taken. I'll probably just lift your code verbatim, if you don't mind.
    Not at all. I'm a little surprised how much code I ended up writing to handle the escaped characters; life certainly is easier if you can just assume URI encoding of whitespaces!
    http://www.tux.org/~peterw/
    Note: The best way to reach me is email or PM, as I don't spend time on the forums.
    Free plugins: AllQuiet Auto Dim/AutoDisplay BlankSaver ContextMenu DenonSerial
    FuzzyTime KidsPlay KitchenTimer PlayLog PowerCenter/BottleRocket SaverSwitcher
    SettingsManager SleepFade StatusFirst SyncOptions VolumeLock

  3. #1003

    cli:// URLs

    Quote Originally Posted by gharris999 View Post
    Epoch1970's idea of many months ago for a plugin that could process CLI commands embedded in a playlist (which is a brilliant idea.)
    That sounds cool but dangerous. I can imagine writing a SC/SBS "cli" protocol handler so you could embed commands in a playlist; I expect that would be pretty easy. But what would happen if you loaded a PLS playlist from my web site that included "cli://" URLs? Could I mess up your server? Shut it down if SvrPowerControl is loaded? Use prefset commands to turn off your alarms?
    http://www.tux.org/~peterw/
    Note: The best way to reach me is email or PM, as I don't spend time on the forums.
    Free plugins: AllQuiet Auto Dim/AutoDisplay BlankSaver ContextMenu DenonSerial
    FuzzyTime KidsPlay KitchenTimer PlayLog PowerCenter/BottleRocket SaverSwitcher
    SettingsManager SleepFade StatusFirst SyncOptions VolumeLock

  4. #1004
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    1,466
    Quote Originally Posted by peterw View Post
    Could I mess up your server? Shut it down if SvrPowerControl is loaded? Use prefset commands to turn off your alarms?
    Yes. Yes. Excellent!! --although wake-up at 4AM to Motorhead at 100% might be even better

    Well, that would be naughty of you, adding all those bad cli commands to DOS my server and ruin my day. But that would be my fault, downloading stuff and feeding it blindly to my machine, wouldn't it ?

    One idea is to have the command visible in the playlist, with an icon same as an album, so that you can on the fly add cli controls, or check if a command is really suitable. I imagine I would have "volume up" commands before some songs in some playlists. But that wouldn't be suitable for every player or any time of the day, so same as removing a song, I could remove the cli action.

    Eventually I suppose some anti-CSRF contraption can be invented, like requesting a unique hash to be added to the cli url (that's heavy, IMHO), or passing through a filter that accepts/rejects cli actions. Perhaps the cli:// must refer only to a package, blessed, signed and all, in the extensions downloader way ? (with a way to self-sign my volume-ups, please.)

    One thing for sure: if there were a security level, I would disable it. I am the king on my Lan, a nobody outside of it, and I know it.
    And I will never, ever download a playlist again from you, Peter W. !

    (and I'm glad you two show interest in this. Thanks.)
    Last edited by epoch1970; 2009-10-18 at 17:44.

  5. #1005
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,299
    Quote Originally Posted by peterw View Post
    That sounds cool but dangerous. I can imagine writing a SC/SBS "cli" protocol handler so you could embed commands in a playlist; I expect that would be pretty easy. But what would happen if you loaded a PLS playlist from my web site that included "cli://" URLs? Could I mess up your server? Shut it down if SvrPowerControl is loaded? Use prefset commands to turn off your alarms?
    Yes, I've been thinking of this issue too. I think you'd have to have a way of limiting the allowable cli command requests to a whitelisted "safe" subset.

  6. #1006
    Quote Originally Posted by gharris999 View Post
    Yes, I've been thinking of this issue too. I think you'd have to have a way of limiting the allowable cli command requests to a whitelisted "safe" subset.
    I have a hard time imagining what commands would be safe. Perhaps the handler could look at the URL for the current playlist and default to only accepting cli:// URLs from playlists with file:// URLs referring to the local host (no http addresses, no UNC paths, etc.)? I think it's possible to determine the playlist that's being used.

    I pushed an updated KidsPlay to my testing area, directory http://www.tux.org/~peterw/slim/slim7/TESTING/KidsPlay/ and repo URL http://www.tux.org/~peterw/slim/slim7/repodata-test.xml that
    • supports "\" as an escape char (for escaping " and ; -- use \\ to include \ itself
    • allows a player to be specified by plain MAC (00:04:20:11:22:33 power 1) or with the colon that KidsPlay used to insist on (00:04:20:11:22:33: power 1) -- and also supports name + ":", "ALL:", and "OTHERS:"
    • has some routines you can grab for getting arrays of arrays -- look for the "macro-parsing routines" comments before and after -- for getCommands(), makePlayerList(), parseFields(), splitLines(), and getClientByName(). They're not optimized, but they work. Comments before getCommands() explain what the array of arrays looks like. You should be able to pass undef for $client if you don't know the client -- you'll end up with undef for the calling client, and undef for the context client for any command that doesn't specify something with MAC, name, ALL, or OTHERS.


    Please let me know how that works for you. You'll have to look elsewhere in the code to see how I use the task scheduler API -- look for processCommandFromQueue(), addToQueue(), etc.
    http://www.tux.org/~peterw/
    Note: The best way to reach me is email or PM, as I don't spend time on the forums.
    Free plugins: AllQuiet Auto Dim/AutoDisplay BlankSaver ContextMenu DenonSerial
    FuzzyTime KidsPlay KitchenTimer PlayLog PowerCenter/BottleRocket SaverSwitcher
    SettingsManager SleepFade StatusFirst SyncOptions VolumeLock

  7. #1007
    Junior Member
    Join Date
    Jul 2009
    Posts
    23

    SCCLITool.exe?

    Any change to the SCCLITool for 7.4.x yet, especially on the apparent inability for the tool to talk to a SBR (SqueezeBox Receiver) when it's connected to mySqueezeBox.com?

    I tried using the latest SvrPowerControl (20091017) plugin, but it seems to keep the network port on the SBS (SqueezeBox Server) active, making my script believe a user is currently connected to the server, thus preventing standby. I'd rather handle the SBR from the script instead, just need the tool

  8. #1008
    Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    294

    Unhappy

    Quote Originally Posted by gharris999 View Post
    ================================================== ================================
    What's new: 20091017
    ================================================== ================================
    Support for CLI processing in commands:
    ...
    Support for custom commands:
    ...
    Nice, but what about re-activating the core features of ServerPowerControl ?
    Why do you implement new functions when the core features still don't work on 7.4 ?

    Sleep monitoring with option shutdown to mysqueezebox.com doesn't work with this beta. I'm no programmer and I dont't need the plugin for anything else than sleep monitoring .
    SB Touch
    SB Boom
    SB Radio
    Thinkpad T400, Win 7 Pro 64bit, LMS 7.7.2

  9. #1009
    Senior Member
    Join Date
    Jun 2005
    Posts
    414
    I used SvrPowerControl with SC 7.3 without problems to suspend SC after 45 minutes idle time on Ubuntu 9.04. After upgrading to squeezeboxserver 7.4 the plugin did no longer work so I uninstalled it.

    I have now tested the new beta of the plugin and it crashes my squeezboxserver. I enclose my server.log file. I manually installed the beta version by copying the SvrPowerControl folder to /var/lib/squeezboxserver/cache/InstalledPlugins/Plugins. After a server restart the SvrPowerControl links wer shown in the web interface main page of squeezeboxserver but the plugin was not listed on the plugins page of the sqeueezeboxserver settings. And there was no way to access the settings page of the plugin (there was also no prefs file installed).

    I tried then to suspend the server using the links on the web interface main page but this did not have any effect. I than tried to shutdown the server using SvrPowerControl and then squeezeboxserver died.
    Attached Files Attached Files

  10. #1010
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,299
    Quote Originally Posted by Roger66 View Post
    Nice, but what about re-activating the core features of ServerPowerControl ?
    Why do you implement new functions when the core features still don't work on 7.4 ?

    Sleep monitoring with option shutdown to mysqueezebox.com doesn't work with this beta. I'm no programmer and I dont't need the plugin for anything else than sleep monitoring .
    I'll try to test this today.

    But please understand: I'm not excited about SBS 7.4. None of the bugs I care about were addressed. A couple of new bugs were introduced that make a good chunk of my music collection impossible to play. It gives me no new features that I'm interested in. Many of the UI changes I find to be personally distasteful. Programming around all the seemingly pointless api changes between 7.3 and 7.4 has been a PITA.

    So, unless you are using a Squeezebox Radio or Squeezebox Touch, my attitude is 'why bother' with 7.4? I'm as susceptible to 'update fever' as the next person. But not in this case. My 'production' music server at home still runs 7.3.4 and SrvrPowerCtrl seems to be working well there.

    I have to ask: If sleep monitoring is important to you, and if 7.3.4 isn't missing anything you can't live without, why not go back to 7.3.4, for the time being?

    I'll do my best to put out a version of SrvrPowerCtrl that works equally well with 7.3.4 and 7.4.x in time. But again, please understand: there's absolutely nothing in it for me, personally. The 'fun' quotient in preparing this next version has been kind of zilch. Which is not to say that I don't care about your issue. I would like to get this working for you. But the only real incentive at work here is my own curiosity.

Posting Permissions

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