This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

HTML Command Send and Receive
#1
Hi,
We are communicating with an automation system via HTML command.
We are successful with this script for sending command for ( http://192.168.10.10/SetDyNet.cgi?a=3&p=1  )

http = require('socket.http')
url = require('socket.url')
http.TIMEOUT = 5

value = event.getvalue()

if value = 100 then
req = 'http://192.168.10.10/SetDyNet.cgi?a=3&p=1'
http.request(req)
end


But we need also read the status . When we send this command for reading status ( http://192.168.10.10/GetDyNet.cgi?a=3&l ) , we get answer from browser ı=23 .

How we can read via script ?

Regards
Reply
#2
Try this:
Code:
http = require('socket.http')
http.TIMEOUT = 5
url = 'http://192.168.10.10/GetDyNet.cgi?a=3&l'
response = http.request(url)
log(response)
Reply


Forum Jump: