Page 1 of 1

[Lua] json.htm?type=command¶m=udevice ???

Posted: Thursday 27 October 2016 18:33
by xces
I have this Lua snippet and i can't see why it isn't working.

Code: Select all

cmd = 'curl  "'..domoticzBaseUrl..'/json.htm?type=command&param=udevice&idx='..idxLux..'&nvalue=0&svalue='..tostring(round(weightedLux,0))..'"'
      local update=assert(io.popen(cmd))
      print('<b style="color:Red">Lux updated!?</b>')
      print(cmd)
The thing is; it is printed in the logs like this:
"LUA: curl "http://127.0.0.1:8084/json.htm?type=com ... svalue=412""

Where does the ¶ come from?

It looks like the '&para' is converted somehow, also related to bug 295.. viewtopic.php?f=6&t=3548

Re: [Lua] json.htm?type=command¶m=udevice ???

Posted: Thursday 27 October 2016 23:27
by Egregius
Isn't there a builtin lua command to update a device? Why use curl for that?