xAP for Xlobby

Xlobby plugin development

Postby lar282 on Thu Sep 15, 2005 3:57 pm

thanks ptrinchi for all the help.

I got my X10 working too now.

this Xap stuff is really neat

//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Postby briands on Thu Sep 15, 2005 7:29 pm

Is there a newB users guide to setting this up for X10. Any recomended hardware for the X10. Can it receive signals say from a motion detector and respond?

Thanks. If this exists in documentation somewhere, please point the way.
briands
 
Posts: 84
Joined: Fri Oct 29, 2004 6:31 pm
Location: Louisville

Latest version?

Postby Bill Lott on Fri Sep 16, 2005 1:20 am

I'm no longer able to toggle devices in Homeseer. The device status received from Homeseer is working correctly, but no toggle function. I'm wonderng if perhaps my xLobby plug-in is corrupted. I'm using ver 2. Is this the latest version? Where can I get a udated copy?

Thanks,
Bill
Bill Lott
 
Posts: 293
Joined: Sun Sep 05, 2004 3:25 pm
Location: Louisville, KY

Postby lar282 on Fri Sep 16, 2005 6:05 am

briands wrote:Is there a newB users guide to setting this up for X10. Any recomended hardware for the X10. Can it receive signals say from a motion detector and respond?

Thanks. If this exists in documentation somewhere, please point the way.


The plugin works with my CM11usb(it works with all Xap messages,so find a Xap application and it'll work) and I got a motionsensor as well, but that only turns a lamp on so I never tried to catch any mess from that one. I think if u read the entire post here youll get the drift on how to set it up. It wasn't that hard and it comes down to 2 files. one for sending and one for recieving. plus u need a hub running. if u got spec hardware let us know and I can help out as good as I can.

//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Postby CouchPotatoe on Fri Sep 16, 2005 12:22 pm

ptrinchi wrote:
Is this new one done?
The new version is actually in test with the Xlobby French team. I will probably post it in the beginning of October.
Did I understand it right that I do not need anything else than this plugin. No homeseer, no service running no nothing exept the new plugin with a GUI?
This version will be a xAP Hub, so you will not need anything else to make working together Xlobby and xAP world


Hi Pierre,

Great stuff, a couple of thoughts. Please be really careful with the hub coding and methodology as the hub is fundamental to every xAP app running on that PC - if it fails then every xAP app on that PC fails - as they will become deaf . Likewise should XLobby be exited all xAP apps would fail. So.. you should consider things like running the hub as a service or a separate application and/or auto restarting the hub on any failure. This is why we recommend keeping the hub app separate and probably implemented as a service launched at startup and OS managed to 'auto restart' should it ever fail. However on an XLobby dedicated PC (where XLobbby is always running) then I can see your approach is attractive.

Also , just a tip that has caught us in the past...be careful when there is more than 1 network interface available in a PC , such that you select the right one. This happens more and more frequently now when IP can be routed over inbuilt RF interfaces like WiFi , Bluetooth etc.

Lastly we have some new aspects of xAP that will be announced very soon that do effect hub applications - specifically we will be expanding the UID to allow for more sub addresses - a frequent request. Currently only 254 are available , in the future this will not be limited. This means the UID format is changing.

Please do keep in touch with us on these issues such that we can ensure your app works as seamlessly as possible with any changes we make to the xAP spec and also you can benefit from the experiences existing hub authors have faced . The xAP Developer forum on Yahoo groups is the place for this. Also please do include us in your testing of the new version , particularly as it will have the hub functionality in there and that can impact every application. - even if it's all in French initialy ;-)

Kevin

kevin <at> xapautomation <dot> org

PS - I am looking at this toggle issue now - will report back here.
CouchPotatoe
 
Posts: 102
Joined: Tue Feb 24, 2004 11:48 am
Location: Yorkshire. UK

Postby ptrinchi on Fri Sep 16, 2005 9:25 pm

Thanks for the recommendations Kevin,

I added the hub functionality for those who use xlobby on dedicated computers only. I added also functions that allow xlobby to start a list of xAP apps and close the same list on exit for the same reason. Some people wanted to do only simple actions like stopping light before a film (Xlobby with x10 connector). Even, I agree with you and I think that a separate hub as a service is the best solution. So it starts as a hub server only if no other hub is detected on the computer. Perhaps I will disable this functionality after my tests for the reasons you invoke.

The expansion of the range for UID is good news, how about compatibility with old xap apps?

Now I start my “summer holiday” this weekend for two weeks but as quickly as possible I will keep in touch with you on the xAP developer forum :D thanks

See you soon
ptrinchi
 
Posts: 108
Joined: Fri Sep 10, 2004 8:52 pm
Location: France

Postby CouchPotatoe on Fri Sep 16, 2005 11:20 pm

ptrinchi wrote:Thanks for the recommendations Kevin,

I added also functions that allow xlobby to start a list of xAP apps and close the same list on exit for the same reason. Some people wanted to do only simple actions like stopping light before a film (Xlobby with x10 connector).


I think that's a great feature.. xAP applications can get 'messy' as you have to make sure all the individual parts are present . Managing them as one start/stop in specific environment like XLobby is ideal..

Kevin

PS Bon vacances :-)
CouchPotatoe
 
