rover cam project mjpg-streamer Hello, and thank you in advance for your help.

594 views
Skip to first unread message

anthonydangelo

unread,
Jun 5, 2014, 5:56:53 PM6/5/14
to web...@googlegroups.com

Hello, and thank you in advance for your help.

I am working on the cam rover project as outlined in magpie magazine. I am trying to install

mjpg-streamer

  However, when I run the “make” command I get a fatal error: “videodev.h no such file no such directory. “ I have tried all the fixes that I have found as well as asked for help on the raspberry Pi home page and the source forge, Tom says he  recalls the error.  But not the fix, I have gone so fare as to down load a new O.S. run the updates and the upgrades  and try the install and it still crashed with the same error at the same spot.  I am thinking either I am doing something dumb or they have up graded there Software? I have also tried to install  tried to install the mjpg-streamer_94-i386.deb but I can’t seem to get that to extract correctly.  (grrrrrr) the link in the article  points to the r63 file that dies on the “make’ command.

Thank you all very much.

Tony

anthonydangelo

unread,
Jun 5, 2014, 10:07:49 PM6/5/14
to web...@googlegroups.com


Thanks every one  We have it running just needs some tune up now! Thanks one and all!

Toshi Bass

unread,
Jun 6, 2014, 5:34:56 PM6/6/14
to web...@googlegroups.com
Hi Tony,

So how did you resolve you pi camera issue, you sparked my interest and i bought a pi camera module, it arrived today, just got as far as getting basic functionality working and in the past I have used mjpg-streamer with a usb camera but if there's some trick I need to know to get it working with the pi camera you may save me some time.

Toshi

info

unread,
Jun 6, 2014, 5:44:06 PM6/6/14
to web...@googlegroups.com

Hay Toshi!

After two long days of looking some one pointed me to this site and it worked first time!

 

http://blog.miguelgrinberg.com/post/how-to-build-and-run-mjpg-streamer-on-the-raspberry-pi

 

I am getting good at backing this sd card up if nothing else!

Can you help me with getting the streamer to run with the camrover script?

Change the port and get the output to the right place?

I don’t know anything about programming, I am going to take a class online.

Thanks man.

--
You received this message because you are subscribed to a topic in the Google Groups "WebIOPi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/webiopi/CPS_dFTOTBc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to webiopi+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Toshi Bass

unread,
Jun 7, 2014, 1:37:54 AM6/7/14
to web...@googlegroups.com
Sure I can help piece of cake once I have mpg running however my wife has me down to go shopping allday today so I need to live through that first hahaha so no fast response sorry

Toshi

info

unread,
Jun 7, 2014, 1:45:15 AM6/7/14
to web...@googlegroups.com
Thank god!
I have been trying to understand this "input_file.so" stuff I was almost going to just get a usb web can and use that but then what do I do with the Pi camera. the now fast response is just fine. I need a break from the PI, I have found an online class on Lenox Vtc.com and I am watch the videos to try and get a better understanding of the O.S. its about 2 am here and I have been on this for almost 20 hrs.
Thanks man no rush I need some rest any way. Thanks
I can relax now!


-----Original Message-----
From: web...@googlegroups.com [mailto:web...@googlegroups.com] On Behalf Of Toshi Bass

Toshi Bass

unread,
Jun 7, 2014, 4:03:41 PM6/7/14
to web...@googlegroups.com
Hi Tony

Had a couple of hours on this tonight, had same same problem with MJPG-Streamer r63 would not make, so tried 182 that worked, followed some of instructions from http://blog.miguelgrinberg.com/post/how-to-build-and-run-mjpg-streamer-on-the-raspberry-pi as advised

and at the end I enter :

uv4l --driver raspicam --auto-video_nr --width 640 --height 480

which returns a bunch of lines the important one being :

<notice> [core] Registering device node /dev/video0   (when I tried a usb camera many moons ago this is exactly what I looked for to confirm the camera was ready to function)

next I cd to my mjpg-streamer folder and enter export LD_LIBRARY_PATH="$(pwd)"   followed by :

LD_PRELOAD=/usr/lib/uv4l/uv4lext/armv6l/libuv4lext.so ./mjpg_streamer -i "input_uvc.so -d /dev/video2 -r 320x240 -f 25" -o "output_http.so -w ./www 8001"

