08.02.2021, 07:20
Example for writing to group addresses without password.
You have to enable FTP server in System Config, connect via FTP by using apps username and upload write.lp file into public directory.
write.lp file contents:
Example URLs:
http://LM_IP/public/write.lp?addr=1/1/1&value=1 - write 1/ON to 1/1/1
http://LM_IP/public/write.lp?addr=32/1/1&value=123 - write 123 to 32/1/1
You have to enable FTP server in System Config, connect via FTP by using apps username and upload write.lp file into public directory.
write.lp file contents:
Code:
<?
require('apps')
addr = getvar('addr') or ''
value = getvar('value') or ''
value = json.pdecode(value)
if type(value) ~= nil then
grp.write(addr, value)
end
Example URLs:
http://LM_IP/public/write.lp?addr=1/1/1&value=1 - write 1/ON to 1/1/1
http://LM_IP/public/write.lp?addr=32/1/1&value=123 - write 123 to 32/1/1