Page 1 of 3

xAP interaction

Posted: Tue Apr 05, 2016 7:52 am
by V_J
Hello,

I'm trying to integrate several devices, and one of them (squeezebox) has both xAP and xPL interaction. I have the squeezebox plugin, but the xAP/xPL functionality allows the squeezebox to send something to Eventghost (e.g. button press on the remote, change of state, ...), not only to respond to commands. The squeezebox server sends less information via xPL than it does via xAP, and supports less functionality.

My first question is: there is a software xplhal; but I'm unclear of its functionality... can this be used to bridge xPL/xAP?

If not... There is an xPL plugin for EventGhost, but I'm looking at modifying it to work with xAP; both protocols look quite similar... anyone tried that before?

Thanks,

J├Ârg

Re: xAP interaction

Posted: Tue Apr 05, 2016 3:13 pm
by kgschlosser
V_J wrote:Hello,

I'm trying to integrate several devices, and one of them (squeezebox) has both xAP and xPL interaction. I have the squeezebox plugin, but the xAP/xPL functionality allows the squeezebox to send something to Eventghost (e.g. button press on the remote, change of state, ...), not only to respond to commands. The squeezebox server sends less information via xPL than it does via xAP, and supports less functionality.

My first question is: there is a software xplhal; but I'm unclear of its functionality... can this be used to bridge xPL/xAP?

If not... There is an xPL plugin for EventGhost, but I'm looking at modifying it to work with xAP; both protocols look quite similar... anyone tried that before?

Thanks,

J├Ârg
The protocol is super duper simple. But the message data is dictated by the device and that is what I do not have for the squeezebox. It can be figured out pretty easily if I had a squeezebox. But I do not own one. Now. I can still put something together if I have one of these 2 the latter being the preferred.


RDP access to a computer on your local network. Something with alot of ram 16 gig min. I get a heap of things running.

Or VPN access. That way it looks like my machine is on your network.

Let me know.

K

Re: xAP interaction

Posted: Tue Apr 05, 2016 7:05 pm
by krambriw
To build a test system you only need software, hardware is not needed. Install LMS and a Squeezebox player software (there are a couple of such available)

Re: xAP interaction

Posted: Tue Apr 05, 2016 8:54 pm
by kgschlosser
I haven't done the legwork on it if there is something software based I can install on my machine and give it a go I'll tinker around with it later

Re: xAP interaction

Posted: Wed Apr 06, 2016 4:20 am
by krambriw
Anyway, this is the one I used a couple of years ago, it worked pretty nice
http://softsqueeze.sourceforge.net/

Re: xAP interaction

Posted: Wed Apr 06, 2016 4:31 am
by kgschlosser
i found something already all coded up and would take a whole of about 2 hours to get it running in EG, the whole thing can be ported with just adding the EG specific things like the config panels.


everything else is all standard python and nothing weird.


it has all the server and player crap already done.

Re: xAP interaction

Posted: Wed Apr 06, 2016 7:26 am
by V_J
Nice... for me, a general xap plugin would suffice: the payload can be parsed with a simple script outside of the plugin, and it would work on other xap compatible devices. So something exactly like the xpl plugin, but for xap. I already stared tinkering with the xpl plugin; my python skills are limited, so I need a starting point like that. I can see it is quite a straightforward change but I have a bit less time the next few days...

Re: xAP interaction

Posted: Wed Apr 06, 2016 1:43 pm
by krambriw
I have a bit less time the next few days...
There is a limit of available time for all of us ;)

Re: xAP interaction

Posted: Wed Apr 06, 2016 2:13 pm
by kgschlosser
so V_J you may be getting a plugin you want sooner than later, all depends on how long i can tolerate the mother-in-law before i vanish into my office not to be seen for a while. LOL

i am usually good for a few days before i have had it with her. but last time i saw her was almost 8 years ago. and that kinda thing doesn't get better as we get older it gets worse, so if my calculations are right. i don't even think i will last a day before i retreat.