and when I load up 192.168.0.XX:8001  I get the MJPG-streamer demo page and see the static image and the stream and also the stream on the javascript page (again that's exactly what you get with a usb webcam)

So now with that running it should just be a simple case of opening another terminal window running webiopi cambot and the stream should appear on the webpage above the buttons (using the line in the index.html file <img width="320" height="240" src="http://192.168.0.xx:8001/?action=stream"><br/>) but it doesn't work, in fact it crashes MJPG-streamer.

At this moment I have no idea why that doesn't work, for sure it should, so tomorrow I will start again, in the mean time could you tell me if you got as far as getting the stream running on the MJPG demo page and if so just change the command to start mjpg-streamer by adding 8001 after www , and check if webiopi cambot works for you.

Toshi




 






info

unread,
Jun 7, 2014, 5:03:27 PM6/7/14
to web...@googlegroups.com

Hi Toshi

From the thermal window, I get

“bash:  uv41: command not found”

I did a quick search on the web for uv41 relating to raspberry pi and got nothing.

Also I did a find on my Pi and got nothing.

 

I am sorry for my lack of knowledge.

I will be here.

Best regards.  

Tony

 

From: web...@googlegroups.com [mailto:web...@googlegroups.com] On Behalf Of Toshi Bass


Sent: Saturday, June 07, 2014 4:04 PM
To: web...@googlegroups.com

--

info

unread,
Jun 7, 2014, 6:18:11 PM6/7/14
to web...@googlegroups.com

Toshi,

After looking in to it deeper on the web I now know what uv4l is but I can not seem to locate it.

I have done the sudo apt-get update & upgrade commands, but on these two I get

E: unable to locate package.

I will keep on it and advise.

Best regards

Tony

 

 

sudo apt-get update
$ sudo apt-get install uv4l uv4l-raspicam

 

From: web...@googlegroups.com [mailto:web...@googlegroups.com] On Behalf Of Toshi Bass


Sent: Saturday, June 07, 2014 4:04 PM
To: web...@googlegroups.com

--

info

unread,
Jun 7, 2014, 8:31:35 PM6/7/14
to web...@googlegroups.com

Toshi,

I have tried to find a working site for uv4l with no luck, also I tried to flow your commands but I do not have an mjpg_streamer  dr, I have mjpg-streamer-code-182 do I have to do some renaming?

Thanks man.

info

unread,
Jun 7, 2014, 8:52:48 PM6/7/14
to web...@googlegroups.com

Toshi,

I can run the video stream on the demo page at 8080,

Thanks Tony

Toshi Bass

unread,
Jun 8, 2014, 1:47:39 AM6/8/14
to web...@googlegroups.com
Hi Tony 

Looks like you made some progress, so if the demo page is working on 8080 the next step to test if it works in cambot:

First try Method 1.

Edit the Webiopi cambot index.html file, look for the line :

<img width="320" height="240" src="http://raspberrypi:8001/?action=stream"><br/>    change 8001  to  8080 and save the file

(presumably your using putty to ssh into the pi from windows?)

In the terminal window log on and run mjpg-stream the same way as before,

Open your web browser with xxx.xxx.x.xx:8080 and the demo page should be working, close it then:

Open a second terminal window, log on and start webiopi     sudo webiopi -d -c /etc/webiopi/config   the cambot program should now be running.

Open your web browser with xxx.xxx.x.xx:8000 and the cambot page should display including your video stream as well as the buttons.

Once this works we need to do next steps which starts mjpg-stream in the background and stuff anyway let me know result if cambot works or not so that I can continue this my end.

Toshi







Toshi Bass

unread,
Jun 8, 2014, 2:00:08 AM6/8/14
to web...@googlegroups.com
Tony

Just to be sure you understand as perhaps I did not make it clear enough, you will have 2 terminal windows open, first 1 will have mjpg -streamer running in it, 2nd terminal window you will have webiopi running in it 

when you open the mjpg-streamer demo page it starts a web server so the video can be displayed on the demo page

when you run webiopi obviously that has a web server built in, so in effect mjpg-streamer is using that server to display the video instead of starting its own server.


info

unread,
Jun 8, 2014, 12:50:17 PM6/8/14
to web...@googlegroups.com

Toshi

I thing my problem is the way I am starting me Pi camera,

I looked until 4 am for the uv4l software but I had no luck. I tried the steps out lined  on the Linux projects page, but i still get the error,
below are the command as well as my error. I am starting the camera as outlined on miguelgrinberg.com, The web page I got the install from.

I know that’s not right but I don’t know what to do about it. Also his install renames l the directory mjpg-streamer-code-182

The streamer works just fine on it’s on. I am kind of lost

Thanks

 




*****************************************************************

How to install or upgrade UV4L on Raspbian (for the Raspberry Pi)

To install UV4L open a terminal and type the following commands:
$ wget http://www.linux-projects.org/listing/u ... /lrkey.asc && sudo apt-key add ./lrkey.asc
Add the following line to the file /etc/apt/sources.list :
deb http://www.linux-projects.org/listing/u ... /raspbian/ wheezy main

$ sudo apt-get update


$ sudo apt-get install uv4l uv4l-raspicam

**************************************************************************************************************


pi@raspberrypi ~ $ sudo apt-get install uv4l uv4l-raspicam
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package uv4l
E: Unable to locate package uv4l-raspicam
pi@raspberrypi ~ $

Message has been deleted
Message has been deleted

Toshi Bass

unread,
Jun 9, 2014, 5:18:34 PM6/9/14
to web...@googlegroups.com
Hi Tony

I spent a good few hours today trying to sort out this raspberry pi camera module but I have come to the conclusion its a piece of poo, I Have been successful in getting a stream out of the thing 2 different ways the first method is saving separate still shots in a temporary folder then streaming those to the MJPG Demo page (I think this is what you have) its rubbish very slow/poor frame rates actually not that surprising considering its a work around in reality, second successful method is using the driver uv4l and streaming to the MJPG Demo page this is how its supposed to be done and actualy not a bad picture and better frame rates BUT I cannot get the stream into webiopi no matter what I do it should be easy, but when the webiopi server starts it crashes the camera output in both methods.

I have tried numerous ways and variations of these 2 methods present on the web but none work.so If anyone reads this who has been successful in getting the Raspberry Pi camera module running in webiopi I would like to understand how they did it please.

In the mean time I would suggest you go buy that usb camera you talked about and save some hair, just google for which usb
cameras definitely work with the pi, I just plugged in my old logitech usb camera in and had it streaming into cambot in 2 minutes flat, maybe later on they will come up with a half decent driver for the Raspi camera but I am convinced at the moment its a piece of junk.

Toshi

info

unread,
Jun 9, 2014, 5:24:54 PM6/9/14
to web...@googlegroups.com

Thank you so much!

I just thought it was me. and I hate to take the easy way out.

I’ll get a web cam and set it up.  As for the pi cam back in the box with it who knows some day.

Can you send me the info on what you had to do to use your usb web cam?

Thanks

 

 

From: web...@googlegroups.com [mailto:web...@googlegroups.com] On Behalf Of Toshi Bass


Sent: Monday, June 09, 2014 5:19 PM
To: web...@googlegroups.com

--

Todd A. Cudaback

unread,
Jun 9, 2014, 6:03:48 PM6/9/14
to web...@googlegroups.com
Here is a really good thread that will help. There is a wealth of information in the webiopi google group archive.

Follow the link that I posted. I had really good success with it on my cambot experience.


Todd


--
You received this message because you are subscribed to the Google Groups "WebIOPi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webiopi+u...@googlegroups.com.

Todd A. Cudaback

unread,
Jun 9, 2014, 6:19:45 PM6/9/14
to web...@googlegroups.com
Guys just to add

There are some extremely buggy versions of mjpg-streamer. keep it simple :)

