
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 !
Rick,
I have been working on setting this up. For the left/right/up/down camera buttons, do you want it to go until you hit the stop button, or maybe go for a second and stop on its own, so you can move it in steps if you are remote and the web response is a little slow?
I am building a script manager control with all of the movements, and using variables for the host, port, username and password so it is generic and can be used by anyone, but tailoring it to your needs for now as far as what the script functions do.
Alan
Hello Alan,
I have a script (Script 4) that uses an HTTPGet statement to move the camera right for a given amount of time determined by a sleep statement. It uses one httpget statement to start camera moving right then waits a given period of time and uses another httpget statement with the "camera stop" command to stop the pan right. Having the pan/tilt move a certain amount of time and then stop is preferable.
I was able to modify the button EZ-Script command in the custom web server to execute the pan right script (Script 4) and it worked well. I'm real interested to see how you add the movement buttons for the camera and to see how you align this with the other items on the page.
Would like to have two custom web server pages that are separate and the only difference being one would use Movement Panel for adventure robot and the other would use the Movement Panel for the I-Robot Create 2. Eventually the Foscam camera will be installed on the I-Robot Create 2 base. Is it possible to control the Create 2 base from the custom web server? I would assume so.
The other issue of course is the delay in the camera video stream. I remember you mentioning possibly putting it in an i-frame in the page if DJ hasn't gotten the jpeg stream working in ARC. Any thoughts what you might do in the interim?
Also, can we add a couple of buttons to the page for IR ON and IR OFF? I have scripts working to do both of these functions.
It also appears that one needs to use default.html and not default.htm. I found that the easiest way to make changes to the page is to use notepad and go to documents file and open up http server root directory and open default.html file, modify it and then save.
Thanks again Alan for such great work and I hope work is going much better for you this week ! Rick

A Movement Panel is a movement panel. It doesn't matter to the web page what it is driving.
The only difference will be whether the web page connects directly to the Foscam stream or uses the EZ-B project camera object. Going directly to the Foscam you will need to edit one line in the html page to make it see your camera with your credentials. I'll provide instructions and comments in the html about what needs changing.
Also, rather than replacing default.html I will make 2 seperate pages, and you will include them in your url. Again, I'll provide full instructions.
I may have something for you to test tonight or tomorrow night. I made a lot of progress today.
Alan
Oh, I did include IR on and off commands as well as movement.
Alan
Alan,
Thanks much and pretty exciting! Thanks for all your hard work ! Look forward to testing your pages ! Rick
Alan,
I noticed that when I activate the custom web server in my project sometimes I get the following exception error:
"Object reference not set to an instance of an object"
It does not happen all the time. It is intermittent. Not sure what is up with this?
I did change the custom EZ-Script button to the following: ControlCommand ("Script 4",ScriptStart). When I depress the button it pans camera right as it should. Just wondering if I should have a ControlCommand ("script 4",ScriptStop) coomand in the server page or the (Script 4) itself? When I quit the server and enable it again before I do anything with the page, it comes up with this error. Not sure what might be going on here? When this error comes up I have to exit the program from the task manager or it will start deleting controls from my project page. Problem seems to be related to the http custom server. It should be noted I'm not using the script manager control. Any thoughts on this would be much appreciated and thanks again ! Rick

Hello Alan,
Hello Alan,
I just got home from the hospital after having a procedure to place a stint in one of my arteries. It went well, but I can't do anything for at least a week. I have a plug in the groin area where they went in with their stuff and if it comes out I am in big trouble !
Therefore, I will be a couch potato for at least a week. Oh joys. I will have lots of time to work on testing the web page that you make up ! How is that project going. I know you were having some issues getting one software tool that could do both the layout for the page and integrate the code also. Let me know when you are ready as I am set to go for some testing.
By the way, does DJ have any resolution on getting the MJPEG Stream working with ARC and if not do you have a work-a-round for this issue?
Thanks Again Alan..........Rick

Been a rough week (although apparently not as rough as yours) so I haven't done anything this week. I expect to have some time Sunday, and next week will be better because I am working from home all week so won't be wasting 2-3 hours a day commuting.
You'll know when I do if/when DJ fixes the mjpeg stream in the camera control because he'll post an update to ARC and it will be in the release notes, but yes, I have a workaround in the meantime.
Alan