Disable Screen Blanking
sudo raspi-config
Display Options > Screen Blanking
Update System
sudo apt update && sudo apt dist-upgrade -y
Install omxplayer and dnsmasq
sudo apt install omxplayer dnsmasq
DISCONNECT FROM NETWORK
Setup Static IP Address on eth0
sudo nano /etc/dhcpcd.conf
interface eth0 static ip_address=192.168.0.10/24
Restart dhcpcd Service
sudo systemctl restart dhcpcd
View Current IP Address
ip a
Move Current dnsmasq Settings
sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
Configure dnsmasq
sudo nano /etc/dnsmasq.conf
interface=eth0 dhcp-range=192.168.0.11,192.168.0.254,255.255.255.0,24h address=/#/192.168.0.10 dhcp-leasefile=/var/lib/misc/dnsmasq.leases
Enable and Start dnsmasq Service
sudo systemctl daemon-reload sudo systemctl enable dnsmasq sudo systemctl start dnsmasq
CONNECT IP CAMERA
Monitor DHCP Leases
tail -f /var/lib/misc/dnsmasq.leases
Add Host Entry to dnsmasq
sudo nano /etc/dnsmasq.conf
dhcp-host=00:00:00:00:00:00,192.168.0.229
Restart dnsmasq Service
sudo systemctl daemon-reload sudo systemctl restart dnsmasq
View IP Camera
omxplayer "rtsp://username:password@ip_of_camera:554/cam/realmonitor?channel=1&subtype=0"
Create Camera Service
sudo nano /etc/systemd/system/camera.service
[Unit] Description=Camera After=network.target [Service] Type=simple User=root Group=root ExecStart=/usr/bin/omxplayer "rtsp://username:password@ip_of_camera:554/cam/realmonitor?channel=1&subtype=0" Restart=always RestartSec=10 [Install] WantedBy=multi-user.target
Enable and Start camera service
sudo systemctl enable camera sudo systemctl start camera
Enable Read-only File System
sudo raspi-config
Performance Options > Overlay FS
Leave a comment