The site's network
How the site's network must be for the hub and the terminals to see each other, and what the hub reaches on the internet.
The hub talks to the terminals over the site's local network and to Abriu over the internet. Nothing is opened on the router and no fixed internet address is needed. The hub itself takes no connections: only SSH from the local network, for support.
The local network
- The hub and every terminal are on the same network (the same router or switch, the same VLAN). If the site separates networks, the hub needs to reach the terminals on port 80 (HTTP).
- The hub takes an address by DHCP: its address may change without consequence.
- Each terminal and the gate's relay need a fixed address: a DHCP reservation on the router (by the MAC address) or a static IP set on the device itself, outside the DHCP range (see Fixed address). The panel keeps each one's address; if it changes, the device shows as "offline" on the panel until it is corrected.
- Note down each terminal's address, user and password for the panel's registration (see Registering the terminal on the panel).
- Cable whenever possible. The hub over Wi-Fi works, but a Wi-Fi drop stops the whole system; terminals over Wi-Fi are not recommended.
Fixed address
The panel talks to each terminal and to the gate's relay at the address kept in its registration. If the router gives the device another address (after a power cut, a router swap or a long time off), it shows Offline on the panel until someone corrects it. So every terminal and every relay needs an address that does not change. The hub does not: it takes its address by DHCP.
Reservation on the router
The best way: nothing changes on the device, and if it moves to another network it takes an address by itself again.
- Find the device's MAC address. On a Shelly it is on its label and on its page (
http://<the Shelly's ip>), and it is what the panel shows as Número de série ("Serial number";ACEBE6E66898, writtenAC:EB:E6:E6:68:98on a router). On a terminal, on its label or its web page. - On the router, look for Address reservation, Static DHCP or DHCP reservation (the name changes with the brand), in the list of connected clients or in the DHCP options, and reserve an address for that MAC. It can be the address it already uses.
- Restart the device (on the Shelly, Settings, Reboot, or switch it off and on) and check it came back on the same address.
- Check the address in the panel's registration (on the device's Configurações tab, Endereço IP ou host: "Settings", "IP address or host") and use Testar conexão ("Test connection").
Static IP on the device itself
When there is no access to the router. On the Shelly, on its page: Settings, Wi-Fi, on the network in use, IPv4 mode Static:
- IP: an address of the same network, outside the router's DHCP range (if the router hands out
.100to.200, use one between.20and.99) and used by no other device; - Netmask: usually
255.255.255.0; - Gateway: the router's address;
- DNS: the router's, or
1.1.1.1.
Save: the Shelly comes back on the network at the new address. Open its page at that address, correct the registration on the panel and use Testar conexão.
On a relay already registered, the panel does the same without its page: on the Aparelho ("Device") tab, Shelly,
Endereço fixo ("Fixed address"), Fixar endereço ("Fix address") comes filled in with what the Shelly uses (mask
255.255.255.0, the router and the DNS when it does not say); the panel asks first, writes it on the Shelly and starts
using the new address. Voltar ao DHCP ("Back to DHCP") undoes it.
A wrong address takes the Shelly off the network. The way back is its access point (join the ShellyMini1G4-...
network and open http://192.168.33.1): so keep the access point on, with a password. If the site changes its
router or its network's range, the static IP has to be set again. On a terminal, the static IP is in the network options
of its web page.
If the address changes
The system itself looks on its network for a terminal, recorder or relay that stopped answering: a relay by its MAC, the others by the identity they give without a password. Found at another address, it uses that one and tells whoever follows the devices ("mudou de endereço", "moved"). Never after a wrong password, and at most every 10 minutes per device.
If it stays Offline, with "Could not reach device", find the new address: in the router's list of clients by its MAC, in the Shelly app, or with Procurar na rede ("Search the network") beside the address, which lists the network's Intelbras and Hikvision terminals, Hikvision recorders and Shellys. Correct it on the device's Configurações tab, under Endereço IP ou host, use Testar conexão and make the reservation above so it does not happen again.
What the hub reaches on the internet
The hub only makes outbound connections, over HTTPS (port 443) and Cloudflare's tunnel (port 7844, falling back to 443). In most sites nothing needs setting up. On a network with an outbound firewall, these destinations must be allowed:
| For what | Destinations |
|---|---|
| Installation, updates, follow-up and the site's e-mails | fleet-api.abriu.app, *.r2.cloudflarestorage.com |
| The panel reaching the hub (tunnel) | *.argotunnel.com, *.cloudflare.com, pkg.cloudflare.com |
| The system's image | ghcr.io, *.githubusercontent.com |
| Operating system packages | deb.debian.org, archive.raspberrypi.com, download.docker.com |
| Abriu's remote support | connect.raspberrypi.com, *.connect.raspberrypi.com |
| Clock | NTP (port 123 UDP), NTP.br's servers (*.st1.ntp.br) |
A proxy that requires authentication or inspects HTTPS prevents the installation: tell Abriu beforehand.
Clock
The hub and the terminals need the right time: visitors' validity and the access history depend on it. The hub sets its
clock over the internet by itself: by NTP and, on a network that blocks NTP, from Abriu itself (fleet-api.abriu.app),
every 15 minutes. On the terminals, check the date, time and time zone at installation (see Date and
time).
When the internet goes down
The terminals keep opening the door for whoever is already registered: the list of people is on them. The panel becomes unreachable and new records wait for the internet to come back. Visitor invitations created before keep working on the terminals. Abriu is told by the fleet when the hub goes 15 minutes without news.
When the power goes down
Without power the terminals do not open the door: hence the UPS and a mechanical emergency button or key at the door, as the local emergency exit rules require. When power returns, the hub and the terminals come back on their own.