18.01.2025, 21:52
(08.02.2021, 07:20)admin Wrote: 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:
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
I'm trying to use this "workaround" within a shelly script, but the http.get request from the shelly device fails:
"shelly_http_client.:611 0x3ffeb688: Finished; bytes 340, code 301, redir 1/3, auth 0, status ABORTED: Abandoned"
An idea why the webserver from my W4K answers with code 301?