Basic Home Automation via xAP BSC enabled devices (updated 9-01-2008) (1 Viewer)

TritonT

Portal Pro
October 23, 2006
103
62
Home Country
United Kingdom United Kingdom
Patrick, you Sir are a legend.

1. Thanks, fine in 2.0g

2. Thanks, left align is good, right align a bit more problematic (but then it often is in MediaPortal!), doesn’t matter to I only wanted left!

3. Thanks, perfect.

4. Thanks, the range setting looks great. This is all that’s needed for devices that report the values that you want to show, such as temperature.
However, for example I have a friend with a water level contraption connected to a Netiom that reports using BSC on a scale 0-1023, this means very little, however by multiplying this number by 0.00255 it is now a accurate gauge in metres, this is what he wants to show. I think that by providing a multipler option followed by an offset option (zero is rarely zero in these things) I think you can cover all linear analogue sensors, be they water level, voltage, humidity, daylight or whatever.

5. I didn’t really mean anything that complicated. All I wanted was to be able to put the xAP icon on the OSD message, so that it would be easy to tell that the message was coming from the xAP plugin.

Screenshot

Below is an example of the message format I have been sending, it works fine apart for the ‘Line5=And finally a fourth!’ never appears.

xap-header
{
v=12
hop=1
uid=FF456200
Class=message.display
Target=MEPO.BHAConn.abit-ic7.OSD.1
Source=mi4.floor.ABITIC7
}
Display.text
{
Line1=This is the title
Line2=This is the first line of text
Line3=And a second one
Line4=Even a third
Line5=And finally a fourth!
Priority=1
Duration=20
}
Display.look
{
Align=Left
}

6. I’ll ask.

I have amended the Replicant and ReVision skins and put then at the bottom of this post. Thanks again.


@ odin318

Yes, Patrick is right Z-Wave is not yet supported by xAP (there has been talk about someone writing a connector for a long time but it hasn’t happened yet, as far as I know), but thats not quite the end of the story. Z-Wave is supported by xPL and there are 2 possibilities available to translate the xPL messages into xAP messages, they are:

Floorplan 1.2
xapmcsHub xAP/xPL

So theoretically you could have:

Z-Wave Controller – xPLZWave node (with ControlThink Z-Wave SDK.& xPLHal) – xapmcsHub – MediaPortal plugin.

I have not yet tried this! But I am planning on having a go as soon as I have got the time.


Revised skin files:

Replicant & ReVision Skins

Please note that to get the word ‘Automation’ at the top you need to add <String id="9195">Automation</String> to your strings file in the Language folder.
 

patrick

Portal Pro
April 20, 2005
608
45
Southeast
Home Country
United States of America United States of America
TritonT,

I will be uploading an update soon.

1. Glad its working now.

2. I found another bug in the text alignment and have hopefully fixed it.
(Right align may still be flaky though)

3. :)

4. Not sure how to implement that.
Do you mean perform the multipler and THEN use the offset on the result?
For example with 500 as the value and a multipler of 0.00255 and an offset of 25.
So: ((500*0.00255) + 25) = 26.275
And now take 26.275 and place it within the Low/High Range?

5. Using you sample message adding a Image= to the "look" section should allow
an image in the OSD. You "should" also be able to use the Display.Web section
but I found a bug (fixed now) that would do the same.
Code:
Display.look
{
Align=Left
Image=C:\Myfolder\Automation\xAP.png
}
or
(after next update)
Code:
Display.Web
{
Pic=C:\Myfolder\Automation\xAP.png
}


Thanks,
patrick
 

TritonT

Portal Pro
October 23, 2006
103
62
Home Country
United Kingdom United Kingdom
4. Yep that's what I mean - I think my logic is correct!

For most linear sensors the offset +/- number would not be required, but I think some people may require it, for example pressure sensors that read high by a certain amount.

As a simple example, a AA battery tester connected to a Netiom xAP:

The Netiom reads voltage on a 0 to 5v scale and reports this as on a scale of 0 to 1023 so we multiply by 0.00489 to get it back to a 0-5 scale. We don't need an offset cause 0 really is 0 (no sensor calibration required here, its only a battery). But when we display the range we want 1.5v to be the max, cause its only ever going to see 1.5v batteries.

