xAPFlash
In case you missed this:
http://www.automatedhome.co.uk/vbulletin/showthread.php?p=15441
Well its a typo, 127.0.0.1 change to your hah ip, well i tried this but the ip on the smaple file (Bret's) on the wiki on HAH has a 192.168.X.X address.
anyaway cahnegd that changed UID but all i get is XAP in big letters on a black background?
Anyone else any problems with the sample files? what else do i need to change?
By the way superb Job,,,now about that how to for android....
Ta
P.s my original config xapconfig files work fine? and yes i copied over the buttons icons etc
I have updated the installation instructions for the HAH sample so it can be all done on the joggler. Derek has tried this on a virgin joggler that has never been hacked and it all went fine... so I'm not sure what's up? Perhaps try again also make sure you have the latest xapflash app.... run the install it should update your copy.
I think you might have jumped the gun and downloaded the sample before I had ironed out a bug that I found when I was working with Derek... do download this again I'm sure it'll be ok now.
Really looks like a flexible tool for creating control panels to drive xAP enabled environments!
I do not have a Joggler but got it working in browser locally on Linux and also in browser on Windows by publishing it via Apache. Same config works in parallel.
Have question about using <generic> tag. If I should get data visible (as I don't) with following setup, posting same from hah to Pachube (source: dbzoo.livebox.Plugboard, class: xAPBSC.ccel, section: input.state, key: text)?
<button NAME="phasetotal">
..
<xAP>
<schema>generic</schema>
<uid>*</uid>
<source>dbzoo.livebox.Plugboard</source>
<generic>
<Class>xAPBSC.ccel</Class>
<body>input.state</body>
<parameter>text</parameter>
</generic>
</xAP>
..
</button>
Regards,
Aivo
You cross posted to the xAPFlash group as well, which is really the right place to try and keep problems tracked..
- anyway I think it's a background issue - see my post here... let me know if this fixed it for you..
K -.-
http://www.automatedhome.co.uk/vbulletin/showpost.php?p=15455&postcount=4
Hi Aivo,
Can you post me a copy of the actual xAP message HAH is sending ? Copy it from a xFX Viewer window if needs be. There's a few things wrong with that XML (UID / Source and Class) but I'll try and pull them all together when I see the exact message.
K
Just for info..
All schema that start class=xAP... are formal xAP schema and as such you must rigidly adhere to their specification (xAPBSC.ccel is not permitted). You mustn't start your own custom schema classes with the letters xap - but you can create your own schema named anything else..
If you do use the xAPBSC schema then it requires you use sub addressing i.e the endpoint name is appended to the source address after a : and the UID must be managed to contain a sub address ID at the end.
Although BSC appears fairly simple it is a two way schema and so needs to handle queries, cmd's etc and periodic status reports. I haven't ventured into LUA yet but I don't think there is a library yet that implements a BSC device for you ( or is there ?). If you are just wanting to report some information that you would like to display on the Joggler probably better to use another schema.
K
>I haven't ventured into LUA yet but I don't think there is a library yet that implements a BSC device for you ( or is there ?).
Brett rolled a very comprehensive Lua library that makes the construction of a BSC endpoint a breeze.
http://www.dbzoo.com/livebox/hah_plugboard_v2#bsc
Derek.
Ahh - he's a good lad :-) Very useful..
I'll read up on the library ... Aivo possibly just need to sort the class out (and maybe source/uid)...
K
Hello Kevin,
Note taken on formal schema! Actual xAP message in viewer looks like this:
xap-header
{
uid=FF00D800
source=dbzoo.livebox.Plugboard
hop=1
class=xAPBSC.ccel
target=dbzoo.livebox.CurrentCost:script
v=12
}
input.state
{
state=on
text=3850
displaytext=3850 watts
}
Regards,
Aivo
Well you need to change this
class=xAPBSC.ccel
to
class=xAPBSC.event
And why are you targetting this endpoint?
target=dbzoo.livebox.CurrentCost:script
xap-currentcost does not expose anything like this.
And if you are delivering something like this as a BSC endpoint you can can't source it from dbzoo.livebox.Plugboard
How about we go back to 1st principles, as you've got many things wrong .... what are you trying to do?
Brett
Hi Brett,
What I am achieving like this is matching for Datastream on hah Automation\Pachube panel. Elements usable there are source/class/section/key. The way I approached this .. As event is coming from lua applet, source is always dbzoo.livebox.Plugboard. Not to match all events I invented/needed unique class. Target is "any" to have target from complete message point of view.
I do see now that class=xAPBSC.ccel and target=dbzoo.livebox.CurrentCost:script an incorrect from formal schema point of view. They make no harm however in my closed environment and work e.g. for the Pachube posting ;)
If there would be instead say class=aivo.ccel and target=aivo.hah.script would it be different, i.e. work for xAPFlash?
Regards,
Aivo
It sounds like the problem you had was that you need a unique source, but could not do this, so you created a unique class as a workaround. If you use the BSC lua class you are able to create your own unique SOURCE which is fully BSC compliant. This makes it much easier to integrate with xAPFlash and other 3rd party applications.
If you post your LUA applet (start a new thread for this) I can take a look and advise as to how this should be constructed as BSC and integrated into xAPFlash.
Here is something you might not know. When the flash application starts up every xAPBSC schema registered target is sent a xAPBSC.query message to fetch its initial value. If you make up your own schema a value will not be rendered until the endpoint transmits. BSC gives you *much* better integration than making up your own. However you have got to adhere to the spec you are not a closed shop once you start integrating with other xAP applications.
Brett
Nice new wiki post Brett, you've been busy! I'm sure you and Kevin will get some support on this. Thanks Kevin for making this public.