Zum Hauptinhalt springen

Meeting status Smart-Home-Integration, kostenlos und Open Source

Meeting status-Integration für Gladys Assistant

Teams (Microsoft Graph) and Zoom "in a meeting" status, for a light outside your office.

Info

Die Dokumentation dieser Integration wird von ihrem Autor geschrieben und ist bisher nur auf Englisch verfügbar.

Gladys reads, about once a minute, whether you are in a meeting or a call, in Microsoft Teams (through Microsoft Graph) and in Zoom, so a scene can switch on a light outside your office. Read only: nothing is changed on your accounts.

Unofficial integration, not affiliated with Microsoft nor Zoom. Never tested with a real device nor a real account: tested against answers shaped like the official documentations.

What you get​

One Gladys device, Meeting status (Discovery tab, once a service is authorized), read only:

FeatureValue
In a meeting (Teams or Zoom)1 when one of the services says so; 0 when every authorized service says no
In a Teams meeting1 / 0
Teams presencethe codes of Microsoft Graph, availability / activity (Busy / InAMeeting)
In a Zoom meeting1 / 0
Zoom presencethe code of Zoom (In_A_Zoom_Meeting, Do_Not_Disturb…)

"In a meeting": a meeting, a call or a presentation (Teams InAMeeting, InACall, InAConferenceCall, Presenting; Zoom In_A_Zoom_Meeting, On_A_Call, Presenting…). With the option Also busy and do not disturb, Busy, Do not disturb and the Zoom calendar events count too.

A value is never invented: a presence the documentation does not list (PresenceUnknown, a new value), or a service that could not be read for more than 3 intervals (3 minutes at least), is unknown and nothing is published. Gladys has no "unknown" value: the last value stays shown; read the integration status (or the "Teams presence" / "Zoom presence" texts and their date) before trusting the light. "In a meeting (Teams or Zoom)" goes to 0 only when every authorized service was read lately and says no: a service whose session ended (renewal refused) stays counted as unknown until you click Connect again or empty its keys.

Not covered: personal Microsoft accounts (Microsoft Graph has no presence for them: work or school accounts only), Microsoft Teams free, Google Meet (no presence API), other people's presence.

