External Control Device: via HTTP commands - success using Girder 6

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
TonyG
Member
Posts: 94
Joined: Wed Jul 22, 2009 7:35 am

External Control Device: via HTTP commands - success using Girder 6

Post 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)
jacobcarl
Member
Posts: 3
Joined: Mon Mar 28, 2016 1:42 am
Location: Bangalore
Contact:

Re: External Control Device: via HTTP commands - success using Girder 6

Post by jacobcarl »

Hi tonyg . Did HTTP command worked ? i tried it but error occured. Reply.
TonyG
Member
Posts: 94
Joined: Wed Jul 22, 2009 7:35 am

Re: External Control Device: via HTTP commands - success using Girder 6

Post 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.
SharrySteve1
Member
Posts: 1
Joined: Thu Jul 28, 2016 6:28 am
Contact:

Re: External Control Device: via HTTP commands - success using Girder 6

Post by SharrySteve1 »

Thanks a bunch Tony. Checking IP and Port settings revealed I must switch to a different port and it solved the issue.
jacobcarl
Member
Posts: 3
Joined: Mon Mar 28, 2016 1:42 am
Location: Bangalore
Contact:

Re: External Control Device: via HTTP commands - success using Girder 6

Post by jacobcarl »

Yup its working correctly. Thank you a lot.
NikhilSingh
Member
Posts: 1
Joined: Mon Apr 24, 2017 6:55 am
Contact:

Re: External Control Device: via HTTP commands - success using Girder 6

Post 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
Post Reply