Framboise
Posts: 8
Joined: Thu Dec 13, 2012 10:22 pm

no access to motion server

Thu Dec 13, 2012 10:47 pm

Hi, first post so hope i am in the right thread.

I got the program 'motion' working so that it does detect movement and stores jpg's on a usbdrive.
However i can not access the streaming server on a local net (10.0.0.10:8081)
There are no error reports on the raspi side when i run motion -s .

i only get :

Unable to connect Firefox can't establish a connection to the server at 10.0.0.10:8081

when i enter that address into firefox.

What am i doing wrong here?
(On the same raspi i have apache2 server running ok on port:80)

greetings,
Framboise

manc
Posts: 2
Joined: Wed Dec 19, 2012 4:39 pm

Re: no access to motion server

Wed Dec 19, 2012 4:41 pm

Oddily I am also suffering this problem also.

I have recently installed 2012-12-16-wheezy-raspbian.zip which I wonder maybe the cause.

mikerr
Posts: 2736
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: no access to motion server

Fri Dec 21, 2012 11:29 pm

Motion by default restricts it's web server to localhost only (i.e. on the Pi itself)

The relevant lines in /etc/motion/motion.conf are:

Code: Select all

webcam_localhost on

control_localhost on
Both the above lines should be set to off if you want web access from another computer:

Code: Select all

webcam_localhost off

control_localhost off
Android app - Raspi Card Imager - download and image SD cards - No PC required !

Framboise
Posts: 8
Joined: Thu Dec 13, 2012 10:22 pm

Re: no access to motion server

Wed Dec 26, 2012 12:40 pm

Thanks for that!
it seems to work now.
Although i only get it to work on low resolution 352x288
When i use 640x480 it does not connect.
I use a logitech pro 9000 webcam.

i will try and fiddle with it some more

regards

Framboise

flutey
Posts: 4
Joined: Mon Sep 02, 2013 12:37 pm

Re: no access to motion server

Mon Sep 02, 2013 12:44 pm

Hi all,

Beginner here. I managed to get motion running and I'm accessing the Pi using local access. I'm trying to access it remotely. I already setup ddclient and it's running. Also tested my ddns and I can get access to my router. But I totally cannot get access to my Pi. When I try accessing it, all I get is The Connection was reset.

What else do I need to set. I have googled and setup my whole system at least 20 times but still nothing. Motion works, but I cannot stream to the internet or access it via ddns.

Thanks. in advance.

flutey
Posts: 4
Joined: Mon Sep 02, 2013 12:37 pm

Re: no access to motion server

Mon Sep 02, 2013 2:51 pm

Scratch my last post. Managed to do it. Next is to try and get 2 webcams on the pi.

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: no access to motion server

Tue Sep 03, 2013 4:39 am

flutey wrote:Scratch my last post. Managed to do it. Next is to try and get 2 webcams on the pi.
I've got 2 webcams on my Pi now.
Easy enough to do, just configure motion.conf with all the general settings, uncomment thread1.conf and thread2.conf down the bottom and put the cam specific settings in thread1 and thread2.conf
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

flutey
Posts: 4
Joined: Mon Sep 02, 2013 12:37 pm

Re: no access to motion server

Tue Sep 03, 2013 2:27 pm

Not sure what to put. I see the webcam in each conf file as /dev/video0 and /dev/video1

at the bottom is:


# Live Webcam Server
############################################################

# The mini-http server listens to this port for requests (default: 0 = disabled)
webcam_port 8081

# Command to be executed when a picture (.ppm|.jpg) is saved (default: none)
# The filename of the picture is appended as an argument for the command.
on_picture_save /usr/local/motion-extras/camparse1.pl

# Command to be executed when a movie file (.mpg|.avi) is closed. (default: none)
# Filename of movie is appended as an argument for the command.
on_movie_end /usr/local/motion-extras/mpegparse1.pl

What do I need to do. When I ran this, my video stops. Not sure what to do next. I saw your blog and you're running another way. Will try that next as soon as I succeed with just motion.

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: no access to motion server

