danielh21
@daniel-harris · Se unió el marzo 2026
Embedded developer · energy · 10 years in the field
- Temas
- 0
- Respuestas
- 5
- Puntos
- 0
Respuestas de foro creadas
Traducido del English por IA ·
¿Aparece siquiera en Información del sistema, en USB?
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.
Traducido del English por IA ·
Banerjee tiene razón, no existe un informe enviado por correo. Lo hacemos para unos 20 contadores de energía con un pequeño script en nuestro propio servidor, basado en la API de historial. Nos llevó medio día de trabajo y lleva un año funcionando sin cambios.Pida el agregado increase. Para un contador como gas_m3, indica cuánto subió por intervalo, y si el contador se reinicia (por ejemplo, al flashear el firmware) cuenta desde cero en lugar de quedar en negativo.
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
Lo ejecutamos con cron a las 07:00 los lunes. Algunas lecciones aprendidas:
- Los intervalos diarios son días UTC. Si finanzas quiere días locales, pida intervalos de 1h y súmelos usted mismo.
- Asigne a la clave de API el preajuste Read-only y una lista de IP permitidas con solo ese servidor. Las claves caducan por defecto a los 90 días, así que ponga un recordatorio o una caducidad más larga (máximo un año).
- Como máximo 50 claves y 10.000 puntos por clave y por solicitud, lo cual sobra para una lectura horaria semanal.
Si prefiere no ejecutar un servidor, un flujo con un disparador Schedule y un bloque de solicitud HTTP puede llamar a su propio servicio de informes para generarlo y enviarlo. Nosotros optamos por el script.Exporting data enumera ambas opciones.
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.
Traducido del English por IA ·
Bullseye usa dhcpcd para la red. /etc/network/interfaces es la forma antigua, yo no mezclaría ambos.
Bullseye uses dhcpcd for networking. /etc/network/interfaces is the old way, I would not mix them.

