UP  |  HOME

Security Cameras

Hardware

Cameras

  • Amcrest IP5M-B1276EB-AI
  • Anpviz IPC-D3083WD-S
  • Panoeagle PG-YC2285I-ISU-28
  • Panoob PD94BA3-3M
  • Real HD IPC-Y4TR28A-C
  • Dafang DF3
  • Wyze C2

Network

  • hAP mini
  • mAP lite (future)

Machines

Software

hAP Mini config

This is on Router OS 6.4.10 so some things will change if you go to 7.x

The main things:

  • Configure the AP with hidden SSID, setup a WPA2 key
  • Bridge all the interfaces
  • Remove any references to WAN
  • Add the old WAN interface as a LAN list member
  • Set an IP address on the bridge interface, 10.20.0.1
  • Make a DHCP pool 10.20.0.100-10.20.0.199
  • Make a DHCP server on the bridge interface for 10.20.0.0
  • Add wireless client MAC addresses to the wireless access-list
  • Make sure wireless interface has "Default Authenticate" unchecked

The config looks like:

# nov/22/2023 09:11:08 by RouterOS 6.49.10
# software id = ---------
#
# model = RB931-2nD
# serial number = ------------
/interface bridge
add name=bridge1
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n country="united states" default-authentication=no \
    disabled=no hide-ssid=yes installation=indoor mode=ap-bridge ssid=teller wireless-protocol=802.11 \
    wps-mode=disabled
/interface list
add name=LAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa2-psk mode=dynamic-keys supplicant-identity=teller \
    wpa2-pre-shared-key="password"
/ip pool
add name=dhcp_pool1 ranges=10.20.0.100-10.20.0.199
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=bridge1 name=dhcp1
/interface bridge port
add bridge=bridge1 interface=ether1
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=wlan1yma42p_c2
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add interface=ether1 list=LAN
add interface=ether2 list=LAN
add interface=ether3 list=LAN
add interface=wlan1 list=LAN
/interface wireless access-list
add interface=wlan1 mac-address=FA:KE:MA:CA:DD:RS
add interface=wlan1 mac-address=FA:KE:MA:CA:DR:ES
add interface=wlan1 mac-address=FA:KE:MA:CA:DR:SS
add authentication=no forwarding=no interface=wlan1
/ip address
add address=10.20.0.1/24 interface=bridge1 network=10.20.0.0
/ip dhcp-server network
add address=10.20.0.0/24 dns-none=yes gateway=10.20.0.1 netmask=24
/ip firewall filter
add action=accept chain=input protocol=icmp
add action=accept chain=input connection-state=established
add action=accept chain=input connection-state=related
add action=drop chain=input in-interface-list=!LAN
/ip upnp interfaces
add interface=bridge1 type=internal
/system identity
set name=teller
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN

Home Assistant

Frigate NVR

Cameras

Each camera gets a main stream for recording, and a second substream to be used by frigate for detection.

General setup looks like:

  • Set a static IP address
  • Configure main and substream as below
  • Disable or configure lights
  • Disable audio stream if desired
  • Turn off unnecessary services (Onvif, Hik, Control protocols)
  • Disable Event/AI features (Motion detection, Alarms, AI recognition)
  • Change admin password, add frigate user with password
  • Configure NTP
  • Amcrest IP5M-B1276EB-AI
    • RTSP URL: rtsp://[username]:password@IPaddress:554/cam/realmonitor?channel​=1&subtype​=0

    Accessing Amcrest Products Using RTSP. This reference has the main and substream numbers reversed.

    For some reason Sub Stream 1 has limited resolutions so I disable it, and just use Sub Stream 2.

    • Main Stream Settings

      URL: rtsp://[username]:password@10.20.0.10:554/cam/realmonitor?channel​=1&subtype​=0

      Encode Mode
      H.264
      Smart Codec
      OFF
      Resolution
      2880x1620
      Frame Rate
      20
      Bit Rate Type
      CBR
      Bit Rate
      8192
      Frame Interval
      40
    • Sub Stream Settings

      URL: rtsp://[username]:password@10.20.0.10:554/cam/realmonitor?channel​=1&subtype​=02 Sub Stream 2

      Encode Mode
      H.264
      Resolution
      1280x720
      Frame Rate
      5
      Bit Rate Type
      CBR
      Bit Rate
      1024
      Frame Interval
      5
  • Anpviz IPC-D3083WD-S
    • RTSP URL: rtsp://[username]:password@IPaddress:554/Streaming/channels/101
    • Main Stream Settings

      URL: rtsp://[username]:password@IPaddress:554/Streaming/channels/101

      Video Type
      Video & Audio
      Resolution
      3200x1800
      Bitrate Type
      Variable
      Video Quality
      Highest
      Frame Rate
      20
      Max Bitrate
      16384
      Video Encoding
      H.264
      H.264+
      OFF
      Profile
      High Profile
      I Frame Interval
      40
      SVC
      OFF
      Smoothing
      50
    • Sub Stream Settings

      URL: rtsp://[username]:password@IPaddress:554/Streaming/channels/102

      Video Type
      Video & Audio
      Resolution
      1280x720
      Bitrate Type
      Variable
      Video Quality
      Medium
      Frame Rate
      6
      Max Bitrate
      1024
      Video Encoding
      H.264
      Profile
      Main Profile
      I Frame Interval
      6
      Smoothing
      50
  • Panoeagle PG-YC2285I-ISU-28 (Front Patio)

    TODO

    • RTSP URL: rtsp://[username]:password@IPaddress:554

    TODO

    • Main Stream Settings

      TODO

    • Sub Stream Settings

      TODO

  • Panoob PD94BA3-3M (Garage)

    This camera had issues with go2rtc timing out. I enabled the ffmpeg module per https://github.com/blakeblackshear/frigate/issues/5954, and it seems to have solved the issue.

    • RTSP URL: rtsp://[username]:password@IPaddress:554/stream0

    TODO

    • Main Stream Settings

      URL: rtsp://[username]:password@IPaddress:554/stream0

      Video Compression
      H265
      Resolution
      2560x1440
      Frame Rate
      20
      Bit Rate Type
      CBR
      Quality
      Best
      Bit Rate
      4096
      Frame Interval
      60
    • Sub Stream Settings

      URL: rtsp://[username]:password@IPaddress:554/stream1

      Video Compression
      H265
      Resolution
      640x360
      Frame Rate
      6
      Bit Rate Type
      CBR
      Quality
      Best
      Bit Rate
      512
      Frame Interval
      24

      Sub stream resolution is the only widescreen one.

    • Advance Encode
      Profile
      High Profile
  • Real HD IPC-Y4TR28A-C

    TODO

    • RTSP URL: rtsp://[username]:password@IPaddress:554

    TODO

    • Main Stream Settings

      TODO

    • Sub Stream Settings

      TODO

  • Dafang Hacks

    TODO I already have dafang hacks installed to microSD cards on my 3 cameras.

    They need to be configured for use with frigate.

    I want static IPs, and this comment suggests swapping around some pre-made config files then modify to suit. There's also this reference on the wiki.

  • General Camera Settings Checklist
    • Enable NTP (point to 10.20.0.2)
    • Enable DST, and manually configure start/end dates
    • Set the camera name
    • Put the date overlay in the upper right
    • Put the camera name overlay in the bottom right
    • Set admin password, add frigate user with password
    • Disable white lights