Saltar al contenido principal

Integración domótica Olvid, gratuita y de código abierto

Integración Olvid para Gladys Assistant

Chat with your home from Olvid, the end-to-end encrypted messenger (personal profile).

info

La documentación de esta integración la escribe su autor y, por ahora, solo está disponible en inglés.

This integration adds Olvid as a chat channel in Gladys, exactly like the Telegram integration: ask your home a question from Olvid, Gladys answers in the discussion, and your scenes can send you notifications through the same channel — end-to-end encrypted, with no company directory, on a personal ("particulier") Olvid profile.

How it works​

Olvid has no cloud bot API: there is no equivalent of Telegram's BotFather. An Olvid bot is made of two halves:

  • the Olvid daemon (olvid/bot-daemon): a complete Olvid client embedding the cryptographic engine and holding your profile, exposing a gRPC API;
  • the bot: this integration. It drives the daemon, relays messages to Gladys and sends the answers back.

Gladys runs the daemon for you: it is declared in the integration manifest, so the Gladys supervisor starts it in its own container, on the integration's private network. No docker-compose file to write, no command line to type, no key to copy around.

No extra third-party service sees your messages: the daemon is an Olvid client, just like your phone, and its gRPC API is published on no port at all — only the integration can talk to it.

1. Install the integration​

Install the Olvid integration from the Gladys store. The install screen tells you what it runs besides itself (olvid/bot-daemon, its memory limit, and the fact that no port is published): that is the contract you accept.

On the first run, with nothing to fill in, the integration:

  1. generates the admin key of the daemon (you never see nor type it) and starts the daemon container;
  2. creates a personal Olvid profile, since the daemon is empty;
  3. mints its own client key, scoped to that profile (the admin key is only used for that);
  4. enables automatic acceptance of incoming invitations;
  5. sets a message retention policy: the daemon deletes the messages older than 30 days (Message retention field, 0 keeps everything).

Starting the daemon takes a few tens of seconds the first time (image download included): the integration status goes from "Starting the Olvid daemon…" to connected on its own. Click Test the connection to check it: Gladys answers with the daemon version and the profile name.

You can then adjust, if you want to:

FieldValue
First / last namethe name shown to your contacts ("Gladys Assistant")
Profile number0 (Gladys takes the first profile, or creates one)

Your Olvid identity (profile, contacts, messages) lives in the volume of the daemon container, managed by Gladys along with the integration data. Uninstalling the integration destroys that profile: your contacts will have to invite you again. Keep that in mind before uninstalling, and back your Gladys data up as usual.

2. Add Gladys to your Olvid contacts​

This is the regular Olvid journey for an individual: an invitation, then a 4-digit code exchanged between the two devices. Olvid never automates that step — it is what proves you are really talking to your own home.

  1. click Show the invitation link: Gladys displays an https://invitation.olvid.io/… link;
  2. open that link on the phone where Olvid is installed and send the invitation;
  3. Gladys accepts it automatically (if you turned that option off, click Accept pending invitations). Your app then shows a 4-digit code and waits for another one;
  4. in Gladys, click Invitations in progress: the code to type into Olvid is displayed there. Copy it into the app;
  5. type the code displayed by Olvid into the Validate an invitation action of Gladys.

Once the exchange completes, "Gladys Assistant" appears in your Olvid contacts.

Being a contact is not enough: Gladys has to know which user is speaking, since an incoming message drives the home with that user's rights.

  1. in Gladys, on the Olvid integration page, click Link my account: a short code is displayed (valid for 15 minutes);
  2. send that code to Gladys in the Olvid discussion;
  3. Gladys answers "Account linked to …". You are done.

Until a contact is linked, Gladys forwards nothing to its brain: it simply answers with the instructions. You can revoke a link at any time from the same page.

Usage​

  • ask in plain language: "what is the temperature in the living room?", "turn on the office light";
  • scenes that send a message can pick the Olvid channel;
  • images sent by Gladys (a camera snapshot) arrive as an attachment;
  • long answers are split into several messages;
  • old messages are deleted by the daemon after the delay of the Message retention field (30 days by default), for privacy and disk space.

Group discussions are deliberately ignored: an incoming message speaks with the authority of the linked user, which only makes sense one-to-one.

Using your own daemon (advanced)​

If you already run an Olvid daemon — because you use it for other bots, or because you want to control its version and its backups — switch the Olvid daemon field to "My own daemon", then fill in:

FieldValue
Olvid daemon URLhttp://olvid-daemon:50051
Admin client keythe value of OLVID_ADMIN_CLIENT_KEY_GLADYS

Gladys then stops the daemon it managed, so two Olvid clients never run in parallel. The daemon must be reachable from the integration container: share a Docker network (the container is then reachable by its name), or publish port 50051 and use the host IP address.