I would have thought by now they would have worked themselves out. It's been over a year since I played with it I'll look for my lab notes.

Todd 

Toshi Bass

unread,
Jun 9, 2014, 6:32:13 PM6/9/14
to web...@googlegroups.com, ta...@att.net

Hi Todd

I tried to follow your post from https://groups.google.com/forum/#!topic/webiopi/EBeWzsfMrOE earlyer today, however the link http://www.linux-projects.org/modules/sections/index.php?op=viewarticle&artid=14  contained in it appears broken and I came to a dead end, is there any chance you could expand on your method to get this pi camera working in webiopi as I said I did manage to get the it streaming on the MJPG Demo page especially with uv4l which looks like its doing exactly what a usb camera does, but for the life of me I cannot figure how to initiate it in the webiopi index.html  I assumed the following should work :-

start the stream

LD_PRELOAD=/usr/lib/uv4l/uv4lext/armv6l/libuv4lext.so ./mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 320x240 -f 25" -o "output_http.so -w ./www -p 8001"

192.XXX.X.XX:8001 brings up a working MJPG Demo page but as soon as I start webiopi it crashes the stream

index.html


one final point about mjpg-streamer, I like Tony are using 182 because r63 will not make (I have used r63 in the past and have a old copy that worked but updates to Raspbian must have broken it)

It would be great if you could shed a bit more light on this issue as both myself and as you can see Tony have pulled our hair out trying to get this working

Thanks for any help

Toshi Bass




Toshi Bass

unread,
Jun 9, 2014, 6:38:07 PM6/9/14
to web...@googlegroups.com

Tony

Perhaps all is not lost and the pi camera may live to see another day, Todd may be able to help, so perhaps you will not need this however as requested here is how to initiate a usb camera

If you have mjpg-streamer already installed shut down your pi plug in the usb camera and restart the pi

Look in the folder /dev for a file called video0 if its there it means the pi reconsidered the camera and assigned video0 to it

cd into your mjpg-streamer folder   and enter the following 

./mjpg_streamer -i "./input_uvc.so -r 320x240 -f 25" -o "./output_http.so -n -p 8001"&  

now mpg-streamer is running in the back ground, you may need to press enter again to get the prompt 

then start webiopi    sudo webiopi -d -c /etc/webiopi/config

open the cambot browser window  192.xx.x.xx:8000 and the stream should be running already. 

You can also try opening the browser to 192,XXX,X,XX:8001  to get the MJPG Demo page

Done 

If anyone needs to know how to install mjpg-streamer, I find this is perhaps the easiest:
sudo apt-get update
sudo apt-get upgrade 

# Make a new directory.
sudo mkdir /opt/mjpg-streamer
# Go into it
cd /opt/mjpg-streamer/

# Install the following packages.
sudo apt-get install libjpeg8-dev
sudo apt-get install imagemagick
sudo apt-get install subversion

# Download MJPG Streamer into the current directory.

# Run make.
sudo make


Toshi

Todd A. Cudaback

unread,
Jun 9, 2014, 6:38:56 PM6/9/14
to web...@googlegroups.com
I still have the sd card with everything on it. I've been wanting to get the pi fired up. It might be a day or so. At least I would have the working code.

Hour Glass Spinning

Todd


On Monday, June 9, 2014 3:32 PM, Toshi Bass <toshib...@gmail.com> wrote:



Hi Todd

I tried to follow your post from https://groups.google.com/ forum/#!topic/webiopi/ EBeWzsfMrOE earlyer today, however the link http://www.linux-projects.org/ modules/sections/index.php?op= viewarticle&artid=14  contained in it appears broken and I came to a dead end, is there any chance you could expand on your method to get this pi camera working in webiopi as I said I did manage to get the it streaming on the MJPG Demo page especially with uv4l which looks like its doing exactly what a usb camera does, but for the life of me I cannot figure how to initiate it in the webiopi index.html  I assumed the following should work :-