i have made sure i have put together a whole list of things that I have to get done even tho she is here. i'll add your plugin close to the top of the list.

so i have to build my theatre screen. that should take 1/2 a day
i have to mount the projector, there is another half a day
then i have to code a plugin for serial for epson projectors
that's a day or 2 maybe

then i have to spend a day watching tinkering with it

then i will work on your plugin, because she should be gone for 2 days at that point.

so on the day she returns i can tell her she can watch some movies, by then i'll be refreshed enough to spend another day dealing with her


then she leaves the very next day!!

so i have it planned out.

but right now i have to clean the office up because i know she is going to want to bother the shit outta me.

i may have to squeeze in there somewhere getting the TV working right in the spare room for her.

geesh!!!
K

Re: xAP interaction

Posted: Wed Apr 06, 2016 4:39 pm
by V_J
Today I managed to find some time and looked at both the xpl plugin and the difference with the xap specification. It is very straightforward, and I think I will manage to make it in a very short time. Today I don't have time anymore, but I may manage tomorrow or in the weekend.

So don't worry! If you have important things to do, please do them, I would love to give making the xAP plugin a shot. :)

Re: xAP interaction

Posted: Wed Apr 06, 2016 7:32 pm
by kgschlosser
oh hell no, you can't take that away from me, it give me an excuse to get away from the mother in law.

LOL
K

Re: xAP interaction

Posted: Thu Apr 07, 2016 8:01 am
by V_J
Ok, I'll let you go at it :). I won't have time till some time next week anyway to test things. :)

edit: this is the xAP specification I could find for the Squeezebox
http://www.erspearson.com/xAP/Slim/Manual.html
here are some other xAP utilities, including e.g. getting weatherdata from websites and sending them as xAP info
(I have not downloaded or tested them, so I don't know if/how they work)

Regarding the projector: I have a Epson EH-TW2900, but made the mistake of only running just one HDMI cable to it. A serial cable (or cat5 cable with serial over ethernet adapters) would have been nice to integrate it as well with the rest. I think now I would run 2 HDMI cables: my receiver only supports hdmi 1.2, but I don't want to replace it yet. The projector supports higher, and the PC connected to it also, so at the moment I miss out on things like deep color. If the projector gets replaced before the receiver, I may loose even more functions. With 2 hdmi cables, I could have had one from the receiver and one directly from the computer. My girlfriend was a bit doubtful about a projector, but as we both like movies, she quickly got convinced. :) If you have a model like the EH-TW2900, be aware that not all projector mounts fit: some mounts only support smaller projectors (the shop were I bought the mount first give me such a mount, claiming it will fit - they replaced it later). If you don't have a mount yet, I can recommend this Benq mount, with one thing to be aware of: hang the projector with its point of gravity exactly below the ball joint, or aligning the projector will be difficult (after tightening the ball joint, it will move a little bit still - it still is possible though). Furthermore, the projector will move slightly over time (the ball joint can be tightened again, so it is not such a bit issue, but I have to redo it once every 1-2 years). I could not hang mine directly below the ball joint as there is a wall too close; but despite that it works fine.
It is also useful to store different settings in memory: I have one for an optimally darkened room and then a few for less optimal circumstances (e.g. not optimally darkened: colours are not as good, but at least the image is visible :)). For sure if you integrate it with the serial port, you can probably set the mode automatically depending on the time of day ;) (or if you have more home automation, add the position of the blinds :lol: ).

Re: xAP interaction

Posted: Thu Apr 07, 2016 1:23 pm
by kgschlosser
thanks for the tips on the projector, i got the epson 3020, i was gonna go better but i was like hell, never had one, never set one up, and i am also building my own screen. i thought the pricetags were alittle high,

i got the seymore XD material. nice stuff to work with.

i am slanting the material as not to get moire, i know is a much smaller chance but with the AT screen it becomes higher event those it's not a dlp projector there is still a chance, so for an extra 20 for another foot of the material i was able to tilt the fabric by 10 degrees or so.

