The on-site bridge
A small computer at your estate that connects your Hikvision and Dahua gate terminals to Sterling Magna Access. It loads every visitor code onto the terminals, opens the gate when security approves a visitor in the app, and sends arrival alerts to landlords.
It only connects outwards. Nothing on your network is opened to the internet.
Terminal logins are kept on the bridge, never sent to the cloud.
If the internet drops, it keeps updates and sends them when it's back.
Do you need one?
- Hikvision or Dahua terminals at your gates: yes, one bridge for the whole estate.
- Tuya smart locks or controllers: no, they're reached through Tuya's cloud.
- Security checks codes in the app (no terminal): no.
1. What to buy
| Raspberry Pi 4 Model B, 2 GB (or Pi 5, 2 GB) | Plenty for the bridge. Avoid Pi Zero boards: no network socket. |
| High-endurance microSD card, 32 GB SanDisk High Endurance or Samsung PRO Endurance | Ordinary cards wear out in always-on devices. A small USB SSD is even better. |
| Official Raspberry Pi power supply Pi 4: 5V 3A USB-C · Pi 5: 27W USB-C | Cheap chargers cause random restarts. |
| Aluminium heatsink case, no fan e.g. Flirc or Argon NEO | Gatehouses get hot; fans clog with dust. |
| Network cable to the same switch or router as the gate terminals | Wired is more reliable than Wi-Fi. |
| Backup power the gatehouse inverter/UPS, or a small UPS | Keeps alerts and codes working through power cuts. |
Sterling Magna Technologies can supply and install it: [email protected] · +234 812 534 4322. Already have a Windows PC that stays on? Use that instead.
2. Prepare the Raspberry Pi
- On any computer, install Raspberry Pi Imager and insert the microSD card.
- Choose Raspberry Pi OS Lite (64-bit). In the settings (gear icon): set a hostname such as
sma-bridge, a username and strong password, and enable SSH. Write the card. - Put the card in the Pi, connect the network cable to the switch the gate terminals use, and power it from the backup-powered socket.
- In your router, give the Pi and each terminal a fixed IP address (DHCP reservation), so they don't change after a power cut.
3. Get your setup code
- Sign in to the console and open Gates.
- For each Hikvision or Dahua gate, set Connection to Through the on-site bridge. Add any missing gates the same way: you don't enter terminal passwords in the console.
- Under On-site bridge, click Create setup code and keep it handy. It starts with
SMB1-. Treat it like a password; making a new one cancels the old one.
4. Install the bridge
On a computer on the same network, open a terminal (Windows: PowerShell) and connect to the Pi:
ssh <your-username>@sma-bridge.localThen run:
curl -fsSL https://sterlingmagnaaccess.com/bridge/install.sh | sudo bashThe installer sets everything up and asks you for:
- the setup code from the console;
- for each gate: the terminal's IP address, username and password, and the door number (usually 1).
It logs in to each terminal to check, shows its model, then starts the bridge. It starts again by itself after every restart or power cut.
5. Check it works
- In the console under Gates, each gate shows the bridge as Online within a minute.
- Ask a resident to create a test visitor code: within a few seconds the code shows as loaded on the gates in the app.
- Type the code on the terminal (or show the invitation QR): the gate opens and the resident gets "has arrived".
Day to day
curl -fsSL https://sterlingmagnaaccess.com/bridge/install.sh | sudo bashcurl -fsSL https://sterlingmagnaaccess.com/bridge/install.sh | sudo bash -s -- --reconfigurejournalctl -u sterling-magna-bridge -fsudo -u smbridge node /opt/sterling-magna-bridge/sterling-magna-bridge.mjs check /opt/sterling-magna-bridge/config.jsonTroubleshooting
- Console says "Offline": is the Pi powered and on the network? Does the estate have internet? Run the "see what it's doing" command.
- "Bridge online, device not reachable": the terminal's IP changed or it's off. Check the fixed IP, then reconfigure.
- "Wrong username or password": the terminal login changed. Reconfigure with the new one.
- Keypad doesn't accept codes: on the terminal, the unlock mode must include password/PIN (and card, for QR codes). Some Dahua models need the user number before the code.
- Remote help: ask Sterling Magna about installing Tailscale on the Pi, which lets our support team connect without opening anything on your network.
Windows PC instead of a Pi
Any Windows 10 or 11 PC (or a Windows mini PC) that stays switched on and is connected to the gate network works. Use a PC that isn't used for other daily work, plug it into the backup power, and give it a fixed IP address on the router like the terminals.
- Get your setup code from the console (step 3 above).
- Click Start, type PowerShell, right-click Windows PowerShell and choose Run as administrator.
- Paste this and press Enter:
irm https://sterlingmagnaaccess.com/bridge/install-windows.ps1 | iexIt installs Node.js if needed, downloads the bridge, asks for the setup code and each terminal's address and login, then sets the bridge to start whenever Windows starts, even if nobody signs in, and to restart itself if it stops. It also sets the PC never to sleep while plugged in.
irm https://sterlingmagnaaccess.com/bridge/install-windows.ps1 | iex& ([scriptblock]::Create((irm https://sterlingmagnaaccess.com/bridge/install-windows.ps1))) -ReconfigureGet-Content "$env:ProgramData\SterlingMagnaBridge\bridge.log" -Wait -Tail 20& ([scriptblock]::Create((irm https://sterlingmagnaaccess.com/bridge/install-windows.ps1))) -UninstallIt shows in Task Scheduler as Sterling Magna Access bridge. Files live in C:\ProgramData\SterlingMagnaBridge; the settings file with terminal passwords can only be read by administrators and Windows itself.
Downloads: install.sh (Raspberry Pi / Linux) · install-windows.ps1 (Windows) · sterling-magna-bridge.mjs