A robust and reliable bridge that connects Ajax security systems with Imou cameras, automatically managing camera privacy settings based on the alarm's armed state.
This daemon listens for arming and disarming events from an Ajax Hub via the SIA DC-09 protocol. It then toggles the privacy mode on your Imou cameras accordingly: when the system is armed, camera recording is activated; when disarmed, privacy mode is re-enabled, ensuring cameras are active only when necessary.
┌──────────┐ SIA Protocol ┌──────────────┐ HTTPS API ┌─────────────┐
│ Ajax Hub │ ──────────────────────► │ SIA Bridge │ ──────────────────► │ Imou Cloud │
│ │ │ (Daemon) │ │ Cameras │
└──────────┘ └──────────────┘ └─────────────┘
│ │ │
└─── ARM Event (CL/NL) ────────────────┼──── Disable Privacy Mode ──────────┘
└─── DISARM Event (OP) ────────────────┼──── Enable Privacy Mode ───────────┘
- SIA DC-09 Protocol Receiver
- Asynchronous & Lightweight
- Reliable and Robust
- Python 3.9+
- An Ajax Hub with access to its configuration settings.
- One or more Imou cameras that support Privacy Mode.
- Imou Developer API credentials.
- Go to the Imou Developer Portal and sign in with your Imou account.
- Navigate to Control Board and select "My Applications".
- Create an application to obtain your App ID and App Secret. Store these credentials in a secure location.
Follow the official Ajax documentation to configure your Hub to send alarm events to the bridge.
To configure the Hub, you will need administrator privileges for the Ajax system.
- In the Ajax mobile application, navigate to Hub Settings → Security Companies → Monitoring Station.
- Set the following parameters:
- Ethernet: Enable if the Hub can reach the bridge over a local network.
- Cellular: Enable if the Hub can reach the bridge over the internet via a public IP address.
- IP address: The IP address of the server where the bridge is running.
- Port: The
BIND_PORT
you have configured (e.g.,12128
). - Monitoring station ping interval: Set as required.
- Object number: The
SIA_ACCOUNT
you have configured. - Encryption key: The
SIA_ENCRYPTION_KEY
if you are using one.
- Click "< Back" to save the settings and wait for the "Monitoring station" status to show "Connected".
Variable | Description | Validation | Default | Required |
---|---|---|---|---|
BIND_PORT |
The TCP port for the SIA listener. | 1-49151 | 12128 | Yes |
BIND_IP |
The IP address to listen on for SIA protocol messages. | IPv4/IPv6 address | 0.0.0.0 | No |
SIA_ACCOUNT |
The SIA account identifier, as configured in your Ajax Hub. | 3-16 hex chars | 000 | Yes |
SIA_ENCRYPTION_KEY |
The optional SIA encryption key. Must match the key in your Ajax Hub. | 16 or 32 hex chars | None | No |
IMOU_APP_ID |
Your application ID from the Imou Developer Portal. | None | Yes | |
IMOU_APP_SECRET |
Your application secret from the Imou Developer Portal. | None | Yes | |
LOG_LEVEL |
Logging level. | DEBUG or INFO |
INFO | No |
docker run -d \
--name sia-bridge \
--restart unless-stopped \
-p 12128:12128 \
-e BIND_PORT=12128 \
-e SIA_ACCOUNT="000" \
-e IMOU_APP_ID="<your_app_id>" \
-e IMOU_APP_SECRET="<your_app_secret>" \
ghcr.io/delgod/sia-bridge:latest
See configuration section above.
Note: Using sudo pip
is strongly discouraged as it can lead to system dependency conflicts.
- Install pip package
sudo pip3 install --break-system-packages git+https://github.com/delgod/ajax-imou-bridge.git
- Deploy service files
sudo cp /usr/local/lib/python3.*/dist-packages/sia_bridge/sia-bridge.conf /etc/sia-bridge.conf sudo cp /usr/local/lib/python3.*/dist-packages/sia_bridge/sia-bridge.service /etc/systemd/system/
-
Open
/etc/sia-bridge.conf
with a text editor and provide your specific details. This file sets the environment variables used by the service.# /etc/sia-bridge.conf BIND_PORT=12128 SIA_ACCOUNT=000 SIA_ENCRYPTION_KEY= IMOU_APP_ID= IMOU_APP_SECRET= LOG_LEVEL=
See configuration section above.
-
Reload systemd and Enable the Service:
sudo systemctl daemon-reload sudo systemctl enable --now sia-bridge.service
-
Check the Service Status:
sudo systemctl status sia-bridge.service
- View Logs:
Follow the service logs in real-time to monitor events.
sudo journalctl -u sia-bridge.service -f
To enable verbose logging for troubleshooting, set LOG_LEVEL=DEBUG
and restart the service/docker.
Common Issues:
- Connection Refused: Check your firewall rules and ensure the
BIND_PORT
is open on the host running the bridge, allowing inbound connections from your Ajax Hub. - Authentication Failed: Double-check your
IMOU_APP_ID
andIMOU_APP_SECRET
. - No Devices Found: Ensure your cameras are online, controllable in your Imou Life application and support the privacy mode feature.
Please report any bugs or issues on the GitHub Issues page.
When reporting bugs, please include:
- Steps to reproduce the issue.
- Your system configuration (OS, Python version).
- The complete error message and stack trace.
- Relevant log entries with
LOG_LEVEL=DEBUG
.