Wed Sep 04, 2013 1:33 am

flutey wrote:Not sure what to put. I see the webcam in each conf file as /dev/video0 and /dev/video1

at the bottom is:


# Live Webcam Server
############################################################

# The mini-http server listens to this port for requests (default: 0 = disabled)
webcam_port 8081

# Command to be executed when a picture (.ppm|.jpg) is saved (default: none)
# The filename of the picture is appended as an argument for the command.
on_picture_save /usr/local/motion-extras/camparse1.pl

# Command to be executed when a movie file (.mpg|.avi) is closed. (default: none)
# Filename of movie is appended as an argument for the command.
on_movie_end /usr/local/motion-extras/mpegparse1.pl

What do I need to do. When I ran this, my video stops. Not sure what to do next. I saw your blog and you're running another way. Will try that next as soon as I succeed with just motion.
Comment out the on_picture_save and on_movie_end lines for now
If thread1.conf and thread2.conf both have webcam_port <port number> in each file, then you should be able to access each individual webcam on http://<your pi ip>:8081 and http://<your pi ip>:8082

Motion is the easier way of doing it
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

flutey
Posts: 4
Joined: Mon Sep 02, 2013 12:37 pm

Re: no access to motion server

Sat Sep 07, 2013 9:04 am

Thanks. Had to redo my image a few times. I can view both cameras for a short while and then the connection was reset msg comes out again. I wonder if it's a hardware issue as I am using a Logitech and an A4Tech camera.

I did comment out the 2 lines. Not trying out each feature and seeing how it works with a reboot each time

mikehudsonuk
Posts: 1
Joined: Fri Sep 13, 2013 2:51 pm

Re: no access to motion server

Fri Sep 13, 2013 2:55 pm

I came across this post when looking for a solution to my problem, namely:

motion.conf edited to switch off local only webcam and control options
could see control option on 8081
no connection on 8080 (or whichever port I tried)

Then I RTFM for motion: the output for the webcam is in a stream format that not many web browsers understand. I.e not chrome, and not internet explorer. Firefox is not brilliant but it does work.

So, if like me, you've come here with similar issues, try connecting to the webcam using firefox. Then go the motion website and read the manual for better solutions.

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: no access to motion server

Sat Sep 14, 2013 1:17 pm

Working in chrome for me at the moment.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

rasusr
Posts: 22
Joined: Thu Jul 04, 2013 3:46 am

Re: no access to motion server

Tue Oct 01, 2013 2:43 am

SirLagz wrote: I've got 2 webcams on my Pi now.
Easy enough to do, just configure motion.conf with all the general settings, uncomment thread1.conf and thread2.conf down the bottom and put the cam specific settings in thread1 and thread2.conf
Lagz,
I'm trying to do two webcams, but haven't gotten it to work so far. What OS are you using? Also, in the thread1.conf and thread2.conf files, how did you point to the two USB webcams? Like this?

Code: Select all

# in thread1.conf
videodevice /dev/video0
...
# in thread2.conf
videodevice /dev/video1

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: no access to motion server

Tue Oct 01, 2013 4:19 am

rasusr wrote:
SirLagz wrote: I've got 2 webcams on my Pi now.
Easy enough to do, just configure motion.conf with all the general settings, uncomment thread1.conf and thread2.conf down the bottom and put the cam specific settings in thread1 and thread2.conf
Lagz,
I'm trying to do two webcams, but haven't gotten it to work so far. What OS are you using? Also, in the thread1.conf and thread2.conf files, how did you point to the two USB webcams? Like this?

Code: Select all

# in thread1.conf
videodevice /dev/video0
...
# in thread2.conf
videodevice /dev/video1
Using Raspbian. and yes, like that
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

lenkf
Posts: 19
Joined: Wed Jul 10, 2013 10:02 pm
Location: S.California

Re: no access to motion server

Fri Oct 04, 2013 5:36 pm

