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

Moderator: leecollings

Post Reply
xces
Posts: 39
Joined: Thursday 05 February 2015 9:02
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

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

Post 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
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

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

Post by Egregius »

Isn't there a builtin lua command to update a device? Why use curl for that?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest