xAP for Xlobby

Xlobby plugin development

Postby ptrinchi on Thu Feb 10, 2005 8:28 pm

CouchPotatoe > Where I can find the xap schema file to parse to have dynamic list of type of messages, like HS do.
ptrinchi
 
Posts: 108
Joined: Fri Sep 10, 2004 8:52 pm
Location: France

Postby CouchPotatoe on Sat Feb 12, 2005 2:11 am

Hi Pierre,

I've talked with James and he will post a reply shortly on the use of his online schema data which you can use. It's still early days for this but it is what is implemented in HomeSeer currently and the more recent schema should be added anyway so I will make an effort to get everyone to add their updates. It's a great way of keeping applications aware of new schema. Ideal for your application and particularly useful for deciding which data to receive and display.

Kevin
CouchPotatoe
 
Posts: 102
Joined: Tue Feb 24, 2004 11:48 am
Location: Yorkshire. UK

Postby mi4 on Sat Feb 12, 2005 12:40 pm

Pierre,

The schema database that is used by the HS plugin, xAP Desktop and others is split in to 3 text files, Schema, Action and Event.
Schema is where the information needed to detect devices is stored along with data on mapping elements from xAP messages to user friendly qutestion. So in stead of asking mi4.weather.egll:weather.report:Report:windc it can say "Current Wind speed by compass"
Action links directly with the schema file and details commands available to a detected device. For example a Squeezebox music player would have schema file entries for things like "Current track","Artist","Album" and each of these would link to an action of "Play","Stop","Pause" etc.
Event stores information on sending message to any device, whether it has an entry in the schema file or not. So messages like "Send IR to Redrat", "Text to Speech" etc go in here.

Each file is a plain text file and available here
http://www.mi4.biz/downloads/schema.txt
http://www.mi4.biz/downloads/action.txt
http://www.mi4.biz/downloads/event.txt

There is one other file of note here. http://www.mi4.biz/downloads/version.php This lists the current version of the files and applications. There are entries for each of the above files and each will have a number, that number will increase on each revision. So before downloads all the files you can simply check this version file to see if there have been any updates.
Requests to version.php should be in this format;
http://www.mi4.biz/downloads/version.php?AAAABBBccccc
where AAAA is a 4 letter code identifying your application, XLBY for example. BBB is extra elements for identifying but not needed here, so it would be just aaa, and cccccc can be any lenght but should identify the verision of the application. So you would use
http://www.mi4.biz/downloads/version.php?XLBYaaaBeta2 for example

The formats of the three files is failr self explanitory, but has a few slightly confusing bits! I havn't yet got all this fully documented but feel free to drop me a mail if you have any questions ( or just post here of course!). In time I would hope to migrate over to an xml format but theis current one is serving well and is nice and simple to parse, and quick too.

I have setup a bug tracker on mi4.biz where people can post requests for new items to be added to thse databases as well as tracking bug and feature request in my other apps. If there are any features you would like added to the HomeSeer plugin, feel free to post. Especially if it helps better integrate xLobby and HomeSeer!!

Many thanks on making this plugin for xLobby i'm sure many,many people will find it very useful!

James
mi4
 
Posts: 2
Joined: Fri Oct 01, 2004 8:56 pm

Postby ptrinchi on Sat Feb 12, 2005 12:45 pm

Thanks,

Great idea this dynamic schema.
Now I have to code all that into my plug :D
ptrinchi
 
Posts: 108
Joined: Fri Sep 10, 2004 8:52 pm
Location: France

Postby CouchPotatoe on Sat Feb 12, 2005 2:05 pm

It will make for a nice user experience when it is all there and working, having parameters selectable by descriptive text and applications auto updating with new schema. Of course the XLobby FR team may even have a localised version of the descriptions ;-)

It is going to take a bit of implementing though as you say. Getting the seperately configurable target addresses and also being able to perhaps map buttons as BSC devices in xAP will be a much easier task, and a way to display/send text in Xlobby perhaps.. just thinking of the 'easy' bits first to get people familiar with xAP and to save your headaches ;-)

Kevin
CouchPotatoe
 
Posts: 102
Joined: Tue Feb 24, 2004 11:48 am
Location: Yorkshire. UK

Not getting 100% of homeseer devices to show up

Postby siliconmelt on Wed Feb 23, 2005 5:43 pm

I am trying to setup a Xlobby screen with a list of homeseer devices.
I get some to show up and some that don't. I've triple checked all the spelling of the devices and still no luck. I've made sure the Xap conduit was seeing the devices. They do show up in the xap hub as messages.
Sometimes when I restart Xlobby the devices that were reading ok previously don't come back and the others that didn't show previously show up.
I am using "plugin>xap-xlobby>text>Local.Temp"
and "plugin>xap-xlobby>image>Local.Temp" .
The Images are doing the same.

Anyone have any ideas?
siliconmelt
 
Posts: 14
Joined: Fri Feb 18, 2005 7:04 pm
Location: Ft.Myers, Florida

Postby ptrinchi on Wed Feb 23, 2005 8:10 pm