Things to check that may be missed:

1) if the pi is wireless, and you have forced MAC address control in the wireless access point device, modify the wap to include the MAC address of the wireless device (dongle) attached to the pi.

2) if you want to see the MAC away from home, like at the local coffee shop, make sure your router has been correctly configured. On my router its called "virtual server". Your router has an IP address on the internet, so you tell the "virtual server" that any requests for port 8081 (for example) from the internet shall be forwarded to the ip address of your local rpi's (on your inside network) motion http server (8081 for example).

If your modem/router/wirelessAP is provided by your internet service provider, you may have to contact the isp to get the logon information (name/password) so you can logon to the router's http server to setup port forwarding.

Fred

TreacleWench
Posts: 8
Joined: Mon Oct 07, 2013 10:22 am

Re: no access to motion server

Mon Oct 07, 2013 10:47 am

I'm having issues with this as well.

My camera is detected by the Pi, the camera's light is on, I can visit the config webpage (localhost and external) but when I try to go to the webcam view page, it doesn't work. The browser loads for a second or two then stops and the last webpage I was viewing stays on the screen, I don't even get a blank page or an error message.

Any ideas?

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: no access to motion server

Mon Oct 07, 2013 4:08 pm

Can you access the stream via VLC rather than via web browser ?
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

TreacleWench
Posts: 8
Joined: Mon Oct 07, 2013 10:22 am

Re: no access to motion server

Mon Oct 07, 2013 4:18 pm

SirLagz wrote:Can you access the stream via VLC rather than via web browser ?
Nice suggestion, I'll try it when I get home later. :)

TreacleWench
Posts: 8
Joined: Mon Oct 07, 2013 10:22 am

Re: no access to motion server

Thu Oct 10, 2013 8:30 am

Hi, sorry it took so long for me to reply.

VLC didn't work either, I got a 'Cannot connect to stream' error. Also, occasionally I get a '404 Page not found' error when trying to view in a web browser (strangely, not everytime).

It almost seems like a problem with the web server, although the config page works fine. I even tried stopping Apache to see if there was a conflict but it made no difference.

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: no access to motion server

Thu Oct 10, 2013 1:38 pm

When motion is running, can you run a

Code: Select all

lsof -i | grep 8081
on the Pi to see what the output is (assuming that you're using default settings) ?
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

TreacleWench
Posts: 8
Joined: Mon Oct 07, 2013 10:22 am

Re: no access to motion server

Thu Oct 10, 2013 2:56 pm

SirLagz wrote:When motion is running, can you run a

Code: Select all

lsof -i | grep 8081
on the Pi to see what the output is (assuming that you're using default settings) ?
Well I did that (had to install lsof using apt-get first) and it returned no output at all??

I am using the default port settings.

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: no access to motion server

Fri Oct 11, 2013 1:13 am

That means that motion either isn't running, or isn't listening on that port.
Is motion running ?
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

TreacleWench
Posts: 8
Joined: Mon Oct 07, 2013 10:22 am

Re: no access to motion server

Fri Oct 11, 2013 8:46 am

I've checked and Motion is already running, see below:
Screenshot_2013-10-11-08-58-18.png
Screenshot_2013-10-11-08-58-18.png (13.69 KiB) Viewed 71761 times
Here's my server settings as well:
Capture.PNG
Capture.PNG (26.36 KiB) Viewed 71761 times
Its very strange as I believe I have followed the online guides to the letter. I do appreciate your help, I'd love to get this working :)

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: no access to motion server

Fri Oct 11, 2013 12:44 pm

Can you run "ps aux | grep motion" and paste the output
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

TreacleWench
Posts: 8
Joined: Mon Oct 07, 2013 10:22 am

Re: no access to motion server

Fri Oct 11, 2013 1:26 pm

Here it is...
Screenshot_2013-10-11-14-17-05.png
Screenshot_2013-10-11-14-17-05.png (12.38 KiB) Viewed 71720 times
Thanks.

Return to “General discussion”