Saltar al contenido principal

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

Integración Ring para Gladys Assistant

Timbres, cámaras y alarma Ring: pulsaciones, movimiento, instantáneas, luces y sirenas.

info

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

Bring your Ring video doorbells, cameras and Ring Alarm into Gladys: a doorbell press or a motion starts your scenes in real time, the camera snapshot shows on your dashboard, and you can switch the floodlight or sound the siren from Gladys.

Developed without the hardware: feedback welcome. This integration was written and tested against recorded Ring API data, not against real devices. If something behaves oddly with your model, please open an issue on the GitHub repository or post on the Gladys forum: your feedback is what makes it reliable.

Not affiliated with, endorsed by or sponsored by Ring LLC or Amazon. "Ring" is a trademark of Ring LLC.

What you get​

Ring deviceIn Gladys
Video doorbells (wired, battery, Pro, Elite, Peephole Cam)Snapshot, doorbell press, motion, battery (battery models)
Stick Up Cam, Indoor CamSnapshot, motion, battery (battery models)
Spotlight Cam, Floodlight CamSnapshot, motion, battery (battery models), light on/off, siren on/off
Ring Alarm (security panel)Alarm mode: Disarmed, Home, Away (read-only unless you allow control)
Ring Alarm contact sensorsOpen/closed, tamper, battery
Ring Alarm motion detectorsMotion, tamper, battery
Ring Alarm Flood & Freeze Sensor, Ring water sensorLeak, freeze (flood & freeze model), tamper, battery
Ring Alarm Smoke & CO Listener, Kidde smoke/CO alarmSmoke, carbon monoxide
Smoke alarms and CO alarms paired with the Ring AlarmSmoke or carbon monoxide, tamper, battery

Every camera also shows its connection on its card: Cloud when online, Unreachable when Ring reports it offline.

On top of the devices:

  • Scene triggers: Ring doorbell pressed, Ring motion detected (filter on what moved: person, vehicle, package or other motion) and Ring Alarm mode changed (from Gladys, the Ring app or a keypad).
  • Scene actions: Take a Ring snapshot and Set the Ring Alarm mode.
  • Dashboard widget Ring doorbell: last snapshot, time of the last ring and of the last motion, battery, connection, and buttons to refresh the snapshot, switch the light, and sound the siren (with a confirmation).

Requirements: Gladys Assistant 5.1 or later and a Ring account. No Ring Protect plan is needed, except for Ring's own smart alerts (person, vehicle, package): without a plan, every motion is reported as "other motion".

Sign in to Ring​

Ring requires two-step verification on every account, so signing in takes one extra step. You only do it once: Ring renews the token regularly, and the integration saves every renewed token in its own storage, so it stays signed in across restarts and updates.

  1. Open the integration's Configuration tab.
  2. Fill in Ring email and Ring password, then Save.
  3. Click Send a verification code. Ring sends you a code by text message, email or authenticator app, as set in your Ring account; the message under the button says where.
  4. Type the code in Confirm the verification code and run it, within 10 minutes.
  5. The status turns to connected, and your devices appear in the Discovery tab.
  6. You can now clear the password field and save: it is not needed anymore.

Ring limits verification codes to 10 every 10 minutes: if you asked for too many, wait a little.

Option 2: with a refresh token, from a computer​

If you prefer not to type your password in Gladys, generate a token on any computer with Node.js installed:

npx -p ring-client-api ring-auth-cli

The tool asks for your Ring email, password and verification code, then prints a line like "refreshToken": "eyJydCI6...". Copy the long token (between the quotes, without them; pasting the whole line works too) into the Refresh token field of the Configuration tab, and save.

Where to see and revoke the access​

In the Ring app, the integration shows as Gladys Assistant under Control Center → Authorized Client Devices. Removing it there signs Gladys out.

"Ring refused the token"​

This message means Ring no longer accepts the saved token: it was removed in the Control Center, the account password changed, or the token was mistyped. Sign in again with option 1 or 2. The integration retries a refused token every 30 minutes on its own, and Ring outages every 5 minutes.

Add your devices​

Open the Discovery tab and add the devices you want. Gladys keeps the feature names chosen when a device is added: pick the Language of the device names in the Configuration tab first (English, French, German or Spanish).

The camera snapshot appears in the Gladys camera box and in the Ring doorbell widget.

Options​

  • Refresh the snapshots: every 10, 30 (default) or 60 minutes, or only on events and on request. On top of that, the snapshot of every ring and motion is fetched right away when Ring attached one, and opening a camera on the dashboard asks for a fresh one. Battery cameras are spared: a snapshot asked within 10 minutes of the previous one is reused instead of waking the camera, which would drain the battery.
  • Allow Gladys to arm and disarm the Ring Alarm: off by default. When off, the alarm mode is only displayed. When on, anyone who can use your Gladys dashboards and scenes can disarm your alarm: turn it on only if that is what you want. Some sensors (an open window when arming) need a bypass that only the Ring app can grant: Gladys then reports that the mode could not be set.

