Page 1 of 1

Foscam FI8904W

Posted: Sun Oct 06, 2024 12:50 pm
by Svenbobot
Hello, I'm a Linux newbie and I managed to get Zoneminder to work on my Linux Mint. But now I can't get the first of 7 Foscam webcams to work in Zoneminder. I started with the old Foscam FI8904W. I can see the image in the browser via this stream: http://User:Password@192.168.178.20:80/videostream.cgi
This works, but the same stream with rtsp doesn't work in Zoneminder. (rtsp://User:Password@192.168.178.20:80/videostream.cgi)

What other settings do I need to make so that the camera is displayed? Thank you for your help.

Re: Foscam FI8904W

Posted: Sun Oct 06, 2024 4:12 pm
by burger
RTSP is not the same as HTTP. You must specify the second path as HTTP. It should still work in FFMPEG source type. I don't know if that camera has RTSP paths or not. Check the user manual. The foscam I have uses RTSP at rtsp://user:password@192.168.45.185:88/videoSub or videoMain but I can't say whether it will work for yours or not, as it's a different model.

See https://wiki.zoneminder.com/Foscam
https://wiki.zoneminder.com/Foscam_FI8904W

Re: Foscam FI8904W

Posted: Mon Oct 07, 2024 3:51 pm
by Svenbobot
Thank you for your advice. Okay, rtsp is not the same as http. But how do I find out the rtsp port? The instructions don't say anything about it. On the internet I have port 88 or port 554. Nothing works. Am I setting it up wrong? I have the following address: rtsp://User:Password@192.168.178.20:88/videostream.cgi
or on my other Foscam camera: rtsp://User:Password@192.168.178.91:554/videoMain

Does it have to be rtsp? Can't you use http?

Re: Foscam FI8904W

Posted: Mon Oct 07, 2024 6:06 pm
by Svenbobot
With my newer Foscam I managed it using the VLC player: rtsp://@192.168.178.91:554/videoMain
But then it asks for user and password, twice. If I now use the address with password: rtsp://User:Password@192.168.178.91:554/videoMain

That doesn't work and I think that's also the reason why it doesn't work in Zoneminder.

Re: Foscam FI8904W

Posted: Mon Oct 07, 2024 6:20 pm
by burger
Svenbobot wrote: Mon Oct 07, 2024 3:51 pm But how do I find out the rtsp port?
https://wiki.zoneminder.com/Finding_Camera_Stream_Paths

Re: Foscam FI8904W

Posted: Wed Oct 09, 2024 4:55 am
by Svenbobot
I managed it, the cameras work. Where are the recordings saved?

Re: Foscam FI8904W

Posted: Wed Oct 09, 2024 5:50 pm
by Svenbobot
Unfortunately Zoneminder doesn't record. Is it possible to show me how to make the motion-controlled recording work?
Bildschirmfoto vom 2024-10-09 19-43-17.png
Bildschirmfoto vom 2024-10-09 19-43-17.png (164.42 KiB) Viewed 4833 times

Re: Foscam FI8904W

Posted: Wed Oct 09, 2024 6:33 pm
by burger
Default storage for Zoneminder is /var/cache/zoneminder/events. Although you may want to consider using external storage. See this link for instructions: https://wiki.zoneminder.com/Using_a_ded ... Hard_Drive

Check that permissions are correct. They should be www-data:www-data. Check that the folders are being created. Also, your log is showing as red on the top nav bar. Check that, maybe the timezone is incorrect or something.

Other than that, I'm not sure why it is not recording, but we should be able to figure it out. Check the above, and if that does not work then go into Options - Logging - LOG_LEVEL_FILE and set to Info. Restart ZM and go to /var/log/zm and see what the logs say.

What guide did you use to install? The best guides are at wiki.zoneminder.com/Debian and wiki.zoneminder.com/Ubuntu

Re: Foscam FI8904W

