LUA api call return value

Moderator: Telldus

Post Reply
Posts: 4
Joined: Mon Dec 17, 2018 1:53 pm

LUA api call return value

Post by juhoroine » Fri Jan 11, 2019 7:00 am


a small feature request:
The local /api/luca/call?script=myScript&function=myCall does not have means to return data to the requesting client:

e.g. function
function myCall(args)
print("myCall() executed")
return "hello"

"status": "success"

instead of "hello".

I think it would be logical if whatever the function returns, would be converted to json and send to the client.

EDIT: or even better, to maintain compatibility, return the return value encoded to something like this ("returnValue"):
"status": "success",
"returnValue": "hello"

Post Reply