hello
this simple script
module(...,package.seeall)
require("xap")
require("xap.bsc")
info = {version="0.04", description="HAH LCD Clock"}
function init()
xap.Timer(doclock, 5):start()
end
function doclock()
bsc.sendText("dbzoo.dockstar.Controller:lcd", os.date("%H:%M:%S"))
end
output this bad xap message !!
why ?
thanks for your help
Member for
16 years 10 monthsVincent,I ran your script and
Vincent,
I ran your script and I saw no bad packet. Why do you say its bad?
This script is a modified version of /etc_ro_fs/plugboard/samples/clockApplet.lua
My xFxViewer v3 saw the packet and did not flag it in anyway as being bad.
Please explain your error in more detail.
Brett
Member for
12 years 2 monthsbrett I am using HomeSeer
brett
I am using HomeSeer and more hah "Livebox" the HomeSeer parser requires a strict order in the package xap
example:
xap-header
{
v = 13
hop = 1
uid = FF.00AA: 0001
class = tsc.Info
source = teleinfo.xap.compteur: edf
}
the order is important v = hop =, uid =, class = .....
plugboard talks like this:
xap-header
{
uid = FF00D800
source = dbzoo.dockstar.Plugboard
hop = 1
class = xAPBSC.cmd
target = dbzoo.dockstar.Controller: lcd
v = 12
}
HomeSeer and rejects the message!
mcsXap ProcessMessage xap-header{uid=FF00D800source=dbzoo.dockstar.Plugboardhop=1class=xAPBSC.cmdtarget=dbzoo.dockstar.Controller:lcdv=12}output.state.1{id=*text=17:56:58state=on} Line 230 Conversion from string "d = FF00D800 'to' Integer 'type is not valid.
you understand?
there is there a way to order the packet data xap?
thank you again for this great project
vincent
Member for
16 years 10 monthsVincent,The bug in the
Vincent,
The bug is in the HomeSeer xAP parser. I quote from the xAP specification
http://www.xapautomation.org/index.php?title=Protocol_definition#Messag…
"The order of name, value pairs in the message block is not significant. Name-Value Pair Definition"
I object to having to put code in place to workaround somebody else's BAD implementation of the specification, contact the HomeSeer forums and tell them their xAP parser sucks or point me at the code and I'll rewrite it.
LUA produces a non-deterministic payload for the xAP message, it does not define any order for its block elements, which is allowed by the specification.
xAP interoperability works when everybody adheres to the specification.
Brett
Member for
16 years 10 monthsI have made a commit to the
I have made a commit to the portable distribution so that you can workaround HomeSeers xAP bug. It is not enabled by default and requires a minor edit to put in place. The code change is in the Frame class for the tostring() function implementation.
Details of the change can be seen here: http://code.google.com/p/livebox-hah/source/detail?r=615
I would however ask that you follow up with HomeSeer as its their bug.
Brett
Member for
12 years 2 monthsdbzoo ready with homeseer :)
now "livebox" project talk the "same" xap
many thanks
you great
Member for
16 years 10 monthsGlad that workaround got you moving
Vincent, Glad that workaround got you moving whilst you wait for the HomeSeer boys to fix their code. Did you raise the problem with them? If not then I will. They need to know about it.
Brett