Page 1 of 1
External Control Device: via HTTP commands - success using Girder 6
Posted: Wed Mar 23, 2016 12:58 pm
by TonyG
Just to post a success using a new feature in 3.31: External Control Device: Now supports control via HTTP commands.
Using Girder 6 script to send some commands to HB. It works quickly and reliably, and opens up quite a few new possibilities. Thanks Scott!
Example below:
Code: Select all
network.get( "http://127.0.0.1:8001/ET?T=ReverseCam&S=HB4Me", function ( success, status, body )
if not success then
print("Sorry could not connect with server")
return
end
if status ~= 200 then
print("Sorry server returned", status)
return
end
print(body)
end, 3000)
Re: External Control Device: via HTTP commands - success using Girder 6
Posted: Mon Mar 28, 2016 1:54 am
by jacobcarl
Hi tonyg . Did HTTP command worked ? i tried it but error occured. Reply.
Re: External Control Device: via HTTP commands - success using Girder 6
Posted: Wed Mar 30, 2016 11:57 am
by TonyG
jacobcarl wrote:Hi tonyg . Did HTTP command worked ? i tried it but error occured. Reply.
Hi Jacob, I'm no expert but will help if I can. What was the error message?
As a quick test, you can run a browser session (or Putty telnet) with your IP address and port, and enter ?
e.g.
http://192.168.1.82:8002/?
You should get the Housebot external control help page that starts with:
- =============================================================================
HouseBot External Control Program
This program can control and get status from HouseBot remotely.Commands: ......
If this doesn't work, check your IP and port settings, or try a different port. Like I said, I'm not really the person to ask, but this is a good place to start.
Re: External Control Device: via HTTP commands - success using Girder 6
Posted: Thu Jul 28, 2016 6:57 am
by SharrySteve1
Thanks a bunch Tony. Checking IP and Port settings revealed I must switch to a different port and it solved the issue.
Re: External Control Device: via HTTP commands - success using Girder 6
Posted: Tue Sep 06, 2016 1:27 am
by jacobcarl
Yup its working correctly. Thank you a lot.
Re: External Control Device: via HTTP commands - success using Girder 6
Posted: Mon Apr 24, 2017 6:58 am
by NikhilSingh
if not success then
print("Sorry could not connect with server")
return
end
if status ~= 200 then
print("Sorry server returned", status)
return
end
print(body)
end, 3000)
Thanks a ton for this code