xPL and DomotiGa

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

jdr0berts
Starting Member
Starting Member
Posts: 16
Joined: Fri Apr 13, 2012 1:17 pm

xPL and DomotiGa

Post by jdr0berts »

OK, so having successfully got my lamp turning on at sunset......

I have a squeezebox which is connected to a powered speaker set up, I'd like to switch the speakers on/off when the squeezebox turns on and off.... using xPL. When xPL is enabled on Logitech Media Server (LMS), and using an xPL_Hub and xPL_Logger on my desktop, I can see both the heartbeat and the status changes from the Squeezebox (containing the all important Power=1, or Power=0).

My intention is to use the xPL module, which I've installed following the wiki instructions.

First question - I see the following message in the debug log whenever I turn of/off the squeezebox:

Code: Select all

[xPL] Invalid xPL message recieved! 
1) How can I find outt what is being recieved, and why it's invalid?

Secondly,

2) How do I capture an xPL message as a trigger - I assume I need to solve 1) first?

Thanks
James
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: xPL and DomotiGa

Post by RDNZL »

xPL support in DomotiGa is quite new, and was introduced when RFXLAN with xPL firmware came available.
So it's all focused on supporting that, until I come up with a flexible solution to add more xPL messages, so any ideas how to do this nicely are welcome.
Do you see the squeezebox messages with xPl debug on?
Regards, Ron.
jdr0berts
Starting Member
Starting Member
Posts: 16
Joined: Fri Apr 13, 2012 1:17 pm

Re: xPL and DomotiGa

Post by jdr0berts »

Hi Ron,

OK - I've been giving it some thought and started having a look at some code last night (it's been many years since I wrote any code).

I'm thinking that incoming xPL messages be added as triggers, configuration would need to allow multiple conditions, using my own example use here, I'd need:
IF source = "slimdev.squeezebox.bedroom"
AND power = 1

That's not ideal, as it is comparing items from two different parts of the message, the header and the schema part.

I'm not seeing the message from the squeezebox - I just get "[xPL] Invalid xPL message received!"
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: xPL and DomotiGa

Post by RDNZL »

When the database design is changed and devices can have as many values as we want we can create universal xPL device types for each xPL msg format, and store values from a msg in those values, then we can trigger on them, and send xPL commands when we change them.

If you enable xPL debug in DomotiGa what do you see?
You should see [xPL] < followed by raw xPL data.
Regards, Ron.
jdr0berts
Starting Member
Starting Member
Posts: 16
Joined: Fri Apr 13, 2012 1:17 pm

Re: xPL and DomotiGa

Post by jdr0berts »

Hi,

My mistake - I thought I'd turned on debug for xPL, I hadn't, but when I did, I saw the correct xPL message - it seemed the error was generated by the domotiga heartbeat - though I haven't checked this.

Anyway, as far as integration goes - I hadn't realised there was a dedicated squeezeserver interface, now I have, and now it's enabled, I have exactly what I wanted - turn on or off the speakers/amp associated with a squeezebox :)

Cheers
James
rihiveli
Starting Member
Starting Member
Posts: 8
Joined: Wed Oct 03, 2012 5:48 pm

Re: xPL and DomotiGa

Post by rihiveli »

HI,

I try to interface XBMC and domotiga in order to manage lights when a video is played/stopped/paused
I just activate xpl and debug option on Domotiga and RFXcom.
XBMC messages appear on log:

Code: Select all

2012/10/03 16:58:21 [xPL] Didn't find any matching xPL interface with source address 'parasit-xbmc.ubuntu'
2012/10/03 16:58:21 [xPL] < xpl-stat
{
hop=1
source=parasit-xbmc.ubuntu
target=*
}
hbeat.app
{
interval=1
port=50001
remote-ip=192.168.0.130
version=1.0
}
But how can I create a xpl Device in order to add action accordind to XBMC value ?
Is it possible on version 1.0 of domotiga ?