Posted: Wed Oct 09, 2024 8:26 pm
by Svenbobot
Thank you for your feedback and your help. I have cleared the time zone. It doesn't have to be an external storage device. If possible, the oldest files are always deleted automatically. I have attached a screenshot showing the storage settings in zoneminder and also the storage path; no folders are created there. Where should www-data:www-data be entered, under URL?

Here is an excerpt from a log file:
10/09/24 22:14:27.086032 zmc_m5[208131].INF-zm_monitor.cpp/1680 [Eingang (Cam3): 25700 - Capturing at 15.00 fps, capturing bandwidth 95119bytes/sec Analysing at 15.00 fps]
10/09/24 22:14:33.719371 zmc_m5[208131].INF-zm_monitor.cpp/1680 [Eingang (Cam3): 25800 - Capturing at 15.08 fps, capturing bandwidth 86982bytes/sec Analysing at 14.92 fps]
10/09/24 22:14:35.913324 zmc_m5[247471].ERR-zm_monitor.cpp/678 [Can't mkdir /var/cache/zoneminder/events/5: Permission denied]
10/09/24 22:14:35.913391 zmc_m5[247471].INF-zmc.cpp/220 [Starting Capture version 1.36.33]
10/09/24 22:14:38.708492 zmc_m5[247471].INF-zm_monitor.cpp/1680 [Eingang (Cam3): 0 - Capturing at 0.00 fps, capturing bandwidth 172bytes/sec Analysing at 0.00 fps]
10/09/24 22:14:40.033144 zmc_m5[247471].INF-zm_monitor.cpp/1680 [Eingang (Cam3): 60 - Capturing at 45.29 fps, capturing bandwidth 269991bytes/sec Analysing at 34.73 fps]
10/09/24 22:14:41.364447 zmc_m5[247471].INF-zm_monitor.cpp/1680 [Eingang (Cam3): 80 - Capturing at 15.02 fps, capturing bandwidth 102374bytes/sec Analysing at 15.02 fps]
Bildschirmfoto vom 2024-10-09 22-06-33.png
Bildschirmfoto vom 2024-10-09 22-06-33.png (171.97 KiB) Viewed 4812 times
Bildschirmfoto1.png
Bildschirmfoto1.png (102.38 KiB) Viewed 4812 times
I have Linux Mint, a friend sent me the instructions for installing it:
sudo apt update
sudo apt upgrade

sudo apt install mariadb-server

sudo su
mariadb

CREATE DATABASE zm;
CREATE USER zmuser@localhost IDENTIFIED BY 'zmpass';
GRANT ALL ON zm.* TO zmuser@localhost;
FLUSH PRIVILEGES;
exit;

exit

sudo apt install zoneminder
sudo chgrp -c www-data /etc/zm/zm.conf
sudo a2enconf zoneminder
sudo a2enmod cgi
sudo systemctl reload apache2.service

sudo mysql -u root -p < /usr/share/zoneminder/db/zm_create.sql
Enter bei Passwort
sudo mysql -u root -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"
Enter bei Passwort
sudo mysqladmin -u root -p reload
Enter bei Passwort

sudo systemctl restart zoneminder.service
sudo systemctl status zoneminder.service

Re: Foscam FI8904W

Posted: Thu Oct 10, 2024 2:08 am
by burger
Svenbobot wrote: Wed Oct 09, 2024 8:26 pm 10/09/24 22:14:35.913324 zmc_m5[247471].ERR-zm_monitor.cpp/678 [Can't mkdir /var/cache/zoneminder/events/5: Permission denied]
What does ls -l /var/cache/zoneminder say?
You probably have to:

Code: Select all

chown -R www-data:www-data /var/cache/zoneminder

Re: Foscam FI8904W

Posted: Thu Oct 10, 2024 6:30 am
by Svenbobot
sudo chown -R www-data:www-data /var/cache/zoneminder

Now everything seems to be working, thank you very much.
Let me ask one last question: where can I set how long the recordings remain on the hard drive before they are automatically deleted?