Home of the Squeezebox™ & Transporter® network music players.

View Poll Results: Are you interested in IR-over-IP?

Voters
10. You may not vote on this poll
  • Yes, I'd like to have IRoIP.

    6 60.00%
  • No, I don't care.

    4 40.00%
Page 41 of 41 FirstFirst ... 31394041
Results 401 to 403 of 403
  1. #401
    Senior Member
    Join Date
    Oct 2008
    Location
    Huntingdon, UK
    Posts
    584
    Quote Originally Posted by maf View Post
    I think I ran into a little problem with the way the ID of IPevents is used as part of the URL for triggering those events. Because the ID is no URI encoded, characters like space, slash or any umlaut seem to end up in the URL on the HTML page. In my case, an umlaut in the ID was no correctly rended by the browser and the link did not trigger the event.

    If my assumption is correct, encoding/decoding special characters on the controller should help. But what I would like even better is if one could keep the ID simple and use an additional caption element of IPevent to specify the text displayed on the page.
    You're quite correct, SqueezeIR just takes the uri and assumes no escaping was required. I spent ages writing regular expressions to extract the ifo from the url when I now realise that I could have just used the url.lua class that does it all for me! I'll look into handling url's correctly.

    You're suggestion of a "simple" ID is also a good one. Menus have a separate <caption> element so it makes sense for iroip too.
    1xRadio, 2xReceiver, 2xController, 1xSB3, 1xSqueezeLite (on Rpi3/Jessie), SBS 7.9.2 (on Rpi3/Jessie)
    Creator of SqueezeIR applet for the Controller.
    Creator of LineInButton applet for the Radio.

  2. #402
    Senior Member
    Join Date
    Oct 2008
    Location
    Huntingdon, UK
    Posts
    584

    New version!!!

    SqueezeIR Version 2.02 has just been released to the repository. Changes include:
    - New <players> xml element to allow SqueezeIR to respond to changes in player state (see below for details).
    - New optional <caption> element for <IPevent> to allow the name on the webpage and the URI to be different. If missing then the eventID will be used as the caption as previously.
    - BUGFIX: IPevent ID's were not being URI escaped properly (or at all!).
    - BUGFIX: IPevent URI's were using a non-standard format (using ? as the delimiter instead of &). Both formats are now supported.

    The <players> element allows SqueezeIR to do something when the player does something, rather than when a button is pressed on the controller. For example it can turn your amp on when the player starts playing. The xml looks like this:
    Code:
    <players>
      <player ID="my_player"> <!-- the name of your player, not case sensitive -->
        <playerEvents>
          <playerEvent ID="power=false"> <!-- whenever the player powers off -->
            <actions>
              <!-- actions go here as for normal events when a button is pressed -->
            </actions>
          </playerEvent>
          <playerEvent ID="mode=play"> <!-- whenever the player starts playing --> 
            <!-- actions as above -->
          </playerEvent>
        </playerEvents>
      </player>
      <player ID="my_other_player">
        <-- player events for this player -->
      </player>
    </players>
    Supported playerEvent IDs are "power=true", "power=false", "mode=play", "mode=pause", "mode=stop".

    I want to be able to respond to volume changes too but haven't figured out how to do that yet. The player class doesn't seem to offer a notify_*() function to detect them in the same way as it does for power and mode changes.

    NB: The controller will fire the IR when the player changes even if it is not the currently selected player on the controller.
    1xRadio, 2xReceiver, 2xController, 1xSB3, 1xSqueezeLite (on Rpi3/Jessie), SBS 7.9.2 (on Rpi3/Jessie)
    Creator of SqueezeIR applet for the Controller.
    Creator of LineInButton applet for the Radio.

  3. #403
    Member
    Join Date
    Jun 2009
    Location
    Berlin, Germany
    Posts
    53
    That's great, thanks a lot!

    Unfortunately, I can't get either of the two new elements to work. May be, it's because the schema definition http://www.woodbine.me.uk/squeezebox.../SqueezeIR.xsd still seems to be the one for version 2.01? At least, it does not include the players element type.

Tags for this Thread

Posting Permissions

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