Posts: 102
Joined: Tue Feb 24, 2004 11:48 am
Location: Yorkshire. UK

Postby Aaron on Sat Sep 17, 2005 12:16 am

ptrinchi wrote:I added the hub functionality for those who use xlobby on dedicated computers only. I added also functions that allow xlobby to start a list of xAP apps and close the same list on exit for the same reason. Some people wanted to do only simple actions like stopping light before a film (Xlobby with x10 connector). Even, I agree with you and I think that a separate hub as a service is the best solution. So it starts as a hub server only if no other hub is detected on the computer. Perhaps I will disable this functionality after my tests for the reasons you invoke.


ptrinchi,
I will definitely be using this to interface XLobby into Homeseer. I currently have Homeseer setup for "scenes" that set lighting and such when I'm going to watch a movie. This will be perfect for using XLobby as a true front-end for home automation!

... XLobby and Homeseer will be running on the same PC in my situation.
Aaron
 
Posts: 299
Joined: Fri May 07, 2004 3:50 am

Postby Michael McSharry on Thu Sep 29, 2005 10:46 pm

I'm also trying to give both XLobby and the xAP-XLobbyplugin a spin. I believe I have installed both Xlobby and the plugin. I'm able to use the existing music, weather, etc from XLobby. I can see the xAP-XLobby plugin heartbeat in the xAP Viewer.

When I go to define an event there is an LightsOn one and in the command field I assign Plugin:xAP-XLobby, Command: Basic Control: On Variables bedroom.fan. Then use the Test button and get a message box of an unhandled exception with the message "The xAP message value is malformed. No part of the address value may contain space characters" and the detail of the dump



************** Exception Text **************
System.FormatException: The xAP message value is malformed
No part of the address value may contain space characters
at KCS.xAP.Framework.Message.xAPAddressBase..ctor(String address)
at KCS.xAP.Framework.Message.xAPTargetAddress..ctor(String target)
at xAPSpace.xAP.Execute(String command)
at xlobby2.Command.Run(Control control)
at xlobby2.Setup.button56_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/winnt/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
xlobby2
Assembly Version: 1.0.1956.42388
Win32 Version: 1.0.1956.42388
CodeBase: file:///C:/XLobby/xlobby2.exe
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/winnt/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/winnt/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/winnt/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
XPluginSDK
Assembly Version: 1.0.1937.25036
Win32 Version: 1.0.1937.25036
CodeBase: file:///C:/XLobby/XPluginSDK.DLL
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/winnt/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/winnt/assembly/gac/system.runtime.remoting/1.0.5000.0__b77a5c561934e089/system.runtime.remoting.dll
----------------------------------------
xAP-Xlobby
Assembly Version: 1.0.2018.31551
Win32 Version: 1.0.2018.31551
CodeBase: file:///c:/xlobby/plugins/xap-xlobby/xap-xlobby.dll
----------------------------------------
xAPMessage
Assembly Version: 1.2.9.6
Win32 Version: 1.2.9.6
CodeBase: file:///C:/XLobby/xAPMessage.DLL
----------------------------------------
xAPTransport
Assembly Version: 1.2.9.0
Win32 Version: 1.2.9.0
CodeBase: file:///C:/XLobby/xAPTransport.DLL
----------------------------------------
KCS.Utilities
Assembly Version: 1.1.0.2
Win32 Version: 1.1.0.2
CodeBase: file:///C:/XLobby/KCS.Utilities.DLL
----------------------------------------
XoapWeather
Assembly Version: 1.1.1729.14788
Win32 Version: 1.1.1729.14788
CodeBase: file:///c:/xlobby/plugins/xoapweather/xoapweather.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/winnt/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
0xhbfnre
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/winnt/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
XWeather
Assembly Version: 1.0.1577.33604
Win32 Version: 1.0.1577.33604
CodeBase: file:///c:/xlobby/plugins/xweather/xweather.dll
----------------------------------------
Interop.Shell32
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/XLobby/Interop.Shell32.DLL
----------------------------------------
System.Management
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/winnt/assembly/gac/system.management/1.0.5000.0__b03f5f7f11d50a3a/system.management.dll
----------------------------------------
AxInterop.SHDocVw
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/XLobby/AxInterop.SHDocVw.DLL
----------------------------------------
Interop.ActiveHomeScriptLib
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/XLobby/Interop.ActiveHomeScriptLib.DLL
----------------------------------------
Accessibility
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/winnt/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.