Scene ideas​

  • Someone rings, picture on my phone: trigger Ring doorbell pressed → action Take a Ring snapshot on that doorbell → core action Send a camera image of the same camera.
  • Person in the driveway at night: trigger Ring motion detected, camera = Driveway, what moved = Person → condition on the time → turn on the floodlight (its Light feature) and your Gladys lights.
  • Ring Alarm armed → Gladys away mode: trigger Ring Alarm mode changed, new mode = Away → set the Gladys house alarm, turn off the lights and the heating.

In the messages of a scene, {{triggerEvent.data.device_name}} is the name of the camera, and {{triggerEvent.data.detection}} what moved (person, vehicle, package or motion).

How it talks to Ring, and how often​

Ring has no public API. The integration uses ring-client-api, the open source library behind Homebridge Ring, which speaks to Ring's cloud the way the Ring app does. Everything goes through the cloud: Ring devices offer no local access.

  • Presses and motions arrive in real time as push notifications, the same channel as the Ring app (Firebase Cloud Messaging). It needs outgoing connections to mtalk.google.com on TCP port 5228: if your firewall or DNS ad blocker blocks them, presses and motions will not arrive.
  • Camera status (battery, light, siren, online): one request every 60 seconds for the whole account, the pace of the Home Assistant integration.
  • Ring Alarm: pushed in real time over a WebSocket, no polling.
  • Snapshots: one request per camera at the interval you chose, plus one per event and per dashboard request (a request made within 30 seconds of the previous one reuses it).

Ring publishes no quota for this API. These rates are those of the established integrations; please do not change them.

The integration runs comfortably within Gladys' 256 MB sandbox: about 120 MB at rest, about 190 MB at worst while shrinking a large snapshot (measured on Node 22).

Limits​

  • No live video and no recordings: Gladys shows snapshots, not streams, and recordings need a Ring Protect plan. Both are out of scope.
  • A camera whose motion detection is turned off (in the Ring app or by a Ring mode) takes no snapshot: Ring refuses it. Battery cameras cannot take a snapshot while someone watches their live view.
  • Snapshots above the Gladys limit (150 KB) are downsized before being shown.
  • Ring Alarm: the keypad, base station, range extender, glass break sensor, panic buttons, locks and thermostats are not supported. Neither are Ring Smart Lighting, Chimes, Intercom and third-party cameras.
  • Gladys has no "freeze" category: the freeze detection of the Flood & Freeze Sensor is a generic binary input. Its device card and scenes show "Freeze", but the dashboard shows the generic label "State of input".
  • Smoke and CO detection is a convenience, not a safety system: the alarm reaches Gladys only if Ring's cloud, your network and Gladys are all up. Keep Ring's own monitoring and the detector's siren as your safety net.
  • The integration has no settings of its own for units: it shows percentages, and dates in your Gladys time zone (12-hour clock in English).
  • A press stays active on the device card for 15 seconds; a motion stays detected for a minute after Ring's last notification.

Your data​

The Ring token and the hardware id sent to Ring are stored in the integration's own folder on your Gladys machine (/data), never in a log. The password, if you typed one, stays in the Gladys configuration until you clear it. Nothing is sent anywhere but to Ring.

Credits​

Built on ring-client-api by Dusty Greif and contributors (MIT). The behavior of the Home Assistant Ring integration (Apache 2.0) served as reference.

Parámetros de configuración​

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

ParámetroTipoObligatorioDescripción
Iniciar sesión en RingsectionNoRing exige la verificación en dos pasos. Pegue un token de actualización obtenido en un ordenador con «npx -p ring-client-api ring-auth-cli», o introduzca el correo electrónico y la contraseña de su cuenta Ring, guarde y ejecute a continuación las dos acciones «Enviar un código de verificación» y «Confirmar el código de verificación». La integración conserva el token que Ring renueva: solo tendrá que iniciar sesión una vez.
Token de actualizaciónsecretNoLo muestra ring-auth-cli. Déjelo vacío para iniciar sesión con el correo electrónico y la contraseña de abajo.
Correo electrónico de RingstringNo
Contraseña de RingsecretNoSolo la usan las acciones de inicio de sesión. Puede borrarla una vez iniciada la sesión.
OpcionessectionNoLas instantáneas de las cámaras con batería se reutilizan durante 10 minutos, para que actualizarlas no agote la batería.
Actualizar las instantáneasselectNo
Permitir que Gladys arme y desarme la alarma RingbooleanNoDesactivado: el modo de la alarma se muestra, nunca se cambia. Activado: cualquiera que pueda usar sus paneles y escenas de Gladys puede desarmarla.
Idioma de los nombres de dispositivosselectNoGladys conserva los nombres de funciones elegidos al añadir un dispositivo.

Cómo instalar Ring en Gladys​

  1. En Gladys, abre Integraciones: Ring 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/guim31/gladys-ring: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/guim31/gladys-ring.

Ring requiere Gladys >=5.1.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​

Ring 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 guim31, 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 🙂