1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Bairelay sample configuration. Copy to config.toml and edit.
# Every commented-out key shows its default.
= "0.0.0.0"
# bind_port = 8554
# TLS server. Plain RTSP keeps running on bind_port; TLS adds a second
# listener on tls_bind_port. Set bind_port = 0 to disable plain.
# certificate = "/path/to/cert-and-key.pem" # PEM with cert chain + key
# tls_bind_port = 8555
# tls_client_auth = "none" # none | request | require
# tls_client_ca = "/path/to/ca.pem" # required when client_auth != none
# Grace window before idle StreamSources are pruned. 0 disables.
# Keep ≤ each camera's idle_disconnect_timeout_secs so the source
# can never outlive the Baichuan session it pulls from.
# stream_prune_grace_secs = 30
# RTSP user accounts. Without any [[users]], connections are anonymous.
# [[users]]
# name = "me"
# pass = "my-password"
# MQTT bridge. Remove the [mqtt] block to run RTSP-only.
# [mqtt]
# broker_addr = "192.168.1.50"
# port = 1883
# credentials = ["user", "password"]
# ca = "/path/to/broker-ca.pem"
# client_auth = ["/path/to/client.pem", "/path/to/client.key"]
# Root segment for every owned MQTT topic and HA discovery
# unique_id/identifier. Set to "neolink" for legacy migration.
# topic_prefix = "bairelay"
# HA MQTT discovery. Presence of [mqtt.discovery] enables it.
# [mqtt.discovery]
# topic = "homeassistant"
# features = [
# "floodlight", "camera", "motion", "led", "ir",
# "reboot", "pt", "battery", "siren",
# ]
# Local wake server.
# Replaces Reolink's cloud P2P servers for waking battery cameras.
# Operator must redirect DNS for p2p*.reolink.com to this box.
# [wake_server]
# enable = false # opt-in
# middleman_port = 9999 # UDP, C2M_Q listener
# register_port = 58200 # UDP, D2R_HB / C2R_C / D2R_DISC listener
# heartbeat_ms = 20000 # echoed to cameras in R2D_HB_R
# stale_after_ms = 80000 # registry entries older than this read as None
# Motion-push listener.
# Treats the camera's TCP connect to pushx.reolink.com as a motion event.
# Operator must redirect DNS for pushx.reolink.com to push_listener_addr.
# [push_listener]
# enable = false # opt-in
# push_listener_addr = "0.0.0.0" # default: wake_server bind / top-level bind
# push_listener_port = 443 # override when 443 is taken
# motion_wake_hold_secs = 30 # wake-lock window per push event
# ── Cameras ──
# Name must match [A-Za-z0-9_-]+. Address OR uid is required.
[[]]
= "driveway"
= "admin"
= "camera-password"
= "192.168.1.187:9000"
# uid = "ABCDEF1234567890"
# channel_id = 0
# stream = "all" # none | all | main | sub | extern
# discovery = "relay" # local | remote | map | relay | cellular
# max_encryption = "aes" # none | aes | bcencrypt
# idle_disconnect = false # true for battery cams
# idle_disconnect_timeout_secs = 45 # grace period before sleep
# motion_wake_hold_secs = 30 # wake-lock hold after motion stops
# enabled = true
# permitted_users = ["me"]
# [cameras.mqtt]
# enable_motion = true
# enable_light = true # status LED
# enable_battery = true
# battery_update = 2000 # ms, min 500
# enable_preview = true
# preview_update = 2000 # ms, min 500
# enable_floodlight = false
# floodlight_update = 2000 # ms, min 500
# enable_pir = false
# [cameras.pause]
# Fill gaps from the camera (wake / reconnect / stall) with the last
# frame so RTSP clients don't see a spinner. Default true.
# bridge_gaps = true
# Seconds without a live frame before a gap starts. Raise for
# sub streams with naturally low fps. Default 1.0.
# gap_threshold_secs = 1.0
# Draw a CONNECTING/SLEEPING caption on the MQTT preview JPEG.
# Default true.
# preview_overlay = true
#
# Neolink migration compat (all accepted with a startup warning):
# on_motion, on_client, on_disconnect, motion_timeout, mode
# have no effect in bairelay and can be removed.
# timeout = 30 # deprecated alias for idle_disconnect_timeout_secs
[[]]
= "backyard"
= "admin"
= "another-password"
= "192.168.1.188:9000"
= "main"