Re: ReadyNAS Ultra 2 (x86) 4.2.21 / Foscam FI8905W / kmotion Ver 2.15a Beta = Not working?

474 views
Skip to first unread message

dave selby

unread,
Sep 1, 2012, 8:31:29 AM9/1/12
to kmotion...@googlegroups.com, karl.wa...@gmail.com


On Friday, 31 August 2012 13:36:08 UTC+1, (unknown) wrote:
NAS (w. add-ons):
ReadyNAS Ultra 2 running RAIDiator 4.2.21
kmotion Ver 2.15a Beta
Python2.7

IP-Camera(s):
Foscam FI8905W
Device Firmware Version               11.25.2.46
Device Embeded Web UI Version  2.4.9.16
IP: 192.168.0.184
User: admin
Pass: password
Running: 640x480

Hi!

First off, THANKS for a great product and your time developing it (if this is the admin reading) otherwise, Hi and thank you for trying to help me.
I am trying to get kmotion working with my Foscam IP-cameras and I can't seem to get it to work.

Hi Karl,

ReadyNAS use a very modified version of kmotion and so I do not know it too well, but I will try ... OK enter

http://192.168.0.184/snapshot.cgi
and fill in the username and password in the kmotion GUI
And Apply,

Does that work ?

Cheers

Dave



 
I am trying to configure "Camera 1" and have entered the following:
Device: Network Cam
URL: http://192.168.0.184/videostream.cgi
all other settings are default.

After I tried applying them with "Apply" I get the warning about possible freezing and then nothing happens.
I get a blue illustration of a camera but no picture / video.

I tried substituting the url with the one I found here (see link below) since I guessed that due to username and password kmotion can't log in:
http://192.168.0.184/videostream.cgi?user=admin&pwd=password
I also tried this:
http://192.168.0.184/videostream.cgi?user=admin&pwd=password&resolution=32&rate=6 
as well as these:
http://192.168.0.184/videostream.cgi?user=<admin>&pwd=<password> 
http://192.168.0.184/videostream.cgi?user=<username>&pwd=<password>&rate=6 
http://www.zoneminder.com/wiki/index.php/Foscam 

I would be most grateful for any and all assistance.

Best Regards - Karl, Sweden

dave selby

unread,
Sep 1, 2012, 8:53:26 AM9/1/12
to kmotion...@googlegroups.com, karl.wa...@gmail.com


On Saturday, 1 September 2012 13:38:56 UTC+1, (unknown) wrote:
Hi Karl,

ReadyNAS use a very modified version of kmotion and so I do not know it too well, but I will try ... OK enter

http://192.168.0.184/snapshot.cgi
and fill in the username and password in the kmotion GUI
And Apply,

Does that work ?

Cheers

Dave

Hi Dave, thank you for your reply.
I solved it with the solution below but have a few additional questions and I understand if you can't answer them due to the fact that the version of kmotion is quite modified but I am taking a chance anyway:

- Is there anyway to edit sensitivity regarding the motion detection if the camera does not support it through its own web-interface (i.e. a setting in Kmotion)?

Yep, sure, take a look at

http://www.youtube.com/watch?v=qtAiv4jfF3w&feature=relmfu

you can access all the underlying motion configurations, there are a lot of them including ones to change sensertivity

 
- Is there anyway to access the kmotion add-on from the internet and not just when I am on the same LAN?
(This might a question better suited for the ReadyNAS forum)

Yep, no problem, its really an issue of port forwarding you kmotion port to the outside world, during testing I was accessing several remote systems around the world.

Glad you got it working :)

Dave
 

Solution (Foscam FI8905W):

Remark: When naming the camera internally for kmotion, "Swedish" (in a lack of better words) characters like Å,Ä and Ö does not seem to work. When naming the camera with these letters the camera wont even start.

Credit for the command lines go to sleepy06405 (see link) I simply tried it and had to do some workarounds at some points due to inexperience(?) at my part. All hail sleepy06405, the saviour of my Foscam and solver of problems. Hail him. And of course hail the creator, hail him.

The settings in kmotion that worked for me after the fix below:
user: username
password: password
Never had to specify any ports, running on port 80 (no need to specify, default?)

port 80 by default, you cam must also use port 80
 

Installed "EnableRootSSH" addon
Possible restart
Downloaded and installed WinSCP
(In WinSCP) 
hostname: readynas ip
username: root
password: same as admin password for the NAS
possible question about trusting/adding certificate when connecting for the first time = Yes/OK

I never managed to log in using SSH as "admin" only as "root" (there is a difference I believe).
Therefore I was logged in as "root" at all times during this.
What the command does and how you can do it manually (Disclaimer: I am not liable even if this is wrong and bricks your NAS.). Everything between brackets "[]" are my comments on how to do it the GUI-way(ish).

As root:
rm /c/.kmotion/fifo* 
[Remove all files in the folder .kmotion starting with "fifo"]
[then press "..."]
chmod -R 777 /c/.kmotion 
[Right click on the folder .kmotion and select "Settings" and write "0777" where the numbers are, press "OK"]

