line-messaging Smart-Home-Integration, kostenlos und Open Source

Unofficial: send LINE messages from your scenes through your LINE Official Account.
Die Dokumentation dieser Integration wird von ihrem Autor geschrieben und ist bisher nur auf Englisch verfügbar.
Unofficial integration, not affiliated with LY Corporation (LINE). Your Gladys
scenes send LINE text messages from your own LINE Official Account,
through the official LINE Messaging API (https://api.line.me). Messages go
only to the recipients you list in the configuration.
Never tested with a real LINE account yet: the module was built from the official documentation and tested against a fake server that answers as the documentation says.
What you need
- A LINE Official Account with the Messaging API turned on: create a Messaging API channel in the LINE Developers Console.
- A long-lived channel access token: Messaging API tab of the channel, "Channel access token", Issue.
- The ids of the recipients:
- your own user id is shown as "Your user ID" in the Basic settings tab of
the channel (
Ufollowed by 32 characters); - another person's user id, a group id (
C…) or a room id (R…) are only given by LINE to a webhook (this module does not receive one): read them with a tool of your own, for example the webhook log of the console. A person must have added the account as a friend; the account must be a member of a group.
- your own user id is shown as "Your user ID" in the Basic settings tab of
the channel (
Configuration
| Field | Meaning |
|---|---|
| Channel access token | Kept by Gladys in its database, never shown again, sent only to LINE (Authorization header). |
| Allowed recipients | Up to 10 ids, separated by commas. No message ever goes to another id. |
| Maximum messages per 24 hours | 1 to 200, 6 by default. One per recipient, over a rolling 24 hours, kept in /data across a restart. |
| Maximum text length | 20 to 5000 characters (LINE's maximum; an emoji counts two). A longer text is cut and ends with "…". |
| Silent messages | Off by default. When on, the recipients get no push notification. |
The monthly quota
Every message counts in the monthly message quota of your LINE plan. The free quota depends on the country of the account (for example 200 messages a month on the free Communication plan in Japan; see the plans of your country on LINE's business site). A message to a group or a room counts once per member in LINE's quota, but once in this module's cap. When the quota is used up, LINE refuses the messages (429 "monthly limit"): the module then sends nothing for 6 hours and says so in the status; "Check the channel" lifts this pause as soon as LINE reports messages left.
The default cap (6 per 24 hours, about 180 a month) stays under the smallest free quota known; raise it if your plan allows more.
Scene action "Send a LINE message"
- Text: the message (variables of the scene allowed).
- Recipients: empty sends to every allowed recipient; otherwise ids of the allowed list only, separated by commas. An id outside the list refuses the whole action, nothing sent.
Outputs for the next actions: sent (messages accepted by LINE), not_sent
(recipients not reached), message_ids (LINE ids, separated by commas),
truncated (the text was cut).
Buttons
- Check the channel: asks LINE whether the token is accepted, the bot name and the messages used this month. Sends no message.
- Send a test message: one message (counted in the cap and in the LINE quota) to the recipient typed, or to the first allowed one.
Safety
- A message leaves only from the scene action or the test button: nothing at start, on a reconnection, nor when the configuration is saved.
- One request at a time; at most 20 waiting.
- A message that may have left (no answer in time, connection cut, 5xx, 409, an undocumented 4xx) is never sent again: a second try could be a second message counted in the quota. The scene log says "sent without confirmation".
- A message LINE surely refused (400, 401, 403, 404, 413, 429) gives its place in the cap back.
- A refused token (401) is no longer used by scenes until you type another
one, or until a button succeeds with it. Only two 8-bit fingerprints of it
are kept in
/data. - After a 429 rate limit: a pause (Retry-After when given, 60 s to 6 hours);
after a 5xx: 60 s, doubled on repeat, 6 hours at most. Kept in
/data. - While
/datacannot be read or written, at most 2 messages per 24 hours leave, since their count could not survive a restart. - The token, whole recipient ids and the texts are never written to the
logs, the status nor
/data(ids are shown asU1a2b…).
Not included
Receiving messages (webhook), images and other message types, broadcast to every friend, the LINE Notify service (closed by LINE in 2025).
Konfigurationseinstellungen
Diese Einstellungen fragt line-messaging in seinem Konfigurationsbildschirm in Gladys ab.
| Einstellung | Typ | Pflichtfeld | Beschreibung |
|---|---|---|---|
| LINE messages through the Messaging API | section | Nein | Unofficial connector, not affiliated with LY Corporation. Your scenes send text messages with the "Send a LINE message" action, from your own LINE Official Account (Messaging API channel) to the allowed recipients below. Every message counts in the monthly message quota of your LINE plan (free quota by country: for example 200 per month on the Japanese free plan); past it, LINE refuses the messages. Messages leave only 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. Create a Messaging API channel in the LINE Developers Console, then issue a long-lived channel access token (Messaging API tab). |
| Channel access token | secret | Ja | The long-lived channel access token of the Messaging API channel. Kept by Gladys in its database, never shown again, sent only to LINE (Authorization header). |
| Allowed recipients | string | Ja | The only LINE ids messages may go to, separated by commas, 10 at most: a user id (U followed by 32 characters; yours is shown as "Your user ID" in the Basic settings of the channel), a group id (C…) or a room id (R…). The person must have added the account as a friend, the account must be in the group. A scene action without recipients sends to all of them. |
| Maximum messages per 24 hours | number | Nein | Safety cap against a runaway scene and the monthly quota: the messages sent over the last 24 hours, one per recipient, 1 to 200 (6 by default, about 200 per month). A message to a group counts here once, but once per member in the LINE quota. Beyond it, nothing is sent and the scene action fails. |
| Maximum text length | number | Nein | In characters (an emoji counts two), 20 to 5000 (LINE's maximum). A longer text is cut and ends with "…". |
| Silent messages | boolean | Nein | When on, the recipients get no push notification for these messages. |
So installierst du line-messaging in Gladys
- Öffne in Gladys Integrationen: line-messaging erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
- Klicke auf Installieren. Gladys lädt das Docker-Image (
ghcr.io/lm1lc3n7/gladys-line-messaging:0.1.1) herunter, startet es in einer vom Kern isolierten Sandbox und erzeugt die Oberfläche der Integration (Geräte, Erkennung und Konfiguration). - Öffne den Bildschirm Konfiguration der Integration, fülle die Einstellungen aus und speichere.
- Du kannst sie auch direkt über die URL ihres Repositorys installieren: https://github.com/LM1LC3N7/gladys-line-messaging.
line-messaging 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
line-messaging 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.
- Alle Integrationen durchsuchen, native und aus der Community
- Deine eigene externe Integration bauen und veröffentlichen
- Quellcode auf GitHub — Quelle dieser Dokumentation