si_tyler
@twilson · Mitglied seit März 2026
System integrator · energy · 15 years in the field
- Themen
- 3
- Antworten
- 20
- Punkte
- 0
Erstellte Forenantworten
Von English mit KI übersetzt ·
Ein VPN ist genau das Gespräch, das ich vermeiden möchte. Deren Sicherheitsteam betrachtet jeden Tunnel in ihr Netzwerk als neues Projekt mit einer dreimonatigen Prüfung.
A VPN is exactly the conversation I’m trying to avoid. Their security team treats any tunnel into their network as a new project with a 3 month review.
+1 to Grace. We lost a week on a site job because of a PCB antenna inside a steel cabinet.
Also those slow clients eat airtime for everyone on that AP. A frame at 1 Mbps occupies the channel for a long time.
Von English mit KI übersetzt ·
Die einfachste Lösung: Starte das Skript nicht neu. Führe es als systemd-Dienst mit Restart=always aus, öffne den Port einmal und schließe ihn nie.
Easiest fix: don’t restart the script. Run it as a systemd service with Restart=always, open the port once and never close it.
Von English mit KI übersetzt ·
Es lag am Adapter. Die Systeminformationen zeigten über meinen No-Name-USB-C-Dongle nichts an; über einen Hub mit eigener Stromversorgung wird „USBasp“ angezeigt und avrdude findet ihn. Gestern habe ich vier Boards vor Ort geflasht; das brandneue Ersatzboard brauchte genau -B 32, wie tsmith gesagt hat. Die Fuses waren bei den anderen bereits gesetzt. Der Linux-Laptop bleibt ab jetzt in der Werkstatt.
Adapter it was. System Information showed nothing through my no-name USB-C dongle; through a powered hub it shows „USBasp“ and avrdude finds it. Flashed four boards in the field yesterday, the brand-new spare board needed -B 32 exactly like tsmith said. Fuses were already set on the others. Linux laptop stays in the workshop now.
For the sensor: an FSR strip under the mattress works but needs calibrating per mattress and drifts as the foam ages. Load cells under two legs are more reliable and don’t care about bedding. Avoid PIR, it can’t tell „in bed“ from „standing next to the bed“.
Von English mit KI übersetzt ·
Guter Fund. Es lohnt sich, den Host in eine Konfigurationsdatei statt in den Build aufzunehmen, damit das nächste Werk keinen fest codierten Host kopiert.
Good catch. Worth putting the host in a config file instead of the build, so the next plant doesn’t copy a hardcoded host.
Von English mit KI übersetzt ·
Gleicher Fehler mit avrdude der Arduino IDE.
Same error with the Arduino IDE’s avrdude.
On the device: take 5 readings a second apart and send the median, not one sample. Kills most of the hand-in-the-way readings before they leave the board.
0xE2 is a response timeout. Same baud and parity on both meters?
Fitted the DW from the tube, port is back and the meters reappeared as children within a minute. Both TVS diodes measured short, replaced those too. You were right about the package table at the end, I’d only looked at the one on page 1.
Von English mit KI übersetzt ·
Prüfen Sie bei den Wechselrichtern, ob sie SunSpec-Modbus-Maps unterstützen, dann sparen Sie sich für jedes Modell eine eigene Register-Map.
For the inverters check if they do SunSpec Modbus maps, saves you writing a register map per model.
Von English mit KI übersetzt ·
Für die Skalierung können Sie die rohen mA-Werte senden und einen Scale-Block im Root-Flow von Hermetry 4-20 in 0-10 bar umrechnen lassen. Dann können Sie den Bereich später ändern, ohne den Pi anzufassen.
And for the scaling you can send the raw mA and let a Scale block in Hermetry’s root flow turn 4-20 into 0-10 bar, then you can fix the range later without touching the Pi.
Von English mit KI übersetzt ·
Kevin hat recht, und das ist nur die halbe Antwort. Wir hatten dasselbe Problem auf einer Windkraftanlage.Hermetry verwendet MQTT 3.1.1, und ein CONNECT mit clean session false wird wie clean behandelt. Während ein Gerät offline ist, wird nichts für es in eine Warteschlange gestellt, außer Befehlen, die als persistent gesendet wurden. Es gibt also keinen Sitzungszustand, der fortgesetzt werden könnte, und zwar für Telemetrie in keiner Richtung.Was Hermetry in Eingangsrichtung zusagt, ist Folgendes: Das PUBACK wird erst gesendet, nachdem die Nachricht auf deren Seite sicher in die Warteschlange gestellt wurde. Kann sie nicht eingereiht werden, bekommst du kein PUBACK, die Sitzung wird geschlossen, und der Client soll nach dem Wiederverbinden erneut senden. Duplikate mit demselben Gerät, Schlüssel und Zeitstempel werden nur einmal gespeichert, daher ist erneutes Senden sicher.Der Puffer liegt also bei dir, und das Muster sieht so aus:
- Jeden Messwert in einen lokalen Speicher schreiben (wir nutzen eine SQLite-Datei) mit seinem eigenen ts in ms.
- Aus dem Speicher veröffentlichen und eine Zeile erst löschen, wenn ihr PUBACK eintrifft.
- Nach dem Wiederverbinden: abonnieren, gemeinsame Attribute abfragen und dann den Rückstau vor den Live-Daten senden.
Sende den Rückstau als Arrays von {ts, values}, damit die Werte zu den richtigen Zeiten ankommen. Das Profil hat ein separates Limit für Wiedergabenachrichten pro Sekunde für Nachrichten, deren Datensätze alle älter als eine Minute sind, daher leert sich ein langer Rückstau über einen gewissen Zeitraum. Keine Panik, wenn nicht alles auf einmal erscheint.Die MQTT-Seite enthält den Abschnitt zur Bestätigung, einmal lesenswert.
Kevin’s right, and that’s half of it. We hit the same thing on a wind site.
Hermetry’s MQTT is 3.1.1 and a CONNECT with clean session false is served as clean. Nothing is queued for a device while it’s offline, apart from commands that were sent as persistent. So no session state to resume, in either direction for telemetry.
What Hermetry does promise is on the way in: the PUBACK goes out only after the message is safely queued on their side. If it can’t be queued you get no PUBACK and the session closes, and the client is expected to resend after reconnecting. Duplicates of the same device, key and timestamp are stored once, so resending is safe.
So the buffer is yours, and the pattern is:
- Write every reading to a local store (we use a SQLite file) with its own ts in ms.
- Publish from the store, delete a row only when its PUBACK arrives.
- After reconnect: subscribe, ask for shared attributes, then send the backlog before live data.
Send the backlog as arrays of {ts, values} so it lands at the right times. The profile has a separate Replay messages per second limit for messages whose records are all older than a minute, so a long backlog drains over a while. Don’t panic when it doesn’t all appear at once.
The MQTT page has the acknowledgement section, worth reading once.
Built one of these with my kid a couple of years ago and made both mistakes.
Angle: combine the two sensors with a complementary filter. The gyro is good short-term, the accelerometer long-term:
// fixed 200 Hz loop from a hardware timer, dt = 0.005
float accAngle = atan2f(ax, az) * RAD_TO_DEG;
angle = 0.98f * (angle + gy * dt) + 0.02f * accAngle;
Use a fixed loop rate from a timer, not millis() differences in a busy loop, and keep MQTT out of that loop entirely. Wilson’s DMP route works too, it just ties you to that chip’s library.
PID: start with P only and raise it until the robot oscillates around upright, then add D until the oscillation dies down, then a small I for drift. And add the motors‘ deadband to the output, gear motors don’t move below a few percent duty.
Data: collect samples in the fast loop, decimate to 20 Hz, and send one message per second as an array of records with their own timestamps:
[
{"ts": 1767600000000, "values": {"bal.angle": 0.42, "bal.out": 12.5, "bal.speed": 3.1}},
{"ts": 1767600000050, "values": {"bal.angle": 0.38, "bal.out": 11.9, "bal.speed": 3.0}},
...
]
That is 1 message a second with 20 x 3 = 60 data points, inside the per-device defaults (10 messages a second, 200 points a second and 6,000 a minute). Your plan has an organisation-wide data points per minute limit too, so check Usage if other devices are busy. The ESP32 needs NTP time for ts, otherwise leave ts out. A chart over the last 24 hours shows every raw point, so the tuning curves stay sharp. Payload forms: MQTT topics and payload reference.