1. Microsoft Teams (work or school account)​

  1. Open the Microsoft Entra admin center, App registrations, New registration: accounts in an organizational directory.
  2. Platform Web, redirect URI: click Connect once on the Microsoft account of the integration configuration; the status at the top of the page then shows the address to register (usually https://my.gladysassistant.com/redirect/oauth). Or give an address of yours and fill in Redirect URI (see "Your own redirect URI").
  3. API permissions: Microsoft Graph, Delegated: Presence.Read and offline_access. Your organization may require an administrator to consent.
  4. Certificates & secrets: a new client secret. Note its end date: when it ends, the renewal is refused and you have to create a new one, save it and click Connect again.
  5. Copy the Application (client) ID and the secret value into the configuration. Tenant: leave organizations, or give your tenant ID or domain (contoso.com). common and consumers are refused (personal accounts have no presence).
  6. Save, click Connect and sign in on the Microsoft page.

2. Zoom​

  1. On the Zoom App Marketplace, Develop, Build App: a General app, user-managed.
  2. OAuth redirect URL and allow list: the address shown in the status after a first click on Connect (usually https://my.gladysassistant.com/redirect/oauth), or yours.
  3. Scopes: user:read:presence_status (on an older app with classic scopes: user:read), nothing else.
  4. Copy the Client ID and Client Secret into the configuration, save, click Connect, allow the app on the Zoom page.

Fill in only the services you use: an empty service is never read.

Your own redirect URI​

If the redirect URI of your apps is not the one of Gladys, write it in Redirect URI. After the Microsoft or Zoom page, copy the whole address the browser ended on (with code= and state=) and paste it into Finish the authorization, within 15 minutes. The address must be the redirect URI given; an authorization serves once.

Reads, pauses and stops​

  • One read per service per interval (60 s by default, a minute at least), whatever starts it: Test button, saved configuration, reconnection of Gladys, restart (the time of the last read is kept in /data).
  • 429 (too many requests): paused as long as the service asks (Retry-After, between 1 minute and 6 hours; 5 minutes without it). 5xx: next try after 2, 5, 15 then 30 minutes. Other errors: never sooner than the interval, then 2, 5, 15, 30 minutes. The pauses survive a restart.
  • 403 on the presence (or Zoom code 5411): the permission or the account type is refused; next try after an hour, or right after a new Connect.
  • At most 2,000 requests per service and per UTC day (a safety net; the normal pace is about 1,500).
  • Renewal refused (secret ended, access revoked, renewal token expired): the service stops until you click Connect again; nothing is retried by itself, also after a restart.
  • Access refused with a new token: the service stops; Test tries once (not sooner than the interval), or click Connect again.
  • An error answer without an OAuth error code (a proxy page, a firewall) is never taken for a refusal: it is retried later.

Privacy and secrets​

  • Your password is typed on the Microsoft or Zoom page only.
  • The client secrets are kept by Gladys in its database, never shown again, sent only to the service that issued them.
  • The access and renewal tokens are kept by Gladys in its database (in the configuration of the integration, never shown on the screen), sent only to the service that issued them, never in /data, the logs nor the status messages. /data keeps only times, pauses and stops. A version that kept them in /data moves them to Gladys at start, then removes them from /data. If Gladys cannot keep new tokens, the integration says it in the logs and tries again at each read; a restart before that may need a new Connect (Zoom and Microsoft renewal tokens serve once).
  • The presence is kept in memory only, never in /data nor in the logs. "In a meeting" keeps its history in Gladys (you can turn it off per feature); the presence texts have none.
  • The authorization uses PKCE (S256) and a state that serves once, for 15 minutes.

Troubleshooting​

  • AADSTS50020 / personal account: use a work or school account; personal accounts have no presence.
  • AADSTS65001 / consent: an administrator has to consent to Presence.Read for your organization.
  • invalid_client: the client secret is wrong or ended.
  • Zoom 5411: the app lacks the user:read:presence_status scope.
  • The Zoom documentation reports that a user signed in on mobile only may appear Offline.

Konfigurationseinstellungen​

Diese Einstellungen fragt Meeting status in seinem Konfigurationsbildschirm in Gladys ab.

EinstellungTypPflichtfeldBeschreibung
How it workssectionNeinGladys reads, about once a minute, whether you are in a meeting or a call: in Microsoft Teams through Microsoft Graph (work or school account only: a personal Microsoft account has no presence), and in Zoom. One Gladys device (Discovery tab): "In a meeting (Teams or Zoom)", one per service, and the presence text; use it in a scene to switch on a light outside your office. Each service needs an app you register yourself (OAuth2): fill in only the services you use. Your password is typed on the Microsoft or Zoom page only. Read only, nothing is changed on your accounts. Never tested with a real account. Unofficial integration, not affiliated with Microsoft nor Zoom.
1. Microsoft TeamssectionNeinIn the Microsoft Entra admin center, App registrations, New registration: accounts in an organizational directory; platform Web, redirect URI: the return address of this Gladys (click Connect once below, the status at the top of this page then shows it; https), or one of yours with "Redirect URI" below. API permissions: Microsoft Graph, delegated, Presence.Read and offline_access (your administrator may have to consent). Certificates & secrets: a new client secret (note its end date: renew it before). Copy the Application (client) ID and the secret value below, save, then click Connect.
Microsoft: Application (client) IDstringNeinEmpty: Teams is not read.
Microsoft: client secret (value)secretNeinThe value of the client secret of your app. Kept by Gladys in its database, never shown again, sent only to Microsoft.
Microsoft: tenantstringNeinorganizations (any work or school account), or your tenant ID or domain (contoso.com). Personal accounts (common, consumers) have no presence: refused.
Microsoft accountoauth2NeinOpens the Microsoft sign-in page (save the ID and the secret first).
2. ZoomsectionNeinOn the Zoom App Marketplace, Develop, Build App: a General app, user-managed. OAuth redirect URL and allow list: the return address of this Gladys (shown in the status after a first click on Connect below), or one of yours with "Redirect URI". Scopes: user:read:presence_status (or user:read on an older app), nothing else. Copy the Client ID and the Client Secret below, save, then click Connect.
Zoom: Client IDstringNeinEmpty: Zoom is not read.
Zoom: Client SecretsecretNeinThe Client Secret of your Zoom app. Kept by Gladys in its database, never shown again, sent only to Zoom.
Zoom accountoauth2NeinOpens the Zoom authorization page (save the Client ID and Secret first).
3. OptionssectionNeinThe service sends you back to Gladys and the integration reads your presence. If the redirect URI of your app is not this Gladys, write it in "Redirect URI": at the end, copy the whole address the browser shows (it holds code= and state=) and paste it into "Finish the authorization" below, within 15 minutes. The tokens are kept by Gladys in its database (never shown, never in /data), sent only to the service that issued them, never in the logs.
Redirect URI (optional)stringNeinEmpty: the services send you back to this Gladys. Otherwise the redirect URI of your apps (https, or http on localhost only): finish by pasting the address the browser ended on.
Counts as "in a meeting"selectNein
Read interval (seconds)numberNeinOne read per service per interval, a minute at least, whatever starts it (test button, saved configuration, reconnection of Gladys, restart).
Language of the namesselectNein

So installierst du Meeting status in Gladys​

  1. Öffne in Gladys Integrationen: Meeting status erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
  2. Klicke auf Installieren. Gladys lädt das Docker-Image (ghcr.io/lm1lc3n7/gladys-meeting-status:0.1.1) herunter, startet es in einer vom Kern isolierten Sandbox und erzeugt die Oberfläche der Integration (Geräte, Erkennung und Konfiguration).
  3. Öffne den Bildschirm Konfiguration der Integration, fülle die Einstellungen aus und speichere.
  4. Du kannst sie auch direkt über die URL ihres Repositorys installieren: https://github.com/LM1LC3N7/gladys-meeting-status.

Meeting status benötigt Gladys >=5.1.0. Der Katalog in Gladys wird stündlich aktualisiert, eine neue Version ist also spätestens eine Stunde nach ihrer Veröffentlichung verfügbar.

Du nutzt Gladys noch nicht? Es ist kostenlos und Open Source: folge der Installationsanleitung, um loszulegen.

Über externe Integrationen​

Meeting status ist eine externe Integration: eine Community-Integration, die als Docker-Container verpackt und auf GitHub veröffentlicht wird. Gladys installiert sie mit einem Klick und führt sie in einer vom Kern isolierten Sandbox aus. Sie wird von LM1LC3N7 veröffentlicht und gepflegt, nicht vom Gladys-Kernteam.

Abonniere den Newsletter von Gladys Assistant

Ein paar E-Mails im Monat zu neuen Releases und Neuigkeiten aus dem Projekt. Verschickt von Pierre-Gilles Leymarie, dem Gründer des Projekts. Jederzeit abbestellbar 🙂