HS don't answer as quickly as you may expect. I think that is why you don't see status or image.
So, if you want more reactivity, you can add xlobby event like "query" to ask HS to return status immediatly.
On our tests we have double each event On or Off with query event.
ptrinchi
 
Posts: 108
Joined: Fri Sep 10, 2004 8:52 pm
Location: France

Postby siliconmelt on Thu Feb 24, 2005 1:24 pm

HS does reply quickly when a device changes. In display of a light for instance, when I change the state of the light the display in Xlobby changes almost immediatly(few milliseconds delay). I think this happens quicker than the actual x10 protocol reaching the physical device.

The problem I am getting is the plugin is not seeing certain HS devices. Even when I change the state of those devices, the plugin still doesn't see them. I do see the bsc messages in the xap viewer. On some devices, HS was setup to put html inside the string, this stopped the plugin from reading the text. I removed the html from the string and the plugin reads the text fine.
siliconmelt
 
Posts: 14
Joined: Fri Feb 18, 2005 7:04 pm
Location: Ft.Myers, Florida

Postby ptrinchi on Thu Feb 24, 2005 2:07 pm

Can you post an example of those messages.

One think more, only messages with xAPBSC.event or xAPBSC.info class will be seen by XL (for the moment)
ptrinchi
 
Posts: 108
Joined: Fri Sep 10, 2004 8:52 pm
Location: France

This is one that works sometimes and sometimes not

Postby siliconmelt on Thu Feb 24, 2005 2:37 pm

xap-header
{
v=12
hop=1
uid=FF412605
class=xAPBSC.event
source=mi4.homeseer.main154.O:Garage.BarLight
}
output.state
{
state=ON
level=100/100
}

I have in Xlobby:
plugin>xap-xlobby>state>Garage.BarLight
plugin>xap-xlobby>text>Garage.BarLight
plugin>xap-xlobby>image>Garage.BarLight
all setup in different items, but none of them see the HS device all the time. And I have images named Garage.BarLight.On.png etc. in xap-Xlobby folder.
siliconmelt
 
Posts: 14
Joined: Fri Feb 18, 2005 7:04 pm
Location: Ft.Myers, Florida

Postby Hiller on Thu Feb 24, 2005 10:58 pm

silicon,

Once you change the device state and you don't see a change in XLobby can you scroll over the text and have it change? This was a problem I ran into when I started my plugin and needed to add a command to automatically refresh XLobby. I don't know if this plugin is having that problem or not but it was my first thought.
Hiller
 
Posts: 149
Joined: Thu Sep 25, 2003 2:39 am
Location: Fredericksburg, VA

Postby ptrinchi on Fri Feb 25, 2005 7:39 am

Hum, it seems to be a good message :? . I don’t understand why it doesn’t work.
The plug-in process is:
Each time the plug-in detect an incoming message with mi4.homeseer as vendor-device and xAPBSC.event or xAPBSC.info as class, it take the STATE and if exist the TEXT information (but not the level for the moment) and it send an invalidate order to XL to redraw the all screen.

Just to understand more, you say that in some case it work well, in this case the message is the same or a bit different? Did you notice some differences between messages that work and messages that don’t? Is it on the same device (Your garage bar light)? Is it on same change on your device (Status changes, label changes, level changes…)?

I will tart some debug with your message, see you soon. :wink:
ptrinchi
 
Posts: 108
Joined: Fri Sep 10, 2004 8:52 pm
Location: France

Postby siliconmelt on Fri Feb 25, 2005 12:12 pm

I will use my garage bar light for my example because it seems to be the most troublesome.
When I turn on the device I get the following xap message:
xap-header
{
v=12
hop=1
uid=FF412605
class=xAPBSC.event
source=mi4.homeseer.main154.O:Garage.BarLight
}
output.state
{
state=ON
level=100/100
}

I have everything setup correctly in xlobby, but no text, status or image shows up on the screen.
It's almost as though the pluggin is not seeing the xap message, yet other devices are displaying fine.
If I shutdown xlobby and bring it back up, some devices are read some aren't. It doesn't seem to be any particular device. They just randomly either work or they don't. When they do work, the text,state,and images change rather quickly which I like.
Is there any limit on the number of devices that xap-xlobby can digest?( I have quite a few HS-xap messages being sent)
siliconmelt
 
Posts: 14
Joined: Fri Feb 18, 2005 7:04 pm
Location: Ft.Myers, Florida

Postby ptrinchi on Fri Feb 25, 2005 3:03 pm

No, the plug is no limited in devices number, but just for curiosity how many messages do you have per minute?
I have made tests with your message and all seems to work properly.
Perhaps it’s a consequence of messages collisions. I will make tests on that way.
ptrinchi
 
Posts: 108
Joined: Fri Sep 10, 2004 8:52 pm
Location: France

Postby ptrinchi on Fri Feb 25, 2005 3:42 pm

siliconmelt, give me your mail by PM if you want to be a béta tester of xAP-Xlobby V2 plugin :wink:
ptrinchi
 
Posts: 108
Joined: Fri Sep 10, 2004 8:52 pm
Location: France

PreviousNext