start the stream

LD_PRELOAD=/usr/lib/uv4l/uv4lext/armv6l/libuv4lext.so ./mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 320x240 -f 25" -o "output_http.so -w ./www -p 8001"

192.XXX.X.XX:8001 brings up a working MJPG Demo page but as soon as I start webiopi it crashes the stream

index.html


one final point about mjpg-streamer, I like Tony are using 182 because r63 will not make (I have used r63 in the past and have a old copy that worked but updates to Raspbian must have broken it)

It would be great if you could shed a bit more light on this issue as both myself and as you can see Tony have pulled our hair out trying to get this working

Thanks for any help

Toshi Bass




Toshi Bass

unread,
Jun 9, 2014, 6:40:55 PM6/9/14
to web...@googlegroups.com
And here's another (stupid) question whats with all this Re: [Bulk] Re: [Bulk] Re: [Bulk] RE: [Bulk] RE: [Bulk] Re: ....... in the header I never before saw that happen  ?

Toshi Bass

unread,
Jun 9, 2014, 6:46:02 PM6/9/14
to web...@googlegroups.com, ta...@att.net
Todd,

That would be great thanks, I need to go to bed now my brain hurts.

Toshi


Todd A. Cudaback

unread,
Jun 9, 2014, 7:01:20 PM6/9/14
to web...@googlegroups.com
Toshi,

That all looks familiar here is another link that looks to be updated. I had this link saved on my office computer for a reason. It appears that this uses the raspicam driver for mjpg-streamer. it was really slick and fast.
Maybe you have already seen this.

Todd


--
You received this message because you are subscribed to the Google Groups "WebIOPi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webiopi+u...@googlegroups.com.

Todd A. Cudaback

unread,
Jun 9, 2014, 7:06:01 PM6/9/14
to web...@googlegroups.com
Look toward the bottom at the update.

I think this is the deal I used

Todd


On Monday, June 9, 2014 3:38 PM, Toshi Bass <toshib...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "WebIOPi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webiopi+u...@googlegroups.com.

Todd A. Cudaback

unread,
Jun 9, 2014, 7:22:51 PM6/9/14
to web...@googlegroups.com
I'm pretty sure this is the ticket.
I do remember starting with a fresh OS.
I learned that all of the messing around, trying different things caused the little pi to get confused.

This looks real familiar

I'll get to my pi soon and make sure

Todd

info

unread,
Jun 9, 2014, 7:41:44 PM6/9/14
to web...@googlegroups.com

Ok guys I have it moustly working now still need some help 1st my web cam is very red, I have tried two cams the one I am using now worked befor, 2: my paths are buggered up on mjpgstreamme due to the fact I had to install from a zip file from http://blog.miguelgrinberg.com

Thanks

Tony

(we have light at the end of the tunnel, may be a train!)

Best regards

--
You received this message because you are subscribed to a topic in the Google Groups "WebIOPi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/webiopi/CPS_dFTOTBc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to webiopi+u...@googlegroups.com.

info

unread,
Jun 9, 2014, 11:01:57 PM6/9/14
to web...@googlegroups.com

Ok This thing will make you crazy~ 

Brand new SD card fresh install of Wheezy  dated Jan 7th 2014

Did all the updates and upgrades.  Installed libjpeg8-dev.

Every time I take a photo with uvccapture it come out red.

Tried this with two deferent Logitech webcams. One I know worked just fine last week.

