07.05.2025, 13:20
Event script can be simplified a bit:
You will need a resident script for polling the status (with non-zero sleep time):
Post what you get in LM Logs tabs when running this script.
Code:
http = require('socket.http')
value = event.getvalue()
param = value and 'on' or 'off'
http.TIMEOUT = 15
http.request('http://192.168.0.5/admin/channel1/set_params.cgi?publish_enabled=' .. param)
You will need a resident script for polling the status (with non-zero sleep time):
Code:
http = require('socket.http')
http.TIMEOUT = 15
res = http.request('http://192.168.0.5/admin/channel1/get_params.cgi')
log(res)
Post what you get in LM Logs tabs when running this script.