Obviously this is minority interest as most people will use the plugin for X10 control, so if you don't have time or you think it complicates the tab in the configuration too much don't give it another thought.

5. Display.look works great - can now send icons for any reported event!

Over the next couple of weeks, I'm going to have a go at some 1-wire and iButton stuff using Michael McSharry's xapmcs1Wire node, I'll report back.
 

jazzjazzy

Portal Member
June 29, 2007
5
0
Home Country
OK I am going to ask a very real newbie question hear, But I really can't find it any where.

How do you install this plug-in? (sorry :) )

its just I have looked all over and can't find anything other then

"Notes:
Only tested with recent SVN and BlueTwo Skin.
Very Beta so does a lot of logging and may cause problems
Readme included in the zip file."

at the begining of this thread, but I have download v0.1 and v0.2 and niether have a readme.

if anyone could point me in the right direction, I would be much appreciated
 

patrick

Portal Pro
April 20, 2005
608
45
Southeast
Home Country
United States of America United States of America
at the begining of this thread, but I have download v0.1 and v0.2 and niether have a readme.

My fault. I probably forgot to include the readme.

In the main download (BasicHomeAutomation-v0.2g.zip) there are
two additional zip files.
The one you want is: BasicHomeAutomation-BIN-v0.2g.zip
(The other is the source code)

Just unzip BasicHomeAutomation-BIN-v0.2g.zip to you MP folder
(preserving directories AND overwrite existing files)

This should install the plugin and all the files.

Should extract the files to:
MediaPortal\BHACore.dll
MediaPortal\xAPMessage.dll
MediaPortal\xAPTransport.dll
MediaPortal\KCS.Utilities.dll
MediaPortal\System.Data.SQLite.dll
MediaPortal\plugins\BHAPlugins\BHAxAPController.dll
MediaPortal\plugins\process\BHAProcessPlugin.dll
MediaPortal\plugins\windows\BHAWindowPlugin.dll
(Plus several skin and thumbs files)

Note: You will HAVE TO OVERWRITE or rename the files that are installed
with MediaPortal with the ones in this plugin.
MediaPortal\xAPMessage.dll
MediaPortal\xAPTransport.dll
MediaPortal\KCS.Utilities.dll



I will try to remember to include it in the next update.

HTH,
patrick
 

Kaoh

Portal Pro
September 11, 2006
244
28
Home Country
Netherlands Netherlands
It is a usb device, but it gives me a com port as a regular interface. Anyway.. I'll try that other solution later.

Did you solve this problem? I am having this problem but with the native X10 plugin, and will give this one an attempt tomorrow.
Ill keep you posted if this helps, I also own a Marmitek CM11 USB version.
 

Kaoh

Portal Pro
September 11, 2006
244
28
Home Country
Netherlands Netherlands
I gave this plugin a try, with my CM11 USB device. However no matter what I try it does not work :(
The device is a USB to serial device and emulates a comm port on my machine. This means any app needs to communicate to this controller using comm 3 in my case.
The native plugin requires some connector, and that just wont do anything as far as I can tell, but since there is no reall way to see what every piece of this puzzle is doing, I can not really determine what step fails :(
Same goes for this plugin, I have no idea what I should run or what is failing and why.

Can you give me any pointers how to solve this?

For example I tried the connector from this page: http://www.edjo.pwp.blueyonder.co.uk/edward/xAP/X10/x10_main.htm (see first post) but I have no clue if it works or not. How does one test if the connector even works to start with.
Then I do I configure this plugin to use that connector.

I tried both the service as the gui version, but I do not find that the GUI actually configures the services like everyone says it does ;)

Please help! :(

Because the standard software is so bad, and does not serve as base for the MP interface ;)
 

PTCoder

Portal Member
April 11, 2006
25
1
47
PORTUGAL
Home Country
Portugal Portugal
Try installing the xAP Hub and Viewer available on that same site.
With the viewer you are able to see xAP messages sent by any app.
Also on your xAP X10 Connector (GUI version) be sure to configure your devices in File/Properties, the app comes pre-configured with demo devices, you have to substitute these by your real ones.
 

Users who are viewing this thread

Top Bottom