Not Available

Creating an IP Camera Monitor using a Raspberry Pi

Not Available

 

I love working with the Raspberry Pi,  I never really sank myself into the ins and outs, just 'played' with it. 

Now I had a project!!!!

We had a Harbor Fright (yep) camera setup $125 for a 2 cam setup.  Totally Proprietary hardware. 

Then we started on the Blink Camera system.  Again Proprietary!

A base setup is a 2 Camera Blink kit.  $178 at the time of this article.

Raspberry Pi 4 = $90 for the best/newest

IP PTZ Camera = $50 this is the one I used(non PTZ  $35)

So, Yes, $140 and one camera.  But Now we have a non-proprietary Standard platform.
(and adding cameras @ $50 a piece not $90)

And I still have to use a Tablet to control it but we will get back to that.

Just a little bit about Blink.
Blink requires all cameras to be tied to this main link module that could barely 
receive a signal 2 rooms away.  

My WIFI is everywhere!!!!!

Just so you know ...
This article only provides a dedicated monitor for one IP camera.

TODO:
 - Signal through Pi an audible sound of motion somewhere
 - Show All Cams then fullscreen on the one with motion detected
 


1. Setup Your Raspberry Pi

Obviously you need a working system.  Below are links to what I used.

My Clean Pi Operating System Setup

Raspberry Pi OS with desktop
Release date: January 11th 2021
Kernel version: 5.4
Size: 1,171MB

Configure your OS to boot to the GUI Desktop.


2. Hardware Used

I used an old Raspberry Pi 3b+,
I would have used my Pi 4 but it is running Octoprint.

Case - iUniker - Because of the fan

Memory Card - 32g SanDisk Extreme PRO

Camera - Alptop AT-200DW
 - I set it up and use a Tablet to control it when needed.
 - Not bad for the price.
 - Best of all, They had a command line parser.  If the camera you are looking at
    does not have this or some documentation on building a command line, forget it.
 - Took me two weeks of anger before I found that web page.


3. Installing the Needed Software

Open up Terminal  and do the usual upkeep

sudo apt-get update

sudo apt-get -y upgrade

Then the Software

sudo apt-get install -y motion

sudo apt-get install -y unclutter

sudo apt-get install -y xdotool

unclutter removes the mouse cursor from the screen and
xdotool helps in scripting

sudo apt-get autoremove

to clean up the repositories

 


4. Configuring the System

Tweaking File Manager

Click on the RaspBerry button
Right-Click on Accessories > File Manager
Select Properties
Click Desktop Entry
Change pcmanfm %U
to sudo pcmanfm %U

Now editing files is much easier

Turning Off AutoBlanking
Keeps Screen on all of the time

Open Terminal and enter

sudo raspi-config

Using the arrow keys select Display Options
Select Screen Blanking
Choose No
Click Ok

Now Setup a Back Door
Select  Interface Options
Select SSH
Choose Yes
Click Ok


Click Finish
Click Yes to Reboot


5. Configuring Motion

Setup Folder For Clips

Open Terminal and enter

mkdir /home/pi/motion-clips
sudo chgrp motion /home/pi/motion-clips
sudo chmod a+rwx /home/pi/motion-clips

If you are using an external drive here is where you set it up
I am not there yet, i will update this when I am.

Close Terminal

//-------------------------------------------------------------------------------------

Open File Manager and open /etc/motion/motion.conf

Change

daemon off to on
log_level 6 to 1 almost no logging
width 320 to whatever your camera is 1920 for me
height 240 to whatever your camera is 1080 for me
framerate 2 to 100

output_pictures on to off
quality 75 to 100
ffmpeg_output_movies on to off
ffmpeg_video_codec mkv to mp4
stream_quality 50 to 100
stream_maxrate 1 to 100
stream_localhost on to off
target_dir /ver/lib/motion to /home/pi/motion-clips
webcontrol_localhost on to off
quiet off to on
Remove the ; on ; camera /etc/motion/camera1.conf

now the fun part... Easy First...

Find the netcam_userpass and set it as directed
Remove the first semicolon on the line
NOTE: Always password protect your Cameras

Hard part..

Above netcam_userpass is netcam_url
Remove the first semicolon on the line.

My connection string is rtsp://192.168.68.118/11
If you are having problems, this is probably it.

I found the string parser by google search: Cam Model number Command Line
Your documentation may also have it.  rtsp:// is the one you really want
but any of the services listed below will work
http:// ftp:// mjpg:// rtsp:// mjpeg:// file:// or rtmp://



Save and Close the file

//-------------------------------------------------------------------------------------


Open File Manager and open /etc/default/motion

Change

start_motion_daemon=no to yes

Save and Close the file


//-------------------------------------------------------------------------------------



Open File Manager and open /etc/rc.local

Choose Open not Execute

Above exit 0 type this

echo
echo Starting Motion Service
motion
echo

save and close the editor (I use Geany)
sudo not needed as these commands are executed as root

reboot

//-------------------------------------------------------------------------------------

 Now you should be able ot open a Browser and type in

localhost:8080

to show all cameras, or

localhost:8081

for the first camera only


6. Fine Tuning

 To Be Continued
 


A. Starting Kiosk Mode AutoStart

Open up File Manager
Click on View > Show Hidden

we will be creating this path

/home/pi/.config/lxsession/LXDE-pi

You should now see the .config folder in the side pane
Click on that.
If you do not see a folder named lxsession
then click on the folder with a plus sign icon and name the new folder lxsession
click on lxsession
If you do not see a folder named LXDE-pi
then click on the folder with a plus sign icon and name the new folder LXDE-pi
Close File Manager

Open Terminal and enter

sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart

Enter this

@chromium-browser http://localhost:8081 -kiosk

press ctrl-x then y then enter

enter

sudo reboot

 

B. Stopping Kiosk Mode AutoStart

ssh into the raspberry pi - I Use PuTTY

log in to the pi and type

sudo rm  /home/pi/.config/lxsession/LXDE-pi/autostart

sudo reboot

 


Not Available