Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited
Resolved Resolved by thetechguru!

Regular And Custom Http Server Controls


I have ventured into the HTTP Servers, both regular and custom and was really impressed. Pretty cool stuff !

First question I have is that I was able to successfully connect to the regular server page with my Android Phone and as my project is fairly large, I couldn't scroll through the whole screen of the project. Would I be correct in assuming that this is a limitation of the Samsung Galaxy S4 Screen Size?

I noticed in the web server control that there are two IP Addresses the show in the control. The first one is the regular IP Address and the other one is the remote port for accessing server outside of my network. Then I noticed when I was connected that I have clicked on the connection button that there was yet another IP Address. The IP Address in the control screen along with the remote address is an IP Address that is already used on my network. The IP Address I get when I connect on connection button shows an IP Address that is not used on my network and this makes sense. Not sure how these IP Addresses are all related. We have two different IP Addresses and a remote address.

Also, which IP Address is the one I should be forwarding? Is it the address in the drop down box when I click on connection or the one of two that shows up in the main control box? Also, would I be correct in assuming that I can change the port number to one that is currently not used on my router? Also, what are some common IP Addresses that I could use that aren't currently used and would be safe to use.

I can view the web server page on my Android phone on my local network but can't access yet outside of my network. Tried port forwarding both IP addresses, with a different port number than 80 and no luck. This is where I think I might be using port numbers that are already used?

With regards to the custom web server, I looked at the example in the scripts folder and got it to work somewhat. The reason not everything worked is because I am using the Adventure Bot for my project and I am sure the author of the example custom web server used a different robot, etc. I was wondering if anyone has the example HTML code for a basic HTTP Custom Server? Example code is always great for learning purposes. I did check out the question mark for the custom web server but there was no examples. Any help on creating a custom web server would be great to help me understand what is going on with it. TheTechGuru is gracious enough to volunteer to help me out when he gets back from vacation as he wants to do some similar things with his robots that I want to do. Thought I would learn as much as I can before he gets back so I know what he is talking about somewhat?

Thanks for all the help and what a great community ! :):)


Upgrade to ARC Pro

ARC Early Access will give you immediate updates and new features needed to unleash your robot's potential!

AI Support Bot
Related Content
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.

Any thoughts or comments on the previous post regarding HTTP Server and Customer Server Controls would be much appreciated. Thanks Again, Rick
Forgot to mention. The CamUp, CamDown, CamLeft and CamRight scripts give the movement command, sleep 500 ms, thrn give the stop command. If you want smaller movement increments each time you hit the button just edit the sleep step in those four scripts.

Hello Alan,

That is Great,

I will give it a shot ! Haven't looked at it yet but as soon as I get back home I will check out. Just wondering if you had a chance to add buttons for IR ON and IR OFF? I have the command numbers if you need them. Thanks again...Rick :):)
Yes, it has up, down, left, right, stop, top right, top left, bottom left, bottom right, reset (goes back to center), lights on, lights off, and init (sets the variables used by all the other scripts).

Only thing I didn't add is cruise because I haven't programmed a cruise pattern yet.


That is awesome ! I haven' programmed cruise yet either. Thanks again as always ! Rick :):):):)

Awesome job ! I have the page working and it works perfectly. The video stream on my Android Phone is much faster ! I am sure you have seen this also. Your instructions were superb and if anyone deserves a bonus from ez-robot you would be the man !

I put the foscam-control.EZB file in the ARC My Projects Folder and it works great. I noticed that it has a long number displayed after the project title. Doesn't hurt anything but just wondering what this number is and if there is a way or a need to remove the long number? I noticed none of my other projects have this long number after their names. Just curious. Cant't thank you enough and being able to look at and see what you have done with the html page code is a great learning experience for myself and others ! Very awesome ! Rick

You can remove the long number. It was added by the ezr web page when uploaded.


Thanks much ! You did an awesome job ! Rick :):):):):)
Thanks Rick,

Once I figured out how it was working (and stopped trying to fix my crashing computer) it was fairly easy to set up.


Can we make the window for the video larger or wider? I'm thinking maybe you set up the size to get maximum speed out of the stream. Would this be correct?
If the size of the window could be made larger without sacrificing the speed of the stream, we could probably reduce the size of the robot Movement Panel to fit everything on the mobile screen ok.

My I-Robot Create 2 should be delivered today so was wondering if any thing needs to be changed for the custom page movement panel? Also I noticed there is quite a bit of space leftover on the right side of the phone display so would it be possible to add more buttons specifically to control I Create 2 functions?