thanks a lot
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: xPL and DomotiGa

Post by RDNZL »

It's currently not possible.
But can you point me to the docs for XMBC's xPL interface, and I will see if I can code it.
Is there a live XBMC image somewhere so I can get is running fast to test?
Regards, Ron.
rihiveli
Starting Member
Starting Member
Posts: 8
Joined: Wed Oct 03, 2012 5:48 pm

Re: xPL and DomotiGa

Post by rihiveli »

Thanks RDNZl for your reply !

There are few examples of xbmc xpl message on this page but it's in french : http://connectingstuff.net/blog/integre ... eseau-xpl/

All details regarding XBMC xpl pluging are here : https://github.com/fredrikaubert/boxee-xPL

If I can help you to test or anything else, don't hesitate to tell me.
rihiveli
Starting Member
Starting Member
Posts: 8
Joined: Wed Oct 03, 2012 5:48 pm

Re: xPL and DomotiGa

Post by rihiveli »

example of play / pause / stop message

Code: Select all

2012/10/03 20:08:08 [xPL] < xpl-stat
{
hop=1
source=parasit-xbmc.ubuntu
target=*
}
media.mptrnspt
{
mp=xbmc
command=play
kind=video
}

Code: Select all

2012/10/03 20:08:12 [xPL] < xpl-stat
{
hop=1
source=parasit-xbmc.ubuntu
target=*
}
media.mptrnspt
{
mp=xbmc
command=pause
kind=video
}

Code: Select all

2012/10/03 20:02:17 [xPL] < xpl-stat
{
hop=1
source=parasit-xbmc.ubuntu
target=*
}
media.mptrnspt
{
mp=xbmc
command=stop
kind=video
}
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: xPL and DomotiGa

Post by RDNZL »

Building it right now, OSD is already working ;-)

Code: Select all

2012/10/05 21:42:00 [xPL] > xpl-cmnd
{
hop=1
source=domotiga-xpl.ron-desktop
target=parasit-xbmc.ronxbmc
}
osd.basic
{
command=write
delay=10
text="This is DomotiGa shouting!"
}
So hold on 8)
Regards, Ron.
BreFra
Starting Member
Starting Member
Posts: 21
Joined: Wed Jan 06, 2010 10:44 pm

Re: xPL and DomotiGa

Post by BreFra »

Nice! XBMC support in DomotiGa is on my wish list too....
rihiveli
Starting Member
Starting Member
Posts: 8
Joined: Wed Oct 03, 2012 5:48 pm

Re: xPL and DomotiGa

Post by rihiveli »

Thanks a lot !
rihiveli
Starting Member
Starting Member
Posts: 8
Joined: Wed Oct 03, 2012 5:48 pm

Re: xPL and DomotiGa

Post by rihiveli »

Hi Ron,

I see that you added XBMC support on last version !
I will test it

Thanks a lot !
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: xPL and DomotiGa

Post by RDNZL »

Yes, correct.

But it's finished for 99%, I'm not sure where to store the player states that xbmc reports, maybe these have to be changed.
I have put them in a device somewhere you will see.

But you can set pause/play player, display osd texts.

I also have some thoughts about merging RFXComxPL and XBMCxPL to a generic xPL module, not sure how to address the devices then (say the rx/tx address for rfxcom etc.
Regards, Ron.
rihiveli
Starting Member
Starting Member
Posts: 8
Joined: Wed Oct 03, 2012 5:48 pm

Re: xPL and DomotiGa

Post by rihiveli »

Hi,

I did the setuo of XBMC Xpl interface with source and destination = parasite.xbmc-ubuntu. I activate
logs and msg from xpl are recognized.

Now I try so setup a device in order to store XBMC player status but did several test and I don't know how. What I'm suppose to put on address field (id) of the device ?

The goal is to create a trigger according to status of xbmc.

thanks for your help :)
Post Reply

Return to “DomotiGa Forum”