A minimal docker-compose.yml for that case:

services:
olvid-daemon:
image: olvid/bot-daemon:2.0.1
container_name: olvid-daemon
restart: unless-stopped
environment:
# A long random value (openssl rand -hex 32): this is the key you paste
# into Gladys. It grants full control over the daemon.
- OLVID_ADMIN_CLIENT_KEY_GLADYS=replace-me-with-a-random-value
volumes:
- ./daemon-data:/daemon/data

In that mode the Olvid identity lives in your ./daemon-data folder: backing it up is up to you.

Troubleshooting​

SymptomLikely cause
"Starting the Olvid daemon…" that staysThe image download is still running, or it failed: check the integration logs.
"The Olvid daemon container stopped"The daemon exited at startup: its own logs, in Gladys, give the reason.
"Olvid daemon unreachable"The daemon has not finished starting (the integration retries on its own). With your own daemon: URL or Docker network.
unauthenticated on the connection testWith your own daemon: the admin client key does not match the one of the daemon container.
The invitation stays stuckThe 4-digit code was not exchanged both ways (the "Invitations" and "Validate" actions).
"Your Olvid account is not linked yet"The linking code was never sent, or it expired (15 minutes).
Nothing arrives after a restartMessages received while offline are replayed on startup; check the integration logs.
A scene notification never arrivedIt was sent while the daemon was down and waited more than 5 minutes, or more than 20 messages piled up: the integration logs say so.
"Connection to the Olvid daemon lost" now and thenThe daemon container stopped — most often because Gladys itself restarted. The integration notices at once, starts it back up when needed and reconnects within seconds; a daemon that is already running is never restarted. Why a one-off stop happened is in the olvid-daemon container logs.

The integration logs (LOG_LEVEL=debug for details) show every step: profile provisioning, invitations, incoming messages.

Parámetros de configuración​

Estos son los parámetros que Olvid te pide en su pantalla de configuración en Gladys.

ParámetroTipoObligatorioDescripción
How it workssectionNoOlvid has no cloud bot API: messages go through an Olvid daemon holding your personal Olvid profile. Gladys runs that daemon for you, in its own container, with a key it generates — nothing to install by hand. Use the buttons below to introduce Gladys to your Olvid app, then link your account.
Olvid daemonselectNoManaged by Gladys: the daemon runs in a container Gladys starts, keeps up and secures with a generated key — leave the two fields below empty. Pick your own daemon only if you already run one, then fill them in.
Olvid daemon URLstringNoYour own daemon only: gRPC endpoint, reachable from this container. http:// for plaintext, https:// when the daemon serves TLS.
Admin client keysecretNoYour own daemon only: its OLVID_ADMIN_CLIENT_KEY_* value. Gladys uses it once to pick its profile and mint its own key.
Olvid profile numbernumberNoWhich profile of the daemon to use. Leave 0 to take the first one, and create one when the daemon is empty.
Profile first namestringNoName shown to your contacts, used when Gladys creates the Olvid profile.
Profile last namestringNo
Accept invitations automaticallybooleanNoGladys accepts the invitations it receives, so you only have to exchange the 4-digit code. Group invitations are never accepted.
Message retention (days)numberNoThe Olvid daemon deletes the messages older than this. 0 keeps everything.

Cómo instalar Olvid en Gladys​

  1. En Gladys, abre Integraciones: Olvid aparece en el catálogo junto a las integraciones nativas, con una insignia de comunidad.
  2. Haz clic en Instalar. Gladys descarga la imagen Docker (ghcr.io/prohand/gladys-olvid:1.2.0), la ejecuta en un entorno aislado del núcleo y genera la interfaz de la integración (dispositivos, descubrimiento y configuración).
  3. Abre la pantalla de Configuración de la integración, rellena los parámetros y guarda.
  4. También puedes instalarla directamente desde la URL de su repositorio: https://github.com/prohand/gladys-olvid.

Olvid requiere Gladys >=4.86.0. El catálogo de Gladys se actualiza cada hora, así que una nueva versión está disponible como máximo una hora después de publicarse.

¿Todavía no usas Gladys? Es gratuito y de código abierto: sigue la guía de instalación para empezar.

Sobre las integraciones externas​

Olvid es una integración externa: una integración comunitaria empaquetada como contenedor Docker y publicada en GitHub. Gladys la instala con un clic y la ejecuta en un entorno aislado del núcleo. La publica y mantiene prohand, no el equipo principal de Gladys.

Suscríbete a la newsletter de Gladys Assistant

Unos pocos correos al mes sobre nuevas versiones y novedades del proyecto. Enviados por Pierre-Gilles Leymarie, fundador del proyecto. Puedes darte de baja cuando quieras 🙂