An xAP message was sent and it looks to be of proper form to me




xap-header
{
v=12
hop=1
uid=FFABCD00
class=xAPBSC.cmd
source=PTrinchi.Xlobby.mcs5
target=mcs.mcsXap.*:bedroom.fan
}
output.state
{
id=*
state=On
}
Michael McSharry
 
Posts: 1
Joined: Wed Sep 28, 2005 1:49 am
Location: North Bend, WA

Postby CouchPotatoe on Fri Sep 30, 2005 12:08 am

Michael McSharry wrote:


An xAP message was sent and it looks to be of proper form to me




xap-header
{
v=12
hop=1
uid=FFABCD00
class=xAPBSC.cmd
source=PTrinchi.Xlobby.mcs5
target=mcs.mcsXap.*:bedroom.fan
}
output.state
{
id=*
state=On
}




Actually the message is badly formed but that's not the cause of the error you're seeing here...

the block name is incorrect - it should be


}
output.state.1 <<note the index suffix .1
{
id=*
state=On
}



... from the BSC spec...

" A message in xAPBSC.cmd will include a body part(s) titled output.state.n. One body part per endpoint to be controlled will be included and these will be indexed sequentially output.state.1 output.state.2 etc. Thus several endpoints can have their state changed instantaneously "

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

Postby Hiller on Fri Sep 30, 2005 5:18 pm

Michael,

Take a look on the left hand side of the Event Manager and click on the event that you added. Make sure that the device you are targeting in actually in the field. There is a quirk when you click add and you need to double check the command...

Steve
Hiller
 
Posts: 149
Joined: Thu Sep 25, 2003 2:39 am
Location: Fredericksburg, VA

error when using "Test" button...

Postby Aaron on Sun Oct 09, 2005 6:23 am

push button, get crash...

Code: Select all
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
KCS.xAP.Framework.xAPException: The xAP message value is malformed
No part of the address value may contain space characters
   at KCS.xAP.Framework.Message.xAPAddressBase..ctor(String address)
   at KCS.xAP.Framework.Message.xAPTargetAddress..ctor(String target)
   at xAPSpace.xAP.Execute(String command)
   at xlobby2.Command.Run(Control control)
   at xlobby2.Setup.button56_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
xlobby2
    Assembly Version: 1.0.2098.28537
    Win32 Version: 1.0.2098.28537
    CodeBase: file:///C:/Storage/Electronics/xlobby2/xlobby2/xlobby2.exe
----------------------------------------
System.Drawing
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
XPluginSDK
    Assembly Version: 1.0.2020.31144
    Win32 Version: 1.0.2020.31144
    CodeBase: file:///C:/Storage/Electronics/xlobby2/xlobby2/XPluginSDK.DLL
----------------------------------------
System.Xml
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system.runtime.remoting/1.0.5000.0__b77a5c561934e089/system.runtime.remoting.dll
----------------------------------------
CDEX
    Assembly Version: 1.0.1685.4787
    Win32 Version: 1.0.1685.4787
    CodeBase: file:///c:/storage/electronics/xlobby2/xlobby2/plugins/cdex.dll
----------------------------------------
xusbuirt
    Assembly Version: 1.0.1767.29466
    Win32 Version: 1.0.1767.29466
    CodeBase: file:///c:/storage/electronics/xlobby2/xlobby2/plugins/xusbuirt.dll
