Amazon SES Smart-Home-Integration, kostenlos und Open Source

Unofficial: e-mails from your scenes sent through your Amazon SES account.
Die Dokumentation dieser Integration wird von ihrem Autor geschrieben und ist bisher nur auf Englisch verfĂŒgbar.
Unofficial integration, not affiliated with Amazon Web Services. It sends e-mails from your scenes through
your Amazon SES account with the SES API v2 (SendEmail, requests signed with AWS Signature Version 4); it
never reads any. This integration has never been tested with a real AWS account: it was built from the
official Amazon SES documentation and tested against local fake servers. Reports are welcome.
What leaves, and whenâ
An e-mail leaves only on one of these two paths:
- The âSend an e-mail with Amazon SESâ scene action: one plain-text e-mail, with an optional subject (the
default subject otherwise), to the recipients of the configuration: all of them when the âRecipientâ
field is empty, or the one it names. An address that is not in the list is refused and nothing leaves: a
scene cannot write to anyone else. One recipient is put in âToâ; several are put in blind copy (âBccâ)
only, so nobody sees the others' addresses. Its output
message_idis the SESMessageId. - The Test button: one e-mail from your sender to the SES mailbox simulator
(
success@simulator.amazonses.com), which SES accepts and drops. It checks the key, its permission and the sender. It works in the SES sandbox, but AWS bills it like any e-mail, so it is counted in the daily limit. In the sandbox, your recipients must be verified too: the Test does not check them, the first real e-mail does. If your IAM policy limits the recipients (ses:Recipients), allow the simulator address or the Test is denied.
Nothing is sent at start-up, on a schedule, on a reconnection or when the configuration is saved. The Gladys messages (âSend a messageâ action, system messages) are not relayed: this integration only serves scenes.
Setting upâ
-
In the Amazon SES console, in the region you will use, verify the sender address (or its domain): Configuration â Identities â Create identity. While your account is in the SES sandbox, verify every recipient address too (or request production access).
-
In IAM, create a user for Gladys with only this permission (an inline policy):
{"Version": "2012-10-17","Statement": [{ "Effect": "Allow", "Action": "ses:SendEmail", "Resource": "*" }]}You may narrow
Resourceto your identity's ARN. Then Security credentials â Create access key: copy the access key ID (AKIAâŠ) and the secret access key (shown once). Temporary keys (ASIAâŠ) are refused: they need a session token. -
In Gladys, choose the region, fill in the access key ID, the secret access key, the sender address, optionally the sender name, the recipients (1 to 10 addresses separated by commas), the default subject and the daily limit; save, then click Test.
The secret access key is kept by Gladys in its database, never shown again, and sent only to Amazon SES, as a signature of each request: the key itself never travels.
What protects your account and your billâ
- Fixed recipients and sender: only the administrator chooses them, in the configuration.
- Daily limit (20 by default, 1 to 500): at most this many e-mails over any 24 hours, one per
recipient (an e-mail to 3 recipients counts 3, as SES bills it; the Test e-mail counts 1). Beyond it
nothing is sent (an e-mail that does not fit for all its recipients is refused whole) and the action fails
with the time of the next possible e-mail. The count is kept in
/dataacross restarts. An e-mail is counted before it leaves. It is given back only when nothing left: SES answered one of the refusals its documentation lists (below), or the connection never opened (connection refused, unknown name, network unreachable). No answer, a cut connection, a throttling (429,ThrottlingException), a 5xx, a redirect, a 4xx without an AWS error type (a proxy page) or with a type SES does not document there keep it counted: it may have left. - /data not safe: while
/datais not read yet, unreadable, too slow (more than 1 second) or a write fails, the count could not survive a restart. Then only 2 e-mails per rolling 24 hours leave (counted in memory, one per recipient); the next is refused (â/data is unread, unreadable or cannot be writtenâŠâ) and the status says so. A/datathat does not exist yet (first start) is normal: the daily limit applies. - Never sent twice: SES accepts an e-mail with a
200and itsMessageId; the integration never sends an e-mail again, whatever happened. When SES did not confirm, the action fails with âit may have been sent, so it is not sent againâ. - Texts bounded: subject on one line (line breaks removed), 200 characters at most; text 10,000 characters at most; plain text only, UTF-8.
- One request at a time, 10 waiting; beyond, or when the wait would leave too little time, âtoo many e-mails at onceâ and nothing is sent. Two requests start at least 1 second per recipient of the first apart (the default SES sending rate is 1 e-mail per second). An e-mail waiting while the key, the region or the sender changes, or whose recipient is removed from the list, is not sent.
- Pauses: after a throttling, a SES server error (5xx), a denial (
AccessDeniedException,NotAuthorized,OptInRequired...), a paused or suspended account (SendingPausedException,AccountSuspendedException), a reached quota (LimitExceededException) or a clock SES finds off, nothing is sent for 60 seconds, doubled at each new failure up to 1 hour (aRetry-Afteris followed up to 6 hours), Test included. The pause is kept in/data. Saving another key, region or sender lifts a pause set by a denial, a paused account or the quota at once (a throttling, 5xx or clock pause stays). - Refused key: only
UnrecognizedClientException,InvalidClientTokenId,InvalidSignatureExceptionorSignatureDoesNotMatch(HTTP 403) with an AWS error type. Then nothing more is sent with this key until the key ID, the secret or the region changes or the Test button succeeds (the Test button tries a refused key too, outside a pause). Only two 8-bit prints of a salted HMAC are kept in/data, never the key; a new key entered while the integration runs is tried even if its prints happen to match (a key entered while it was stopped is blocked by such a match, 1 chance in 65,536: the Test button then lifts it). A signature refused because of the time (âSignature expiredâ,RequestExpired) is not a refusal of the key: the next requests are dated with the clock of SES (read from its answers) after the pause. - Address not verified (
MessageRejected,MailFromDomainNotVerifiedException): nothing was sent and nothing is billed; the action fails and the status says to verify the sender or, in the sandbox, the recipients. No pause.
Statusâ
| Status | Meaning |
|---|---|
| Ready | Settings filled in; the key is checked at the first e-mail or the Test button. |
| Amazon SES accepted the last e-mail | With the count of the last 24 hours and the limit. |
| Amazon SES accepted the key, the sender and a test e-mail | The last Test succeeded (the simulator delivers nothing). |
| Refused key / denied / not verified / paused / limit reached | Nothing is sent; the text says until when or what to change. |
| Daily counter not saved | /data is unread, read-only or slow: only 2 e-mails per 24 hours leave until it works. |
Privacyâ
The logs show addresses masked (j***@e***.com); the key ID, the secret, subjects and texts are never logged,
put in the status or written to /data, nor the texts of SES error answers (they may quote an address).
/data/amazon-ses.json holds the times of the e-mails of the last 24 hours, the pause and the prints of a
refused key.
Limitsâ
- Plain text only; no attachment, no template, no HTML, no configuration set.
- E-mails are not received; bounces and complaints are not read.
- The SES quotas of your account (24-hour quota, sending rate) apply on top of the daily limit; every e-mail is billed by AWS.
- Long-term IAM user keys only (no temporary credentials, no instance role).
Konfigurationseinstellungenâ
Diese Einstellungen fragt Amazon SES in seinem Konfigurationsbildschirm in Gladys ab.
| Einstellung | Typ | Pflichtfeld | Beschreibung |
|---|---|---|---|
| Amazon SES in Gladys | section | Nein | Unofficial integration, not affiliated with Amazon Web Services. It only sends e-mails, never reads any, through the âSend an e-mail with Amazon SESâ scene action, and only to the recipients listed below. In AWS, verify the sender address (or its domain) in Amazon SES, in the region chosen below; while the account is in the SES sandbox, verify every recipient too. Create an IAM user whose only permission is âses:SendEmailâ, give it an access key, then click âTestâ: one e-mail goes to the SES mailbox simulator, which delivers nothing. Every e-mail is billed by AWS (the test one too); the daily limit below stops a runaway scene. |
| AWS region | select | Nein | The region where the sender is verified in Amazon SES (identities and sandbox are per region). |
| Access key ID | string | Ja | Of an IAM user allowed âses:SendEmailâ only; starts with âAKIAâ. |
| Secret access key | secret | Ja | Kept by Gladys in its database, never shown again, sent only to Amazon SES, and only as a signature of each request (the key itself never travels). |
| Sender address | string | Ja | Must be verified in Amazon SES in this region (the address or its domain), otherwise SES refuses every e-mail. |
| Sender name | string | Nein | |
| Recipients | string | Ja | 1 to 10 addresses separated by commas. The scenes write only to these: to all of them, or to the one the action names. With several, they receive one e-mail in blind copy (no one sees the others); each counts as one e-mail. In the SES sandbox, each must be verified. |
| Default subject | string | Nein | Used by the scene action when it gives no subject. |
| Daily limit of e-mails | number | Nein | At most this many e-mails in any 24 hours, one per recipient, the Test e-mail included; beyond, nothing is sent and the action fails. Kept across restarts. |
So installierst du Amazon SES in Gladysâ
- Ăffne in Gladys Integrationen: Amazon SES erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
- Klicke auf Installieren. Gladys lÀdt das Docker-Image (
ghcr.io/lm1lc3n7/gladys-amazon-ses: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-amazon-ses.
Amazon SES 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â
Amazon SES 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