Overview
If the bridge script starts but your camera does not appear as Live in AegisGates, this guide will help you identify and fix the problem.
Step 1 — Check the Terminal for Error Messages
When the bridge script fails, it prints an error message. Common errors and fixes:
| Error Message | Likely Cause | Fix |
|---|---|---|
Connection refused or timed out | Wrong camera IP or RTSP port | Check your RTSP URL and camera IP address |
401 Unauthorized | Wrong RTSP username or password | Re-enter credentials — check camera admin panel |
Invalid API key | Wrong or expired AegisGates API key | Copy API key again from the Cameras page |
No module named cv2 | Missing Python package | Run pip install opencv-python |
Failed to connect to aegisgates.com | No internet access | Check outbound internet on port 443 |
Step 2 — Test Your RTSP Stream First
Before troubleshooting the bridge script, confirm your camera's RTSP stream works by opening it in VLC Media Player:
- Open VLC
- Go to Media → Open Network Stream
- Enter your RTSP URL, e.g.:
rtsp://admin:[email protected]:554/stream - Click Play
If VLC shows your camera's video, the RTSP stream is working. If VLC cannot connect, the problem is with the camera or network — not the bridge script.
Step 3 — Check Your RTSP URL Format
RTSP URLs follow this pattern:
rtsp://username:password@camera-ip:port/path
Common mistakes:
- Wrong port — most cameras use
554, but some use8554or1935
- Missing stream path — check your camera's manual for the correct path (e.g.
/stream1,/ch0/stream0,/live)
- Special characters in password — if your password contains
@or/, it may break the URL. Try changing your camera password to letters and numbers only.
Step 4 — Firewall and Network Issues
- Make sure no firewall is blocking the camera's RTSP port on your local network
- The bridge script connects outbound to aegisgates.com on port 443 — ensure this is not blocked
- If you are on a corporate or managed network, ask your IT team to allow outbound HTTPS traffic
Step 5 — Re-run Setup with a Fresh Config
If you are not sure what is saved in your current config.json, the simplest fix is to delete it and re-run setup:
- Stop the bridge script
- Delete
config.jsonfrom the script folder - Run
python bridge_script.pyagain - Enter your settings carefully when prompted
Still Not Working?
Email us at [email protected] with:
- The exact error message from the terminal
- Your operating system
- Your camera make and model