----------------------------------------
xAP-Xlobby
    Assembly Version: 1.0.2018.31551
    Win32 Version: 1.0.2018.31551
    CodeBase: file:///c:/storage/electronics/xlobby2/xlobby2/plugins/xap-xlobby/xap-xlobby.dll
----------------------------------------
xAPMessage
    Assembly Version: 1.2.9.12
    Win32 Version: 1.2.9.12
    CodeBase: file:///C:/Storage/Electronics/xlobby2/xlobby2/xAPMessage.DLL
----------------------------------------
xAPTransport
    Assembly Version: 1.2.9.2
    Win32 Version: 1.2.9.2
    CodeBase: file:///C:/Storage/Electronics/xlobby2/xlobby2/xAPTransport.DLL
----------------------------------------
KCS.Utilities
    Assembly Version: 1.1.2.1
    Win32 Version: 1.1.2.1
    CodeBase: file:///C:/Storage/Electronics/xlobby2/xlobby2/KCS.Utilities.DLL
----------------------------------------
XoapWeather
    Assembly Version: 1.1.1729.14788
    Win32 Version: 1.1.1729.14788
    CodeBase: file:///c:/storage/electronics/xlobby2/xlobby2/plugins/xoapweather/xoapweather.dll
----------------------------------------
System.Data
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
2p5ytqf0
    Assembly Version: 0.0.0.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
XWeather
    Assembly Version: 1.0.1855.39961
    Win32 Version: 1.0.1855.39961
    CodeBase: file:///c:/storage/electronics/xlobby2/xlobby2/plugins/xweather/xweather.dll
----------------------------------------
Interop.Shell32
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Storage/Electronics/xlobby2/xlobby2/Interop.Shell32.DLL
----------------------------------------
AxInterop.SHDocVw
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.0.0
    CodeBase: file:///C:/Storage/Electronics/xlobby2/xlobby2/AxInterop.SHDocVw.DLL
----------------------------------------
Interop.ActiveHomeScriptLib
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Storage/Electronics/xlobby2/xlobby2/Interop.ActiveHomeScriptLib.DLL
----------------------------------------
System.Management
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system.management/1.0.5000.0__b03f5f7f11d50a3a/system.management.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
Aaron
 
Posts: 299
Joined: Fri May 07, 2004 3:50 am

Postby Aaron on Sun Oct 09, 2005 8:44 pm

A few questions...

1) seems like http://www.xapframework.net is down?

2) do I need xAP Hub GUI on my XLobby machine for it to talk to Homeseer?

3) how do I use dim levels within XLobby to set them in Homeseer for a device?

I'd like to create an XLobby interface that duplicated my web interface. As you can see from the web interface below, it allows direct selection of a dim level using the segments in the "LED Ramp" for each device. As the dim level state of the device changes, the LED segments light up to that level... see Kitchen Lights and they are lit to 60%, Master Bedroom is at 100%, etc.

Image
Aaron
 
Posts: 299
Joined: Fri May 07, 2004 3:50 am

Postby CouchPotatoe on Mon Oct 10, 2005 12:55 am

Hi Aaron

1) xAPFramework.Net is working here for me.. Do post back if it's still not working. I know James had a routing issue with some US sites not being able to access mi4 a while back - varied depending on teh ISP that the US users were conencted via - and I believe xAPFramework uses the same servers so maybe there's still a glitch somewhere.

2) You need a hub if there is more than 1 xAP application (of any description) running on that PC. If there is just one application ie only XLobby for example then you don't need a hub. So if HomeSeer and XLobby (or xAP Viewer) are running on the same machine yes you do. If they are on different machines then you dont. Make sure teh hub is the very first xAP application to start . It doesn't have to be the GUI hub - you can run a service hub too (which ensures it starts first).

3) I am not an XLobby expert but it would seem you can create a whole series of buttons that would replace all those on your web interface - I'm not sure if you could get the level feedback working though - to change the colour of the levels as you show.

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

Postby Aaron on Mon Oct 10, 2005 2:46 am

I'm not getting to xAPFramework.net at all... strange.

I don't need the huib, which is cool.


As for the images and status... I'm hoping that James can extend the functionality of the plug-in to be able to do some more complex images in the GUI and do Dim levels with the commands.
Aaron
 
Posts: 299
Joined: Fri May 07, 2004 3:50 am

PreviousNext