Help with callback in scripts
I've written a script to mirror a xap rf command on my livebox to a port on my raspi.
local switchon ="11427111937";
local myPort = 3000;
res, err = client:connect(myIP, myPort)
if not res and not res=="timeout" then
print("Error in connect: "..err)
client:send("u", i, j)
f = xap.Filter()
f:add("xap-header", "source", "dbzoo.livebox.controller:rf.2")
local s, status, partial = client:receive('*l') --try to read all data
if status ~= "timeout" then
sendTx = frame:getValue("output.state","state")
if sendTx == "on" then
client:send(switchon, i, j)
client:send(switchoff, i, j)
The script seems to work fine on the livebox but I expected to be able to run it on the Pi and have it respond to the xap function callback. Which of the xap programs needs to be running on the Pi to make this work?
Does the it actually run or error out? whats the debug output?
could be that you that source is incorrect i.e dbzoo.livebox for me i changed my sources to dbzoo.beaglebone and so on...
in terms of running processes i would imagine xap-plugboard (identified as "lua") and xap-hub - have a look at the running process - ps -e
if various modules are not running you can try running the start script manually
sudo sh ./xap start or service xap start
then ps -e
have you checked theres no case sensitive issues? i found i had to change a load of uppers to lower due to differences between my livebox and bbb port