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.
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%
Results 401 to 403 of 403
Thread: SqueezeIR Support Thread
-
2020-05-26, 04:09 #401
- Join Date
- Oct 2008
- Location
- Huntingdon, UK
- Posts
- 584
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.
-
2020-06-11, 06:36 #402
- 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>
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.
-
2020-06-12, 03:53 #403
- 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.