
rbonari

Hello,
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 !
Thanks much Alan and what a quick response ! Rick

Hello Alan,
Haven'heard from you in a while. Hope all is well with you ! Have you come up with any resolution for the foscam custom web page? Curious as to what you come up with? Thanks for your help !
No time this week. I wasted too much time troubleshooting the crashing issue on my laptop instead of making the custom web page. Might have time tomorrow after I take care of some errands.
Alan
Alan
I hear you about having to waste time on computers that are crashing and acting up ! Did you ever resolve if it was a problem with the computer or ARC? Take care ! Rick
Really good progress last night. If I can get all my errands done today, I should have something for you tonight. I have everything working, just working on formatting now.
Alan
Alan,
That is awesome ! Look forward to checking it out ! Rick


OK, here it is.
first, enable mjpeg streaming from your Foscam.
Download the two attached files.
Unzip foscam.zip to your ARC\HTTProot directory, so there is a foscam.html file in the root (every time you upgrade ARC, it over-writes the default.html file, so we don't want to use that one for customization).
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.
If you prefer to use the ARC camera object with the snapshot URL, delete the iframe line, and un-comment the following line which adds an EZ-B Camera object.
Now, you can either start with the Foscam-Control-EZB project and add your own camera object, movement panels, etc to it, or open your own project and merge in the FoscamScripts script manager control (and the variable watcher and http server (custom) if your project doesn't already have them).
Now, you need to edit one of the scripts in the FoscamScripts script manager. The CamInitialize script contains your camera IP address, port, username, and password. Edit it as needed. This can be the internal IP address of your camera, since it will be ARC, not the web page sending the commands to the camera.
Before running any of the other scripts, you must run the CamInitialize script. All of the others use variables that it initializes. If your project has an EZ-B, you can have your initialization script call this script with a control command, or there is also a button for it on the foscam.html web page.
You are now ready to start. Start the http server control.
From your browser, either on your computer or Android/iPhone device, go to http://YourEZBuilderIPadress:Port/foscam.html (ie, mine would be http://192.168.0.203:81/foscam.html -- this is the IP of your ARC, not your camera).
The page is laid out to look/work best in portrait mode on a phone.
Let me know if you have any questions.
Alan
foscam-control.EZB
foscam.zip
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.
Alan