Thanks again Alan ! This makes possible a pretty decent telepresence robot using the ezb-v4 and I Create 2 along with the Foscam Camera. What are your thoughts regarding this?

Take care and again thank you ! I can see this being an evolving project for us and others ! Rick :):):):)
The window size is based on the size of the FOSCAM mjpeg stream. It only supports VGA at 15fps (640x480).

The H.323 stream supports higher resolution, but for that you need to use the EZ-B camera object instead, and you lose the fast video response.

Hello Alan,

That sounds good to me. I thought it might have something to do with speed but size is fine as is. I was just curious.

What are your thoughts on the Movement Panel for the I Create 2 platform? Would the page Movement Panel ad is need to be changed. My first guess is that it should work.

Also, can buttons be added to right side of page to accomadate some of the special functions of the Create 2 platform?

What is your thinking on using Create 2 platform along with ez-b4 and foscam camera for telepresense robot?

Thanks afain Alan ! Rick :):):)
The web page will work with any Movement Panel in the project. It just issues the built in direction commands.

Adding additional buttons is easy, just need to have scripts to map them to.


If I wanted to try and add buttons on the right side of the page, how would I go about positioning them? I see how the scripting is done but not clear on how you position buttons where you want them. Thanks again Alan ! Rick :):):)

The buttons are laid out in an HTML table.

Take a look at this page http://www.w3schools.com/html/html_tables.asp then look at the entries in the foscam.html file and it should make sense how it is set up.

Basically, there is one big table of three rows and one column. Each row holds one of three smaller tables. (this was done to make the buttons all align to the left of the page and look correct on a mobile screen. Without it, they centered on the web page, but that was not the center of the screen on the Android browser. Probably other ways to do this, but it was also how DJ had laid out the default, except he had 2 columns, with the video in the second column, and it seemed to make sense).

The first table is the movement panel, which is a 3x3 table, but some entries are empty, the second is the Foscam movement control, which is also 3x3, but all fields have a button in them, and the last is the additional controls, which is a 2x2 table.

You could add another table, or add a column or row to any of the existing ones, whichever makes the most sense.

Thanks much Alan ! I will check it out and get back with you as to how things go. Rick :):)
Hello Alan,

I have been able to modify and add buttons to the custom web server thanks to your help but have run into an issue when trying to port forward the custom web server page. There is an IP address in the custom web server that it shows in the control and when I port forward that IP Address using the port forwarding address I get some unexpected results. I have two html pages in the HTTP Server Root directory. One is the default.html file and the other is the foscam.html file.

If I port forward the basic default html file the port forwarding works and I see the foscam video. However if I try and port forward the foscam html file the movement controls and buttons work in the page but no foscam video shows.

I tried renaming the default.html file to default1.html and I renamed the foscam.html file default.html. still no video display. Again the buttons and movement control display and work but the video doesn't show.

This doesn't make much sense to me. If the foscam video displays o.k. with the original default.html page why not in the modified foscam.html page? The only thing I am thinking is that you display the foscam video in the foscam.html page in an IFrame. Not sure why this would make a hill of beans to port forwarding as IFrames are commonly used in web pages?

Your help on this is much appreciated !Rick B.:):):):)
To use the iFrame, you also need to forward your Foscam port to the Foscam IP address and modify the IP in the iFrame to your external IP address or hostname if you are using a dynamic dns service.

Otherwise it is trying to display an internal ip address that cannot be seen from the Internet.

I explained this in my initial instructions :


Edit the foscam.html file. (I use notepad++, but notepad will work too). Near the top is a line that starts "iframe". Edit this line so it uses your camera's IP address, port, usr and password. If you are only using this on your network, this can be the internal IP address of hte camera. If you are using it outside your network and have port forwarded to the camera, then it is the external IP address or dynamic host name.


Thanks much ! I forgot to modify the page with the external ip address. I will give that a shot.

One other quick question. The page works perfectly within my internal network, but I noticed that when using google chrome on my android phone that the video will go blank after an interval of time and I can get it back by swiping down with my finger inside the video window. Is there some kind of setting I need to change in google chrome?

I am coming along well on my create 2 security robot and should be posting something soon. Waiting for parts, etc.

Again, thanks much Alan !:):):):)
I am not aware of any settings. I have never watched the MJPEG for more than a few minutes so haven't seen this. I'll play around with it some and see if I duplicate the issue.

Hello Alan,

Just wondering if you had a chance to try out the foscam custom web page issue I mentioned in the post above. On Android phone camera view disappears after 2 to 3 minutes or so and won't come back unless you swipe down with your finger in the video frame window. Seems to be a refresh issue maybe. Thanks for your help ! Rick