danielh21
@daniel-harris · Mitglied seit März 2026
Embedded developer · energy · 10 years in the field
- Themen
- 0
- Antworten
- 5
- Punkte
- 0
Erstellte Forenantworten
Von English mit KI übersetzt ·
Wird er überhaupt unter USB in den Systeminformationen angezeigt?
Does it even show up in System Information under USB?
Lat/lng as int32 × 1e6 is 8 bytes for both, plenty precise for a trailer.
Von English mit KI übersetzt ·
Banerjee hat recht, einen versendeten Bericht gibt es nicht. Wir machen das für etwa 20 Energiezähler mit einem kleinen Skript auf unserem eigenen Server, aufgebaut auf der History-API. Es war ein halber Arbeitstag und läuft seit einem Jahr unverändert.Fordern Sie das Aggregat increase an. Für einen Zähler wie gas_m3 liefert es, wie stark er pro Intervall gestiegen ist, und bei einem Zählerneustart (etwa nach Ihrem Firmware-Flash) zählt es ab null weiter, statt ins Negative zu gehen.
import requests, time, smtplib
from email.message import EmailMessage
BASE = "https://<host>/tenant/<tenantId>"
KEY = "sk_live_..." # Read-only telemetry key, IP allowlist = this server
now = int(time.time() * 1000)
week_ago = now - 7 * 24 * 3600 * 1000
r = requests.get(BASE + "/api/telemetry/series", headers={"Authorization": "Bearer " + KEY},
params={"kind": "iot_device", "entityId": "<meter device id>", "keys": "gas_m3",
"from": week_ago, "to": now, "bucket": "1h", "agg": "increase"}, timeout=30)
r.raise_for_status()
# sum the hourly increases and mail the total to finance
Wir starten es per Cron montags um 07:00. Einige Erkenntnisse:
- Tagesintervalle sind UTC-Tage. Wenn die Buchhaltung lokale Tage möchte, fordern Sie 1h an und addieren Sie die Werte selbst.
- Geben Sie dem API-Schlüssel die Voreinstellung Read-only und eine IP-Allowlist mit nur diesem Server. Schlüssel laufen standardmäßig nach 90 Tagen ab, also setzen Sie eine Erinnerung oder eine längere Gültigkeit (maximal ein Jahr).
- Pro Schlüssel und Anfrage höchstens 50 Schlüssel und 10.000 Datenpunkte, was für einen wöchentlichen Stundenabruf mehr als genug ist.
Wenn Sie keinen Server betreiben möchten, kann ein Flow mit einem Schedule-Trigger und einem HTTP-Request-Block Ihren eigenen Reporting-Dienst aufrufen, der den Bericht erstellt und versendet. Wir haben uns für das Skript entschieden.Exporting data beschreibt beide Optionen.
Banerjee’s right, there’s no mailed report. We do this for about 20 energy meters with a small script on our own server, built on the history API. It’s half a day of work and has run untouched for a year.
Ask for the increase aggregate. For a counter like gas_m3 it gives you how much it rose per bucket, and it handles a counter restart (your firmware flash) by counting from zero instead of going negative.
import requests, time, smtplib
from email.message import EmailMessage
BASE = "https://<host>/tenant/<tenantId>"
KEY = "sk_live_..." # Read-only telemetry key, IP allowlist = this server
now = int(time.time() * 1000)
week_ago = now - 7 * 24 * 3600 * 1000
r = requests.get(BASE + "/api/telemetry/series", headers={"Authorization": "Bearer " + KEY},
params={"kind": "iot_device", "entityId": "<meter device id>", "keys": "gas_m3",
"from": week_ago, "to": now, "bucket": "1h", "agg": "increase"}, timeout=30)
r.raise_for_status()
# sum the hourly increases and mail the total to finance
Run it from cron at 07:00 on Mondays. A few things we learned:
- Day buckets are UTC days. If finance wants local days, ask for 1h and add them up yourself.
- Give the API key the Read-only preset and an IP allowlist with just that server. Keys expire after 90 days by default, so set a reminder or a longer expiry (max a year).
- At most 50 keys and 10,000 points per key per request, which is nothing for a weekly hourly read.
If you’d rather not run a server, a flow with a Schedule trigger and an HTTP request block can poke your own reporting service to build and send it. We went with the script.
Exporting data lists both options.
6 mm is electrically short at 868, matching shouldn’t cost you 17 dB. Look elsewhere.
Von English mit KI übersetzt ·
Bullseye verwendet dhcpcd für die Netzwerkkonfiguration. /etc/network/interfaces ist die alte Methode, ich würde beides nicht mischen.
Bullseye uses dhcpcd for networking. /etc/network/interfaces is the old way, I would not mix them.