Anyone want a cheap pi! (I can only give ya $35 to take it of my hands! ?

Thanks

 

 

From: web...@googlegroups.com [mailto:web...@googlegroups.com] On Behalf Of Toshi Bass


Sent: Saturday, June 07, 2014 4:04 PM
To: web...@googlegroups.com

--

Toshi Bass

unread,
Jun 10, 2014, 1:11:05 PM6/10/14
to web...@googlegroups.com, ta...@att.net

Hi Todd / Tony

SOLVED, in reality I had followed  http://miguelmota.com/blog/raspberry-pi-camera-board-video-streaming/ yesterday so today I followed the bottom part Update: 19 Jan 2014 - "Easier way to stream" which basically takes the existing installation of mjpg-streamer and converts it to the experimental version which uses libjpeg62-dev and man does that make a difference, great frame rate and supa picture quality on the MPG Demo streamer web page.
HOWEVER as soon as I start webiopi cambot it crashes the stream just the same as before although I now get a debug message 

DBG(/home/pi/mjpg-streamer/mjpg-streamer-experimental/plugins/input_raspicam/input_raspicam.c, camera_control_callback(), 414): Received unexpected camera control callback event

So hours pass and much head scratching I finally tracked the problem to cambot.py  I have no idea what the problem is, other than I suspect a sever bind issue but the cambot.py script that's part of WebIOPi -0.7.0  causes the raspicam module stream to crash.

There is an earlier (1st) version of cambot attached that does not use the "new-style automatic setup/destroy/mapping" which I suspect is part of the problem NOTE* check the GPIO's used for the motors on this one there different and also NOTE* this statement in the script regarding the password.

# Instantiate the server on the port 8000, it starts immediately in its own thread
server = webiopi.Server(port=8000, login="cambot", password="cambot")

Also NOTE* that there is still a problem but this only shows its-self when you stop webiopi, it doesn't appear to effect the running program.

error: [Errno 98] Address already in use adds to my thought that server binding is the cause of this problem as well.

Someone (Tony) needs to test this code in the end because I don't have a bot for my cam but it should work.

So I double checked the whole installation again to a separate webiopi-0.7.0 installation to make sure all the different things I tried didn't contribute in any way... so here it is.

In home/pi/webiopi/examples/magpi-cambot
rename exsiting cambot.py to cambot2.py
rename existing index.html to index2.html

copy the attached files into the same folder
make cambot.py runnable (775)

sudo nano /etc/webiopi/config
enter following in relitive sections

myscript = /home/pi/webiopi/examples/magpi-cambot
doc-root = /home/pi/webiopi/examples
welcome-file = index.html

SETUP PI CAMERA MODULE 

plug in module blue tape facing RJ45 skt

sudo apt-get update
sudo apt-get upgrade 
sudo raspi-config           enable camera module and reboot

agree to reboot
at command prompt
startx
on lxterminal             raspistill -v -o test.jpg
should display picture proving camera is functioning

Then follow complete procedure from http://miguelmota.com/blog/raspberry-pi-camera-board-video-streaming/ including Update: 19 Jan 2014 - "Easier way to stream" do not follow BASH SCRIPT sections at this stage. (I suspect there is a shorter way to achieve end result but Im the kind of guy that says "if something works leave it alone"

at the end use this command to start the stream instead of the one listed:

LD_LIBRARY_PATH=/opt/mjpg-streamer/ /opt/mjpg-streamer/mjpg_streamer -i "input_raspicam.so -fps 15 -q 50 -x 640 -y 480" -o "output_http.so -p 8001 -w /opt/mjpg-streamer/www" &

point your browser at 192.168.x.xx:8001  and you should see MJPG-Streamer Demo page with stream

open another putty window and log on
sudo webiopi -d -c /etc/webiopi/config

point your browser at http://192.168.0.34:8000/webiopi/examples/magpi-cambot (you may be asked for password cambot   cambot)  you should be seeing the stream and buttons which when pressed should register POST on the terminal window

Now you can play with BASH SCRIPT to start mjpg-streamer at boot up

Hopefully it works for you

Toshi

cambot.py
index.html
stream.sh

info

unread,
Jun 10, 2014, 1:30:40 PM6/10/14
to web...@googlegroups.com

I did not understand why it was asking for a deferent username and password in the sw  ,yet every time I started it I just logged on as pi & raspberry, not being a programmer I just let it pass,

I had abounded my pi cam and switch back to a usb web cam and that worked except for the fact that the stream was red, I was working on finding new drivers when I got this email,

I will load up the new SW and see what happens,  if I get it going you guys can drive the bot around the house, avoid the pool if at all possible.  

Now I need to learn how to mount a usb drive so I can move the files. (Oh joy!)

I will keep you posted!

Best regards

Tony

--
You received this message because you are subscribed to a topic in the Google Groups "WebIOPi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/webiopi/CPS_dFTOTBc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to webiopi+u...@googlegroups.com.

info

unread,
Jun 10, 2014, 2:11:45 PM6/10/14
to web...@googlegroups.com

Guys I am starting over with afresh install as I have gummed this one up with all kinds of drivers installs and so on, my be a few hrs but I will not give up!

Thanks

 

 

From: web...@googlegroups.com [mailto:web...@googlegroups.com] On Behalf Of Toshi Bass


Sent: Tuesday, June 10, 2014 1:11 PM
To: web...@googlegroups.com
Cc: ta...@att.net

--
You received this message because you are subscribed to a topic in the Google Groups "WebIOPi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/webiopi/CPS_dFTOTBc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to webiopi+u...@googlegroups.com.

info

unread,
Jun 10, 2014, 6:39:18 PM6/10/14
to web...@googlegroups.com

 

 

Toshi / Todd

6 hrs latter,

I have a new install of wheezy installed and updated, the pi cam is in and works.

I have copied the files you sent me to there folders

I am un clear regarding the make command I need to run on the cambot.py file to make it run able.

 

Make cmabot.py runnable (775)

 

I man not getting the correct index.html page coming on my ip address:8000

I am getting the standard Webiopi page. The user id and password is now cambot cambot

 

Also please let me know what the directories and path should be with mjpg streamer as the install I run wants to create mjpg-streammer-code-xxx

Thank you both.

Tony

 

Never give up!

 

 

.

info

unread,
Jun 10, 2014, 6:43:26 PM6/10/14
to web...@googlegroups.com

Sorry forgot to incuse /etc/wbiopi/config (just the part I edited)

 

#------------------------------------------------------------------------#

 

[SCRIPTS]

# Load custom scripts syntax :

# name = sourcefile

#   each sourcefile may have setup, loop and destroy functions and macros

#myscript = /home/pi/webiopi/examples/scripts/macros/script.py

myscript = /home/pi/WebIOPi-0.7.0/examples/magpi-cambot/cambot.py

 

#------------------------------------------------------------------------#

 

[HTTP]

# HTTP Server configuration

enabled = true

port = 8000

 

# File containing sha256(base64("user:password"))

# Use webiopi-passwd command to generate it

passwd-file = /etc/webiopi/passwd

 

# Change login prompt message

prompt = "WebIOPi"

 

# Use doc-root to change default HTML and resource files location

#doc-root = /home/pi/webiopi/examples/scripts/macros

doc-root = /home/pi/WebIOPi-0.7.0/examples/magpi-cambot

# Use welcome-file to change the default "Welcome" file

welcome-file = index.html

 

#------------------------------------------------------------------------#

--
You received this message because you are subscribed to a topic in the Google Groups "WebIOPi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/webiopi/CPS_dFTOTBc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to webiopi+u...@googlegroups.com.

info

unread,
Jun 10, 2014, 10:33:45 PM6/10/14
to web...@googlegroups.com

Toshi / Todd!!!!

 

As of right now I have the mjpg streamer working as you outlined!

I am now reinstalling webiopi to try and find my mistake!!!

Thanks guys!

 

 

info

unread,
Jun 10, 2014, 11:47:17 PM6/10/14
to web...@googlegroups.com

Ok guys 12hrs in I have mjpg-streamer running very well.

But I still get the generic  webiopi logon screen?

 

WebIOPi Main Menu

GPIO Header

Control and Debug the Raspberry Pi GPIO with a display which looks like the physical header.

GPIO List

Control and Debug the Raspberry Pi GPIO ordered in a single column.

Serial Monitor

Use the browser to play with Serial interfaces configured in WebIOPi.

Devices Monitor

Control and Debug devices and circuits wired to your Pi and configured in WebIOPi.

Note that it requires

User name: cambot

PW: cambot

Below are the changes I made to /etc/webiopi/confg

Note: if I did not put the full path in the “myscriptipt =” line and just ended it as you asked me to without the combat.py I would get a 404 error in my web browser?

I still do not know what I was supposed to do with your request to “make combot.py runnable (775)”

I have goggled that a few times but no luck as yet.

Very best regards.

Tony ------------------------------------------------------------------------#



[SCRIPTS]
# Load custom scripts syntax :
# name = sourcefile
#   each sourcefile may have setup, loop and destroy functions and macros
#myscript = /home/pi/webiopi/examples/scripts/macros/script.py
myscript = /home/pi/WebIOPi-0.7.0/examples/magpi-cambot/cambot.py

#------------------------------------------------------------------------#

[HTTP]
# HTTP Server configuration
enabled = true
port = 8000

# File containing sha256(base64("user:password"))
# Use webiopi-passwd command to generate it
passwd-file = /etc/webiopi/passwd

# Change login prompt message
prompt = "WebIOPi"

# Use doc-root to change default HTML and resource files location
#doc-root = /home/pi/webiopi/examples/scripts/macros
doc-root = /home/pi/WebIOPi-0.7.0/examples/magpi-cambot
# Use welcome-file to change the default "Welcome" file

Welcome-file = index.html

#------------------------------------------------------------------------#

 

 

 

Toshi Bass

unread,
Jun 11, 2014, 2:37:35 AM6/11/14
to web...@googlegroups.com
Hi Tony

Clearly I was getting tired last night so sorry for few mistakes, of cause you were right about :

myscript = /home/pi/webiopi/examples/magpi-cambot/cambot.py
doc-root = /home/pi/webiopi/examples/magpi-cambot
welcome-file = index.html

and in your case webiopi directory is WebIOPi-0.7.0

Your config looks correct.

Make cambot.py runnable (775) should have had a bit more info, sorry

if you are using WinSCP right click on the cambot.py file choose properties and change to look like attachment or at the command prompt :

chmod 755 /home/pi/WebIOPi-0.7.0/examples/magpi-cambot/cambot.py

I think that should resolve the generic logon problem you have, but make sure your using following in your web browser:


Hope it finally works

Toshi



Capture.JPG

info

unread,
Jun 11, 2014, 2:39:50 AM6/11/14
to web...@googlegroups.com

Thanks my friend I will try now!

Best regards

Tony

 

 

From: web...@googlegroups.com [mailto:web...@googlegroups.com] On Behalf Of Toshi Bass


Sent: Wednesday, June 11, 2014 2:38 AM
To: web...@googlegroups.com

--
You received this message because you are subscribed to a topic in the Google Groups "WebIOPi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/webiopi/CPS_dFTOTBc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to webiopi+u...@googlegroups.com.

info

unread,
Jun 11, 2014, 3:02:49 AM6/11/14
to web...@googlegroups.com

Sir

If I put this in my browser it works!

I can live with it but do you have  any thoughts as to why the old stuff worked with just my ip and :8000

And if you happen to know how to start the stream on boot up?

I will put the rover back together when I get up, it is 3:00 am here and I am not seeing strget now,

Thanks so much. Is there a way I can get you the external ip address so you can try it out? I don’t think it would be a good idea to post my email address here or the ip address .

http://10.0.0.18:8000/WebIOPi-0.7.0/examples/magpi-cambot/

 

1000 times Thank you!

I am going to sleep! Ya it works!

THANKS

 

.

Toshi Bass

unread,
Jun 11, 2014, 7:57:57 AM6/11/14
to web...@googlegroups.com

Tony

Now I think about it you are right the lines: 

doc-root = /home/pi/WebIOPi-0.7.0/examples/magpi-cambot
welcome-file = index.html

should mean xxx.xxx.x.xx:8000 opens the cambot index file, must admit I cheated a bit and never properly modified my config file, however I tried it now and indeed it does not work, I also get the GPIO page like you so more head scratching, anyways it turns out there are a couple of things I am not familiar with here.

Firstly studying the cambot.py file, Eric does somethings I didn't see before in the "# Main server part" that got me thinking so I took another look at the magpi cambot articles and surprise it seams that :

1, The python script does not use in any way on the config file, the articles never mention it, so actually to run this program properly you need to delete the changes made in the config file as they are not be used. 
 
2, The python script is designed to be started using     sudo python /home/pi/WebIOPi-0.7.0/examples/magpi-cambot/cambot.py  again meaning the config file does not get called do not use sudo webiopi -d -c /etc/webiopi/config or sudo /etc/init.d/webiopi start , the cambot file actually starts the webiopi server..

3. The problem of "error: [Errno 98] Address already in use" we had on shutdown of the cambot script then does not occur and I now understand why it happened, we were starting 2 instances of webiopi , 1 via the config file and 1 via the python script.

4. Finally I think the issue of  xxx.xxx.x.xx:8000 not opening the cambot index file is not related to the above, I think there have been changes since WebIPOi -0.5.3 (Feb 2013 that's when the script was published) as according to the article to display the GPIO page you needed to enter 192.xxx.x.xx:8000/webiopi so it looks to me like the file structure for webiopi has changed, so in reality you will have to live with opening the cambot webpage with http://10.0.0.18:8000/WebIOPi-0.7.0/examples/magpi-cambot/  just make a shortcut in the web browser called cambot or something.

5. Actually the way Eric wrote this is pretty neat, because for instance for my setup I can have the config file setting up my sensors etc and pointing to my normal script.py file and index.html but without having to change anything in the config file, I can run cambot.

   So that answers the question why  the old stuff worked with just my ip and :8000  the old stuff meaning cambot2 that doesn't work with the raspi cam        module (and still doesn't by the way, I tried it again) 
 
So to sum up I strongly suggest you delete the changes made to the config file and run cambot from the prompt with sudo python /home/pi/WebIOPi-0.7.0/examples/magpi-cambot/cambot.py and access the web page with http://10.0.0.18:8000/WebIOPi-0.7.0/examples/magpi-cambot/.

Finally starting the stream at boot, there is a file in the cambot folder called stream.sh but this will not work as its for a usb camera, you need to follow the BASH SCRIPT section at the bottom of the web page http://miguelmota.com/blog/raspberry-pi-camera-board-video-streaming to produce 2 files called start_stream.sh and stop_stream.sh or alternatively (this may be easier) attached is a modified cambot.py file that starts and stops the stream automatically when you start / stop cambot.py it appears to work fine (don't forget to make this file runable when you copy it over the existing one).  

I hope that all works great for you because I am not going to be available over the next days, going for small vacation to Barcelona back 22nd.

Toshi


 

.

cambot.py

info

unread,
Jun 11, 2014, 3:28:10 PM6/11/14
to web...@googlegroups.com

Thank you enjoy yourself on vacation, I will post on the 23 and let you know where we are.

Thank you again

Very best regards.

 

 

From: web...@googlegroups.com [mailto:web...@googlegroups.com] On Behalf Of Toshi Bass


Sent: Wednesday, June 11, 2014 7:58 AM
To: web...@googlegroups.com

--
You received this message because you are subscribed to a topic in the Google Groups "WebIOPi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/webiopi/CPS_dFTOTBc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to webiopi+u...@googlegroups.com.

info

unread,
Jun 11, 2014, 6:00:31 PM6/11/14
to web...@googlegroups.com

 

 

Toshi,

Just in case you have not gone yet!

I have put the /etc/webiopi/conf file back to its proper state.

And I have done nothing with the new combot.py you sent in your last email.

The only thing not working now is the cam video showing up out side my local net.

If I go to http://10.0.0.18:8000/WebIOPi-0.7.0/examples/magpi-cambot/  I see everything I should.

If I go to http://(my external IP address):8000/WebIOPi-0.7.0/examples/magpi-cambot/ 

(from outside my local network) I get the camera box and control buttons. (no stream)

If I go to http://(my external IP address):8001 (from outside my local network) I get the

Mjpg streamer page as I should. So I am thinking something in cambot.py

 

I am going to catch up on some sleep, and if I can’t find the problem just work on the  rover hardware and some back ups so on,

More then enough work to be done.  

If anyone ells has any thoughts feel free to let me know.

Best regards

Tony

 

 

Toshi Bass

unread,
Jun 12, 2014, 2:33:39 AM6/12/14
to web...@googlegroups.com
Tony
They have Internet in Spain its just that I cannot try anything on the pi.

Try specifying full address like http:// external ip :8000/home/pi/WebIOPi-0.7.0/examples/magpi-cambot/

See if that works

Toshi

info

unread,
Jun 12, 2014, 2:39:14 AM6/12/14
to web...@googlegroups.com
I'll try that in the morning, 230 here, all my friends have gone to bed.
I'll talk to you when you get back enjoy yourself,\
And thank you.
Tony


-----Original Message-----
From: web...@googlegroups.com [mailto:web...@googlegroups.com] On Behalf Of Toshi Bass
Sent: Thursday, June 12, 2014 2:34 AM
To: web...@googlegroups.com
--
You received this message because you are subscribed to a topic in the Google Groups "WebIOPi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/webiopi/CPS_dFTOTBc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to webiopi+u...@googlegroups.com.

anthonydangelo

unread,
Jun 23, 2014, 4:57:04 PM6/23/14
to web...@googlegroups.com
 

To Toshi & anyone that thinks they may be able to help!

Toshi ! Welcome back!

Here we go! I have WebIOPi-0.7.0 running with the pi cam! However I have to use the older cambot.py that I was able to down load from http://files.trouch.com/cambot.zip  . When I try and use the new cambot.py file that comes with 7.0. Does nothing when I try to run it no error s nothing at all.

There is a comment in the new cambao.py that says this file uses the new-style automatic  setup/destroy/mapping

Need to change /etc/webiopi

But I have no clue what that means.

Setting the pins as the text shows everything works fine, but the left and right arrows are reversed.

i/e press left and it goes right press right and it goes left.  Note I tried all 24 pin combinations  and nothing seemed to work any better,  also the enable pins have no effect . I believe this is due to a change in the H-bridge. So I thought to my self just edit the index.html and switch the call out for the left & right. That worked fine left is left and right is right, But the video goes away if I try and make any change at all to the index.html file

any thoughts on this would be gratefully received!  

 

Thanks My friend

anthonydangelo

unread,
Jun 23, 2014, 5:39:48 PM6/23/14
to web...@googlegroups.com
Toshi!
Please disregard the part regarding :


*i/e press left and it goes right press right and it goes left.  Note I tried all 24 pin combinations  and nothing seemed to work any better,  also the enable pins have *no effect . I believe this is due to a change in the H-bridge. So I thought to my self just edit the index.html and switch the call out for the left & right. That worked *fine left is left and right is right, But the video goes away if I try and make any change at all to the index.html file

I edited the index.html on the pi with leafpad and it works fine now. kind of a cheat but hay it works. i still can not get the new cambot.py to do any thing but i am not sure that will give me anything anyway.
Best regards
Tony


On Thursday, June 12, 2014 2:33:39 AM UTC-4, Toshi Bass wrote:

Toshi Bass

unread,
Jun 24, 2014, 6:21:38 AM6/24/14
to web...@googlegroups.com
Hi Tony

I had another look at "new cambot.py file that comes with 7.0" and found the problem, There is a mistake in the code, Line 22 should read :

LS=22 # H-Bridge 1,2EN      < NOT LS=21 # H-Bridge 1,2EN     Note* GPIO 21 is not a usable GPIO

also Line 2 should read:    # Need to change /etc/webiopi/config   < just means you need to change the following lines in the config file to reflect your path route 

myscript = /home/pi/WebIOPi-0.7.0/examples/magpi-cambot/cambot.py

doc-root = /home/pi/WebIOPi-0.7.0/examples/magpi-cambo

welcome-file = index.html

Regarding MJPG-Streamer I am still using full setup found at http://miguelmota.com/blog/raspberry-pi-camera-board-video-streaming/ including experimental section, and I am starting and stopping MJPG-Streamer from within the cambot script, everything is working fine and smooth, I have attached my revised cambot.py file as example

To run      sudo webiopi -d -c /etc/webiopi/config     or once you have tested     sudo /etc/init.d/webiopi start    and point browser at    http://xxx.xxx.x.xx:8000/

Hope that solves this long running post

Toshi

Oh one final point leafpad is just a simple text editor there are plenty better ones to choose from: eclipse, notepad++, komodo,  personalty I use WinSCP as it makes copying and transferring files easy as well as having a integrated text editor and stuff.



cambot.py
index.html

info

unread,
Jun 24, 2014, 6:26:07 AM6/24/14
to web...@googlegroups.com

Hi Toshi!

Welcome home.

You are up late, it is 6:30 am here.

Thanks for the info I will print it out hand have a go at it.

Thanks
Best regards

Tony

 

 

 

From: web...@googlegroups.com [mailto:web...@googlegroups.com] On Behalf Of Toshi Bass


Sent: Tuesday, June 24, 2014 6:22 AM
To: web...@googlegroups.com

--
You received this message because you are subscribed to a topic in the Google Groups "WebIOPi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/webiopi/CPS_dFTOTBc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to webiopi+u...@googlegroups.com.

Toshi Bass

unread,
Jun 24, 2014, 6:41:42 AM6/24/14
to web...@googlegroups.com
Hi Tony

Can't say I'am glad to be back, Barcelona was absolutely great, I am in UK now its 11.30 am, so I think its you who is up early hahahah, anyway in few weeks I will be on vacation again to Rhodes (Greek Island) for 2 weeks so more chance to chill with nice cold beer.

Toshi

info

unread,
Jun 24, 2014, 6:46:01 AM6/24/14
to web...@googlegroups.com

God bless! Send me some contact in for an I will send you the ip for the cambot so you can drive it. My email address is Tony_d...@yahoo.com

It will be on line as soon as the ups truck drops of my battery for the Pi, some time to day.

Best regards.

And as always thanks!

Tony

 

 

 

From: web...@googlegroups.com [mailto:web...@googlegroups.com] On Behalf Of Toshi Bass


Sent: Tuesday, June 24, 2014 6:42 AM
To: web...@googlegroups.com

--

Reply all
Reply to author
Forward
0 new messages