As admin:
/c/.kmotion/install.py 
[This step I needed to run the command prompt that is built in, in WinSCP, press the button that looks like a classic DOS-prompt, black background and white text.Press it and click "OK" or"Accept" if any warning or prompt comes up. Paste the above code and press enter. Depending on where you are in the file hierarchy this might not work. We have relative paths and absolute paths meaning if I write simply "install.py" this will work, if I am in the /c./komotion/ folder. This is an example of a relative path and an absolute path would be specifying the whole path]

As root:
cd /c/.kmotion 
[Navigate graphically so you are in the .kmotion folder that is in the folder /c./]
mv kmotion /usr/local/bin 
[Move the kmotion.py file to /usr/local/bin, for me I had to explicitly state that the file extension was .py, simply writing the above command without ".py" did not work]
mv kmotion_ptz /usr/local/bin
[Move the komotion_ptz, possible .py extension to /usr/local/bin, also please see above]
chmod -R 777 /c/.kmotion
[Right click on the komotion folder and see that it still (?) has 0777]

Link: 

Addendum:
Please install the FFmpeg extension for recording .swf-movies.
To save your "Display Select, go to Config -> and tick Save the current 'Display Select' configuration and current style as defaults.
Credit where credit is due (see the top).
I take no responsibility if this information in anyway damages files, your NAS, your life etc.

Please feel free to expand on this and offer corrections and clarification.
I have written this out of memory after doing this myself and I might have forgotten a step or simply entered the wrong kind of information.

Any poor grammar skills are due to the fact that it is (was) late, I am tired as well as I just wanted to write this down as quickly as I could so I wouldn't forget anything. 

dave selby

unread,
Sep 1, 2012, 11:31:25 AM9/1/12
to kmotion...@googlegroups.com, karl.wa...@gmail.com

Thanks again Dave for the prompt reply.

Regarding accessing it from the internet via dynamic dns, it was as you said I just had to forward port 8885 with the internal IP from the ReadyNAS with my router and now it works :)

Two final questions:

1) Is there anyway to enable a log-in prompt before entering kmotion?
As it works now anyone who knows my address can just enter it and view the cameras live as well as archived clips. 
The password prompt only comes up when entering "Config".

In the original kmotion2, the user and password is asked for when you first log in as per screenshot, its possible readyNAS removed this thinking it would always been used on a secure LAN?
 


If you do not have this it is an issue :(
 
2) I looked at the video and tried opening the following files in both /c/.kmotion/core/motion_conf/ and /c/.kmotion/virtual_motion_conf:
motion.conf
thread01.conf

I tried searching for some setting named "motion default" or "motion_value" etc., simply a value that was for instance "100" which I just could alter to "75" or "60" and experiment what works best for me but I could not find any such value. Am I looking into the wrong directory or viewing the wrong files?

looks like you will need to go to ...  /c/.kmotion/virtual_motion_conf
edit thread01.conf (assuming its camera 1 you want to tweak)

you can then access most of the config options in ...

http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionGuideOneLargeDocument#Motion_Detection_Settings

So for motion sensertivity I would use threshold ... quote ...


threshold

Threshold for declaring motion. The threshold is the number of changed pixels counted after noise filtering, masking, despeckle, and labelling. The 'threshold' option is the most important detection setting. When motion runs it compares the current image frame with the previous and counts the number of changed pixels after having processed the image with noise filtering, masking, despeckle and labeling. If more pixels than defined by 'threshold' have changed we assume that we have detected motion. Set the threshold as low as possible so that you get the motion you want detected but large enough so that you do not get detections from noise and plants moving. Note that the larger your frames are, the more pixels you have. So for large picture frame sizes you need a higher threshold. Use the -s (setup mode) command line option and/or the text_changes config file option to experiment to find the right threshold value. If you do not get small movements detected (see the mouse on the kitchen floor) lower the value. If motion detects too many birds or moving trees, increase the number. Practical values would be from a few hundred to 2000 indoors and 1000-10000 outdoors.


So add the following to thread01.conf

threshold 100

Save it, then

kmotion restart

and give it a go

Cheers

Dave




 
Once again, THANKS for all your help.

dave selby

unread,
Sep 2, 2012, 3:01:25 AM9/2/12
to kmotion...@googlegroups.com, karl.wa...@gmail.com


On Saturday, 1 September 2012 19:03:47 UTC+1, TheSwede86 wrote:
Dave, you are the best.
Thanks a bunch, I am currently experimenting with the settings and I am now around 6000 due to trees, wind and other objects moving but 6000 or possible a bit more seems to do it for me (FI8905W) outdoors.

Again, I am very grateful for your assistance.

My Pleasure,

Oh don't forget, if you have a lot of tree movement, you can use the mask for the most 'moving' part in the kmotion config gui

Cheers

Dave
 
Reply all
Reply to author
Forward
0 new messages