Rust bridge for Reolink battery cams (Baichuan) to RTSP/MQTT with local cloud replacement.
115
A pure-Rust bridge between Reolink battery cameras (proprietary "Baichuan" protocol) and standard RTSP/MQTT, with a local replacement for Reolink's wake-up cloud and motion-push channel.
This image is a personal build of mgc8/bairelay (github.com/mgc8/bairelay), compiled from source for use as a standalone container, e.g. on TrueNAS SCALE Custom Apps.
Bairelay lets you use standard NVR software (Frigate, Shinobi, Blue Iris, Synology Surveillance Station) and Home Assistant to consume video from Reolink battery cameras directly — no Reolink NVR or cloud account required.
These cameras speak a proprietary Baichuan protocol over TCP/9000 instead of standard RTSP, sleep aggressively to save battery, and normally push motion alerts via Reolink's cloud. Bairelay handles all of this locally: it wakes sleeping cameras on demand, re-packages H.264/H.265 video and AAC/G.711 audio as standard RTSP/RTSPS, and publishes MQTT discovery for Home Assistant entities like camera, motion, battery, floodlight, PTZ, and siren.
Reolink battery models only — Argus 3, Argus Eco, Argus 4, Argus PT, Argus Track, Argus Altas, and similar. Wired Reolink cameras (RLC line, doorbells) already support native RTSP and don't need this bridge.
Create a config directory and file on your host:
mkdir -p ~/bairelay/config
nano ~/bairelay/config/config.toml
Minimal config.toml contents:
bind = "0.0.0.0"
[mqtt]
broker_addr = "192.168.1.10"
port = 1883
credentials = ["mqtt-user", "mqtt-password"]
topic_prefix = "bairelay"
[mqtt.discovery]
topic = "homeassistant"
features = ["floodlight", "camera", "motion", "led", "ir", "reboot", "pt", "battery", "siren"]
[[cameras]]
name = "driveway"
username = "admin"
password = "camera-password"
uid = "ABCDEF0123456789"
idle_disconnect = true
idle_disconnect_timeout_secs = 45
docker run -d --name bairelay --network host --cap-add NET_BIND_SERVICE -v ~/bairelay/config:/config -e RUST_LOG=bairelay=info --restart unless-stopped yourusername/bairelay:latest
services:
bairelay:
image: yourusername/bairelay:latest
container_name: bairelay
restart: unless-stopped
network_mode: host
volumes:
- ~/bairelay/config:/config
environment:
- RUST_LOG=bairelay=info
cap_add:
- NET_BIND_SERVICE
Bairelay's optional wake server (UDP 9999/58200) and motion-push listener (TCP/443) need direct LAN visibility to interact with cameras and DNS-redirected traffic. Host networking avoids NAT complications. If you don't need those features, a bridge network with an explicit port mapping for RTSP (8554/tcp) also works fine.
Port 8554/TCP — RTSP (plain)
Port 8555/TCP — RTSPS (TLS, optional)
Ports 9999 and 58200/UDP — local wake server (optional)
Port 443/TCP — local motion-push listener (optional, can be rebound)
docker exec bairelay bairelay -c /config/config.toml check-config
docker exec bairelay bairelay battery driveway --json
docker exec bairelay bairelay snapshot driveway -f /tmp/driveway.jpg
docker exec bairelay bairelay reboot driveway
See the upstream project for full configuration reference, cloud-account handling, TLS setup, and troubleshooting: github.com/mgc8/bairelay
Bairelay is licensed under AGPL-3.0. This image packages the upstream source build; no modifications were made to the application itself.
This is an unofficial, community-built Docker image. Not affiliated with or endorsed by Reolink Innovation Inc. Use at your own risk and ensure compliance with your camera's terms of service.
Content type
Image
Digest
sha256:7c859c573…
Size
37.4 MB
Last updated
about 2 months ago
docker pull loweack/bairelay