06.05.2025, 19:02
Hi,
I have a customer that want to start and stop recording from a http request, and even feedback.
Got these url from the manager,
I want to have a button that turn on/off the recording and a feedback object.
Is is the right way to do it?
How can i get feedback to a 1bit object that shows 1 or 0?
I have a customer that want to start and stop recording from a http request, and even feedback.
Got these url from the manager,
Code:
Start recording http://192.168.0.5/admin/channel1/set_params.cgi?publish_enabled=on
Stop recording; http://192.168.0.5/admin/channel1/set_params.cgi?publish_enabled=off
Feedback that shows if it on or off : http://192.168.0.5/admin/channel1/get_params.cgi?publish_enabled=on
I want to have a button that turn on/off the recording and a feedback object.
Code:
require('socket.http')
socket.http.TIMEOUT = 15
value = event.getvalue()
if value == false then
socket.http.request('http://192.168.0.5/admin/channel1/set_params.cgi?publish_enabled=off')
else value == true then
socket.http.request('http://192.168.0.5/admin/channel1/set_params.cgi?publish_enabled=on')
end
Is is the right way to do it?
How can i get feedback to a 1bit object that shows 1 or 0?