Zum Hauptinhalt springen

bird-sms Smart-Home-Integration, kostenlos und Open Source

bird-sms-Integration für Gladys Assistant

Unofficial: send SMS from your scenes through Bird (formerly MessageBird).

Info

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

Unofficial, not affiliated with Bird. Never tested with a real Bird account: the API format comes from the public Bird platform documentation (bird.com/docs, read on 3 December 2026); the tests run against a fake server built from it.

This integration sends SMS from your Gladys scenes through your own Bird workspace (formerly MessageBird). Each message is paid from your Bird wallet.

  • Send only: nothing is received, no reply is read.
  • A message leaves only from the scene action "Send an SMS (Bird)" or a click on the "Send a test SMS" button. Nothing at start, on a reconnection, nor when you save the configuration.
  • Messages go only to the allowed numbers typed in the configuration.

Which Bird API​

Bird has three generations of API. This integration uses the current platform (https://us1.platform.bird.com or https://eu1.platform.bird.com, POST /v1/sms/messages, keys starting with bk_), the only one a new account gets: sign-ups on the previous platform (app.bird.com, "Channels API" on api.bird.com) are closed, and the MessageBird API (rest.messagebird.com, "AccessKey" keys) belongs to older MessageBird accounts. A key of one platform does not work on another.

Before you start​

  1. Create a workspace on bird.com and top up its wallet.
  2. In the Bird dashboard: enable the destination countries for SMS (Bird refuses a country that is not enabled), and add a sender (an alphanumeric name where the country allows it, or a number of your workspace), or a messaging profile that gives one.
  3. Create an API key with the sms scope in write (add sms in read if you want the "Check the key" button to read the SMS log). Copy it: Bird shows it once. It starts with bk_us1_ or bk_eu1_, the region it belongs to.
  4. In Gladys, install the integration, type the key, the allowed numbers and the sender (or the messaging profile), save.
  5. Click Check the key: Bird says whether it accepts the key. This button sends no message.
  6. If you like, click Send a test SMS (one paid SMS, counted in the cap) to the first allowed number or to another allowed number.

Configuration​

SettingRole
Bird API keybk_us1_… or bk_eu1_…. Kept by Gladys in its database, never shown again, sent only to Bird (Authorization: Bearer header, to the host of its region).
Allowed numbersRequired. The only numbers messages may go to, international format, separated by commas, 10 at most.
SenderAn alphanumeric sender (3 to 11 letters or digits, at least one letter) or a number with + of your workspace. Empty: the sender of the messaging profile.
Messaging profileOptional: the id of a Bird messaging profile. Needed when the key is limited to some profiles, or when the sender is empty. One of the two is required.
Maximum SMS per 24 hoursSafety cap, 1 to 200 (20 by default). See below.
Maximum parts per message1 to 10 (3 by default): beyond, the text is cut and ends with "...".
Accents"Keep them" (default) or "Simplify" (see below).

Every message is sent with category: "transactional" (alerts of a home) and reference: "gladys" (visible and filterable in the Bird SMS log).

Numbers accepted​

Only the international format: + or 00, then the country code and the number (8 to 15 digits), for example +33 6 12 34 56 78, 0044 7700 900123. A national number (06 12 34 56 78) is refused: the module serves every country and cannot guess which one. Spaces, dots, dashes and brackets are ignored.

A number is never written whole in the logs nor in the messages: only the first 3 and the last 2 digits show (+336******78).

The scene action​

"Send an SMS (Bird)" has two fields:

  • Text (required): Gladys replaces the scene variables in it.
  • Numbers (optional): some of the allowed numbers, separated by commas; empty, all of them. A number outside the list, or a value that is not text (a list, a number), refuses the whole action (nothing is sent).

Outputs, for the following actions of the scene:

  • sent: SMS accepted by Bird;
  • not_sent: recipients not reached (refused, not tried, or without confirmation);
  • message_ids: Bird ids of the accepted messages (sms_…), separated by commas;
  • truncated: true when the text was cut.

When nothing is accepted, the action fails with the reason in the scene log ("Nothing sent: the cap of SMS per 24 hours is reached", …); the scene goes on. Recipients are served one after the other, one request each: a number refused by Bird (a 400 or 422, SMSDestinationNotEnabled) does not stop the next one; a refused key (401), an empty wallet (402), refused rights (403), a key of another region (421), a daily spend limit reached, a pause, a failure or a timeout stop the next ones.

Gladys gives an action one minute, its own wait for the connection included; the module takes 40 seconds of it. A request lasts 10 seconds at most; a recipient with less than 16.5 seconds left (the request and the two /data writes around it) is not tried.

The safeguards​

  • Allowed numbers only: a number outside the list is refused before any request. The list is read again just before each request: a number removed while its message waits is not sent.
  • Daily cap (rolling 24 hours): a send that would bring the SMS parts billed over the last 24 hours above the setting is refused (a 2-part text counts 2, each recipient counts). The number of parts is the one the module computes; when Bird announces more in its answer (segments.count), the count is raised afterwards. A message is counted and written to /data before its request leaves; it is given back only when Bird surely did not take it: an error Bird documents as a refusal at request time (400, 401, 402, 403, 404, 421, 422), server not found, connection refused. Any other 4xx error (408, 409, 413, 418…) and a 429 (Bird does not say the message was left unprocessed) count as "may have left". A restart therefore does not reset the count. At start, a send waits for /data to be read (3 seconds at most); a damaged entry of /data counts as a message sent at that moment. When /data is unreadable, too slow, or cannot be written (the status says so in each case), a spare budget counted in memory applies: 2 SMS parts per 24 hours at most; past it, nothing leaves until /data reads and writes again. A restart in that state starts this spare budget again. A /data that does not exist yet (first start) gives the normal cap.
  • Never tried again when a message may have left (timeout, connection cut, 5xx error, an answer that does not read or with a message status this module does not know, such as rejected): a second try could be a second paid message. The result says "sent without confirmation". Each message also carries its own Idempotency-Key, so a request repeated by a relay is not billed twice by Bird.
  • One request at a time to Bird; at most 20 jobs wait for their turn, more are refused.
  • Pause: after a 429 (Bird asks to slow down), the time it gives (Retry-After), between 60 s and 6 h; after a 5xx error, 60 s, doubled on each new error, 6 h at most. Nothing is sent during the pause, buttons included; it is kept in /data.
  • Key refused for sending (401 on sending a message): no scene uses it any more. Two short fingerprints (8 bits each, salted) are kept in /data, never the key. The refusal is lifted by typing another key (a new key is tried even if its fingerprints match by chance), or by a success of either button (which do try it). A 401 of the "Check the key" button (SMS log) does not block sending by itself.
  • Empty wallet (402), refused rights (403), key of another region (421): the status says so; the next send is tried all the same (Bird decides).

Text, accents and cost​

An SMS holds 160 characters of the SMS alphabet (GSM 7-bit), or 153 per part beyond. This alphabet has é, è, à, ù, ì, ò, Ç but not ê, â, î, ô, û, ë, ï, ç, œ, ’, « », nor emojis: one of them turns the whole text into Unicode, 70 characters per SMS (67 per part). The characters € [ ] { } ^ ~ | \ count twice. Bird accepts 12 parts at most; this module sends 10 at most.

"Simplify" replaces ê with e, ç with c, œ with oe, ’ with ', « » with ", – with -, … with ..., the no-break space with a space. An emoji stays as it is.

Control and invisible characters are removed, line breaks are kept.

Status​

The status of the integration tells: ready (with the cap), key, sender, messaging profile or allowed numbers missing or unreadable, region of the key unknown, key refused, pause in progress and its end time (UTC), empty wallet, refused rights or key of another region at the last send, configuration not read yet (new try after 5 s, 10 s, 30 s, 1 min, then every 5 min), /data unreadable or too slow, /data not written.

Data​

  • Sent to Bird: the key (header), the number, the text, the sender or the messaging profile, category, reference and a random Idempotency-Key.
  • Kept in /data/bird-sms-state.json: the time and the number of parts of the messages of the last 24 hours, the pause in progress, the salt and the two 8-bit fingerprints of a refused key. No key, no number, no text.
  • Logs: masked numbers, the number of parts, Bird's error code and name (E01001 ValidationError), never the text nor the key.

Limits​

  • This is not a Gladys messaging channel: the Gladys "Send a message" action does not go through Bird. On purpose: a channel would also get the Gladys system messages, as many paid messages sent without a scene action.
  • Delivery reports are not followed: "accepted" means Bird took the message, not that it arrived.
  • Only the regions us1 and eu1 (the ones Bird publishes) are known.
  • Older MessageBird accounts (rest.messagebird.com) and the previous Bird platform (api.bird.com) are not supported.

Konfigurationseinstellungen​

Diese Einstellungen fragt bird-sms in seinem Konfigurationsbildschirm in Gladys ab.

EinstellungTypPflichtfeldBeschreibung
SMS through BirdsectionNeinUnofficial connector, not affiliated with Bird. Your scenes send SMS with the "Send an SMS (Bird)" action, through your own Bird workspace (bird.com, the platform new accounts get): each message is paid from your Bird wallet. Messages go only to the allowed numbers below, within the cap per 24 hours below. Nothing is ever sent at another time (nothing at start, nor when you save this page), and nothing is received. In the Bird dashboard: enable the destination countries for SMS, add a sender (or a messaging profile), then create an API key with the "sms" scope in write.
Bird API keysecretJaA key of your Bird workspace starting with bk_us1_ or bk_eu1_ (its region), with the "sms" scope in write. Kept by Gladys in its database, never shown again, sent only to Bird (Authorization header).
Allowed numbersstringJaThe only numbers messages may go to, in the international format (+ or 00 then the country code), separated by commas, 10 at most. A scene action without numbers sends to all of them.
Sender (optional)stringNeinAn alphanumeric sender (3 to 11 letters or digits, at least one letter) or a number with + owned by your Bird workspace. Empty: the sender of the messaging profile below (one of the two is needed). Some countries refuse an alphanumeric sender.
Messaging profile (optional)stringNeinThe id of a Bird messaging profile. Needed when the key is limited to some profiles, or when the sender above is empty (the profile then gives it).
Maximum SMS per 24 hoursnumberNeinSafety cap against a runaway scene: the SMS billed over the last 24 hours (a long text counts as several), 1 to 200. Beyond it, nothing is sent and the scene action fails.
Maximum parts per messagenumberNeinAn SMS longer than 160 characters (70 with a character outside the SMS alphabet, like ê or an emoji) is billed as several. Beyond this number (1 to 10), the text is cut and ends with "...".
AccentsselectNein"Simplify" replaces the letters outside the SMS alphabet (ê, ç, ô, œ…) and the typographic signs (’ « » …) by the closest ones (e, c, o, oe, ' " ...), so a text keeps 160 characters per SMS.

So installierst du bird-sms in Gladys​

  1. Öffne in Gladys Integrationen: bird-sms 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-bird-sms: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-bird-sms.

bird-sms 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​

bird-sms 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 🙂