CLARYEL PerimetroProject for discussion
Technical document · 3 of 3

Software solution

Home Assistant on the local server: an app for any phone, tablet or browser, limited access rights and alerts that arrive even on a silenced phone.

Home AssistantAndroid · iPhone · browserRights by roleCritical alertsAll local, encrypted, no cloud
1

What we chose from our stack, and why

Only a few elements of the stack already running on our local server are needed. The rest — AI analysis, encrypted archive, footage — stays outside Home Assistant.

  1. 1

    Home Assistant

    The single centre of the system: it receives the perimeter events, manages users and their rights, and sends alerts to phones. Free software, running locally on our server.

  2. 2

    MQTT (Mosquitto)

    The local message channel between the field nodes (ESP32), the AI analysis and Home Assistant. Events travel as short text messages, with no images.

  3. 3

    NUT (UPS status)

    Brings the state of the UPS (uninterruptible power supply) into Home Assistant: a blackout or a draining battery immediately becomes a technical alert.

  4. 4

    Home Assistant Companion app

    The official client for Android and for iPhone/iPad: alerts arrive through it and the approved dashboard opens in it.

  5. 5

    WireGuard

    The protected channel already foreseen by the project for the link: where needed, it lets you use the app outside the building too, with no cloud subscriptions.

Stays outside Home Assistant: AI analysis, the encrypted archive and footage remain on the server and the app cannot show them.
2

Diagram: from the server to the clients, roles and rights

Field point

Camera or Wi-Fi CSI modules, with signalling

Local server

AI analysis, encryption, archive, UPS and data backup

Home Assistant

Events, users, rights, alerts

Clients

An app or the browser

  • Android
  • iPhone / iPad
  • Browser (computer)
  • Tablet

Roles and rights

Everyone sees only what is approved

  • Technical administrator
  • Authorised person
  • Resident

Home Assistant receives only the event (text, time, stretch of fence): no photos or video. What is not in Home Assistant cannot be seen in the app.

3

One client for any device

The client is the official Home Assistant Companion app, or simply the browser: choose what you have.

  • Android

    Home Assistant Companion app from the app store: alerts, approved dashboard, quick actions.

  • iPhone and iPad

    Home Assistant Companion app for iOS and iPadOS: alerts, including critical ones, and the approved dashboard.

  • Browser on a computer

    Just open the Home Assistant address: nothing to install.

  • Tablet

    App or browser; with a dedicated user it can be left on the wall as a fixed panel, for example in the entrance hall.

Access is on the building's local network or, outside the building, through the protected WireGuard channel. No Home Assistant Cloud subscription is needed.
4

Access with limited rights

Everyone signs in with their own username and password (with two-factor verification, if enabled) and sees only what has been approved for their role. The roles below are a proposal to be discussed.

  • Home Assistant administrator

    Technical administrator

    Configures the system, users and automations. Few accounts, with two-factor verification; access can be allowed from the local network only.

  • User without administrator rights

    Authorised person

    Receives alarms with action buttons to confirm the event. For archive images the procedure reserved for designated persons applies, with an access log.

  • User without administrator rights

    Resident

    Receives alerts (text only) and sees an approved dashboard with the system status. No access to the camera, the archive or the settings.

Who can do whatTechnical administratorAuthorised personResident
Receive alarm alerts
See the system status (approved dashboard)
Confirm the event with the action buttons
See archive images (designated persons only, logged)
Manage the recipient list and alert settings
Change settings, users and automations

How the limitation is achieved

  • Users without administrator rights cannot open Settings and cannot manage users, devices, automations and dashboards.
  • Each dashboard can be reserved for administrators; residents are given a separate, approved dashboard.
  • For each user, access can be allowed from the local network only and two-factor verification can be turned on.
  • Each device can be signed out by deleting its access token from the profile; a user's account can be deactivated.
  • The strongest boundary is by design: Home Assistant does not offer per-entity permissions in its interface, so only approved information goes into it (alarm event, system status, UPS status). Images and the archive stay outside.
5

Alerts that arrive even on a silenced phone

In case of a dangerous breach of the perimeter the alert is sent as critical: with the setup described below it sounds even on a silenced phone and with «Do Not Disturb» on, so even when all incoming calls are blocked (for example at night).

Lock screen
03:12
Phone silencedDo Not Disturb on
ALARMCritical alert

Attention! A person has been detected in the monitored stretch of fence.

iPhone
Lock screen
03:12
Phone silencedDo Not Disturb on
ALARMalarm_stream

Attention! A person has been detected in the monitored stretch of fence.

Android

Example setup (from the official Home Assistant Companion documentation)

iPhone and iPad: critical alert

  • iOS critical alerts (Critical Alerts) appear at the top of the lock screen above all other notifications and sound even with «Do Not Disturb» on or with the iPhone muted.
  • They can also bypass the app's notification rate limits.

1× Once: in the iOS settings of the Home Assistant app, allow notifications, including critical alerts.

data:
  push:
    sound:
      name: "default"
      critical: 1
      volume: 1.0

Android: high priority and an alarm channel

  • With high priority and a time-to-live of 0 the notification arrives immediately, even if the phone has been stationary or with the screen off for a long time.
  • Using the «alarm» audio stream (alarm stream) the phone rings even in silent or vibrate mode.

1× Once: in the app's system settings, open the alarm channel and allow it to override «Do Not Disturb» (by default it does not).

data:
  ttl: 0
  priority: high
  channel: alarm_stream

What to keep in mind

  • The alert is designed to arrive even on a silenced phone, but absolute delivery cannot be promised: the phone must be on and reachable (mobile data or Wi-Fi) and the one-time setup must be done on every phone.
  • The message is text only, with no photos, video or personal data.
  • As a rule, delivery to the phone goes through the push notification infrastructure of Apple or Google, as with any app. On the building's local network, local delivery (Local Push) via WebSocket is also available, without going through Apple or Google.
  • We recommend a periodic check alert, to notice in time if a phone no longer receives the alerts.
6

Not only the perimeter: other important alerts

The same channel can carry other important messages too, with different levels of urgency. Ringtone and priority are chosen for each level.

  • Critical

    A dangerous breach of the perimeter: always sounds, even on a silenced phone.

  • Urgent (technical)

    A blackout or a draining UPS battery, loss of the link with the field point, server unreachable.

  • Informational

    Abnormal temperature or humidity or a water leak in the box, other messages agreed with the condominium. These may stay silent.

On iOS the «critical» level overrides even silent mode, the «time-sensitive» (urgent) level overrides focus modes, and the «passive» level does not even wake the screen.

All local, encrypted, no cloud

Analysis, archive and access stay on the local server, encrypted and with no cloud services. In case of an alarm, access to the archive is closed immediately and the event footage is protected from modification and deletion, as described in the project.

✉

Questions or comments?

Write to us: we are happy to answer. You can also use the project form.

Go to the project form

A project document to be discussed with the residents and the condominium administration: it can only be carried out after the necessary approvals.