i used the painters blue tape to mask it all out and make sure it was square before i cut the excess material off..


now this is where i went alittle goofy. after talking to the screen mfg. they put grommets every 6 or so inches and they don't fold the material. and they use shock cord (bungee cord) to keep tension on the screen.. i asked the question, how did they handle the ripples caused by the pressure points from the bungee pulling on a grommett.

this is what they said..

the outer bezel pushes up against the material to remove the ripples... LOL and their screens are like 2500 + with the same material i bought.

that answer killed me, so i decided to handle it a different way.

i folded the material over it's self around a piece of 1/4 inch steel rod. and then popped the grommets in putting pressure on the rod.

now when i pull with the bungee there is no possible way of getting a pull mark.

and my frame is only going to be about 2.5 inches wide because i am able to really pull the snot out of that bungee now without fear of tearing the material.


i already set the whole room up. 7 speakers all bi wired with proper binding post wall plates for the connections. i ran only one HDMI which is fine because mine is a complete server /media pc setup. video games movies photos music and TV all come from the computer. so no real need to switch up av sources

i have an av receiver what's almost 10 years now, so i think it's hdmi 1.1 i know it's only 1080i

but it's a 3500 dollar piece of equipment and i am not willing to replace it. i upgraded the power supply in it.

the projector is only serial, so i got an arduino coded up as an IR receiver as well as reading serial ports and connected to an ethernet shield, i ran 2 lan cables to it and 2 behind the screen (for my ambilight)

i also ran the power to the outlets for the screen and the projector, as well as all the lights in the room to my 5000 watt APC battery backup.

and the system also controls my lights, security, and some others, but it's hooked up to every room. i designed the system to be room aware, so that way if i carry a remote from one room to another it will control the devices in that room without having to change any kind of mode,

I also set up an on screen menu system that send out to each room to allow for control of different things.

like if i go to the media room and i don't remember if i turned the TV off in the master bedroom, i can check from the media room, and if it's on i can turn it off
it's pretty cool, and it's all controlled my a master EG that sends data like the menu to the rooms.


but all commands come back to the central EG for processing, so all the code for everything lies in one place

K

Re: xAP interaction

Posted: Thu Apr 07, 2016 2:18 pm
by V_J
Nice setup!
And not unlike mine... :lol:

About the projector: very important is aligning it properly. Use test images (e.g. generated by the projector) and really go and check in all corners if the pixels are sharp. You may have to realign it once after a few days, as most mounts will have to set in a bit.

I'm currently working on integrating everything, but I like your remote idea! I have all lights controlled via KNX, with a Loxone miniserver to offer control them via web, apps or other api's. I finally got the hang (enough) of programming for the Loxone and know how to integrate it with the Squeezeboxes (best is via xAP). Now, I'm adding EventGhost in the mix: read from Squeezeboxes (xAP, as that one is already needed for Loxone), send to squeezeboxes (plugin/xAP), send to Loxone (UDP/xAP/web api), read from Loxone (web api), control amplifier (rs232 plugin), control pc (plugins). Theoretically, I should be able to control it all via the Loxone app, which is good as there is no need for me to design an interface, but ideally I want it all in a web interface... Still quite some work to do... and already so many future plans (e.g. integrate wall switches in the system :)). So little time...

Re: xAP interaction

Posted: Thu Apr 07, 2016 9:28 pm
by kgschlosser
yeah i am all for the web interface also.

i want to use EG to serve that up to tablets around the house for control.

but i will never replace my push button remote for control of my theatre.

best remote to get for that is a one4all remote, it's made by URC.

kewl thing is it's hackable.

so i have 44 buttons per device and i can shift them all meaning each button can do 2 things depending on if you press it or press and hold it.

and since my system is device state aware i coded it so that if the TV is on and the surround isn't the volume button will control the TV automatically.

it does that kind of thing for each device depending on what is turned on in the room you are in.

i took activity based to a whole new level. don't even have to select an activity to use.

it knows.

lol