ciaran55
@ciaranwalsh55 · Mitglied seit Juni 2025
Smart-city engineer · energy
- Themen
- 9
- Antworten
- 68
- Punkte
- 0
Erstellte Forenantworten
Von English mit KI übersetzt ·
Der Betreiber hatte eine APN-Option mit fester IP, wir haben ein /28 bekommen. Erlaubte Netzwerke im Schrankprofil eingestellt. Mit einem Entwicklungsboard in meinem Heimanschluss getestet, mit einem echten Schranktoken: CONNACK 5, und der Log-Tab zeigt den Ablehnungsgrund. Token und PSK liegen jetzt im NVS, als Nächstes kommt die Flash-Verschlüsselung, nachdem ich beim Lernen noch ein oder zwei Ersatzboards zerschieße. Das Token des verlorenen Boards wurde widerrufen.
Operator had a fixed-IP APN option, we got a /28. Allowed networks set on the cabinet profile. Tested with a dev board on my home broadband using a real cabinet token: CONNACK 5, and the Log tab shows the refusal reason. Tokens and PSK are in NVS now, flash encryption is next after I brick a spare or two learning it. Missing board’s token revoked.
Von English mit KI übersetzt ·
Erlaubte Netzwerke war der Teil, den ich nicht kannte. Aber die Schrankrouter bekommen im Mobilfunk dynamische Adressen, daher habe ich keinen Bereich, den ich eintragen könnte.
Allowed networks is the part I didn’t know about. But the cabinet routers get dynamic addresses on cellular, so I don’t have a range to put in.
Von English mit KI übersetzt ·
Für das wirklich feine Tuning würde ich zusätzlich die volle 200 Hz auf eine SD-Karte loggen und Hermetry für das Messe-Dashboard behalten. Zwei verschiedene Aufgaben.
For the really fine tuning I’d also log the full 200 Hz to an SD card and keep Hermetry for the booth dashboard. Two different jobs.
Von English mit KI übersetzt ·
Schieben Sie die .bin nicht über MQTT. Hermetry’s OTA teilt dem Gerät mit, wo es das Image über HTTPS herunterladen soll, und das Gerät erledigt den Rest. Ich habe so letztes Jahr 140 Schrankcontroller an der Straße aktualisiert. Die Teile:Hermetry-Seite (ein Admin und einmal ein Owner für den Schlüssel):
- Profil der Raumsensoren, Reiter Firmware: „Firmware-Updates für dieses Profil erlauben“ aktivieren. Unsignierte Images deaktiviert lassen.
- Firmware > Signing keys: Der Owner fügt Ihren öffentlichen Ed25519-Schlüssel hinzu. Sie signieren jede .bin auf Ihrem Laptop und laden die .sig zusammen mit ihr hoch. Hermetry hält nie den privaten Schlüssel.
- Firmware hochladen: Name muss dem entsprechen, was das Board als seinen Firmware-Titel meldet, z. B.
room-sensor, Version z. B.2.1.0. - Zuweisen, zuerst an One device (das in Ihrem Büro), später an das gesamte Profil.
Geräteseite, einmal per Leiter, danach nie wieder. Das Board erhält diese Shared Attributes über v1/attributes/set:
{"fw_title":"room-sensor","fw_version":"2.1.0","fw_size":1183744,
"fw_checksum":"9c1e...","fw_checksum_algorithm":"SHA256",
"fw_url":"https://...","fw_sig":"..."}
Ihr Code dann: fw_state DOWNLOADING mit fw_progress melden, fw_url mit HTTPClient in die OTA-Partition herunterladen, Update.h verwenden, SHA-256 und Signatur prüfen, VERIFIED melden, dann UPDATING, Neustart. Nach dem Neustart current_fw_title und current_fw_version veröffentlichen. Hermetry markiert es erst als Updated, wenn diese neue Version erscheint. Bei einem Fehler FAILED mit fw_error melden und beim alten Image bleiben.Stolpersteine: fw_url ist 15 Minuten gültig. Wenn ein Download hängt, fordern Sie fw_url erneut über v1/attributes/req/1 an und setzen Sie mit einer HTTP-Range-Anfrage fort. Firmware wird niemals über einfaches MQTT angeboten, daher müssen die Boards auf TLS laufen.Vollständige Seite: Firmware updates (OTA)
Don’t push the .bin over MQTT. Hermetry’s OTA tells the device where to download the image over HTTPS and the device does the rest. I did 140 street-cabinet controllers this way last year. The parts:
Hermetry side (an Admin, and an Owner once for the key):
- Profile of the room sensors, Firmware tab: turn on „Allow firmware updates for this profile“. Leave unsigned images off.
- Firmware > Signing keys: the Owner adds your Ed25519 public key. You sign each .bin on your laptop and upload the .sig with it. Hermetry never holds the private key.
- Upload firmware: Name must equal what the board reports as its firmware title, e.g.
room-sensor, Version e.g.2.1.0. - Assign it, first to One device (the one in your office), later to the whole profile.
Device side, once by ladder, after that never again. The board gets these shared attributes on v1/attributes/set:
{"fw_title":"room-sensor","fw_version":"2.1.0","fw_size":1183744,
"fw_checksum":"9c1e...","fw_checksum_algorithm":"SHA256",
"fw_url":"https://...","fw_sig":"..."}
Your code then: report fw_state DOWNLOADING with fw_progress, download fw_url with HTTPClient into the OTA partition using Update.h, check SHA-256 and the signature, report VERIFIED, then UPDATING, reboot. After the reboot publish current_fw_title and current_fw_version. Hermetry only marks it Updated when that new version shows up. If anything fails, report FAILED with fw_error and stay on the old image.
Gotchas: fw_url is valid 15 minutes, so if a download stalls, ask for fw_url again on v1/attributes/req/1 and resume with an HTTP Range request. And firmware is never offered over plain MQTT, so the boards need to be on TLS.
Full page: Firmware updates (OTA)
Von English mit KI übersetzt ·
Blöcke in den Zeilen 1 und 3 bei guentem Kontrast bedeuten, dass das Display zwar eingeschaltet wurde, aber nie initialisiert wurde und daher im einzeiligen Power-on-Modus steht. Fast immer liegt es an der I2C-Adresse. Backpacks mit einem PCF8574A-Chip sitzen auf 0x3F, nicht auf 0x27, und von außen sehen sie identisch aus. Starte einen Scanner:
#include <Wire.h>
void setup() {
Serial.begin(115200);
Wire.begin(21, 22);
for (uint8_t a = 1; a < 127; a++) {
Wire.beginTransmission(a);
if (Wire.endTransmission() == 0) Serial.printf("found 0x%02Xn", a);
}
}
void loop() {}
Zweiter Punkt für einen ESP32: Das Backpack wird an 5V betrieben und hat seine Pull-up-Widerstände auf 5V, daher liegen SDA/SCL im Ruhezustand bei 5V an einem 3,3V-Chip an. Meist funktioniert das, ist aber nicht sauber. Entweder versorgst du das Backpack mit 3,3V (manche LCDs werden bei 3,3V schwach), oder du entfernst die Pull-up-Widerstände des Backpacks und legst 4,7k gegen 3,3V an, oder du setzt einen kleinen Level-Shifter dazwischen. Für etwas, das jahrelang an einer Reinraumwand hängt, würde ich den Level-Shifter nehmen.
Blocks on rows 1 and 3 with contrast fine means the display powered up but never got initialised, so it’s sitting in its one-line power-on mode. Almost always the I2C address. Backpacks with a PCF8574A chip are at 0x3F, not 0x27, and from the outside they look identical. Run a scanner:
#include <Wire.h>
void setup() {
Serial.begin(115200);
Wire.begin(21, 22);
for (uint8_t a = 1; a < 127; a++) {
Wire.beginTransmission(a);
if (Wire.endTransmission() == 0) Serial.printf("found 0x%02Xn", a);
}
}
void loop() {}
Second thing for an ESP32: the backpack on 5V has its pull-ups to 5V, so SDA/SCL idle at 5V into a 3.3V chip. It usually works and it’s not great. Either power the backpack from 3.3V (some LCDs go faint at 3.3V) or remove the backpack’s pull-up resistors and add 4.7k to 3.3V, or put a small level shifter in between. For something on a cleanroom wall for years I’d do the level shifter.
Von English mit KI übersetzt ·
Erledigt, danke Eric. Ich habe das Echo-Abo entfernt, der Schaltschrank wartet jetzt auf das PUBACK, bevor er den gepufferten Messwert verwirft. Das Display führt alle 5 Minuten den GET aus. Der erste Aufruf wurde abgelehnt und ich bin kurz in Panik geraten, dann stellte sich heraus, dass ich den Schlüssel unter meinem eigenen Login in der Testorganisation erstellt hatte, sodass die Tenant-ID im Pfad nicht zum Schlüssel passte. Ich habe einen neuen Schlüssel in der richtigen Organisation erstellt, und danach lief alles sofort.
Sorted, thanks Eric. Ripped out the echo subscribe, the cabinet now waits for the PUBACK before dropping the buffered reading. The display does the GET every 5 min. The first call got refused and I panicked a bit, turned out I’d made the key under my own login on the test organisation, so the tenant id in the path didn’t match the key. Made a fresh one on the right organisation and it came straight up.
Von English mit KI übersetzt ·
Antenne auf dem Dach mit 1 m Kabel und das RC-Filter am Eingang. Zwei Tage lang, nicht nur eine Spitze, selbst als der Techniker direkt daneben telefonierte. Der Hochstand-Alarm war letzten Monat bei diesen Geräten 11 Mal ausgelöst worden, was niemand mit dem Router in Verbindung gebracht hatte.
Antenna on the roof with a 1 m cable and the RC filter on the input. Two days, not one spike, even with the tech calling from right beside it. The high-level alarm had fired 11 times last month on these, which nobody had linked to the router.
Von English mit KI übersetzt ·
Dasselbe Muster funktioniert auch für Wasserzähler. increase hat uns geholfen, als ein Zähler mitten im Monat getauscht wurde und der neue bei 0 begann.
Same pattern works for water meters. increase saved us when a meter was swapped mid-month and the new one started at 0.
Von English mit KI übersetzt ·
Wie lange dauern die Ausfälle normalerweise? Minuten oder Stunden?
How long are the outages usually? Minutes or hours?
Von English mit KI übersetzt ·
Was zeigt date auf dem Pi an, wenn du im Labor bist?
What does date say on the Pi when you’re in the lab?
Von English mit KI übersetzt ·
Tyler hat einen Teil davon richtig erfasst. Jeder Empfängereingang hat außerdem einen eigenen Widerstand gegen das GND2 dieser Seite (die Eingangsimpedanz, etwa 96k bei einem Gerät mit 1/8 Unit Load, mehr oder weniger), und das Bias-Netzwerk verbindet A und B mit der isolierten Versorgung und Masse einer Seite. Jede isolierte Seite ist potentialfrei, daher stellt sie sich dort ein, wo diese Widerstände und der Leckstrom über die Isolationsbarriere sie hinbringen. Die beiden GND2 driften über die Busleitungen selbst aufeinander zu. Auf einer 2 m langen Laborstrecke ohne eingeprägten Strom ist das nah genug, daher funktioniert es.Über 300 m zwischen Gebäuden treten induzierte Gleichtaktspannungen und Blitzstörungen auf. Ohne etwas, das die Gleichtaktspannung definiert, kann eine Seite weit außerhalb des Empfängerbereichs liegen, die Verbindung wird unzuverlässig, oder die Isolationsbarriere muss Überspannungen aufnehmen, die sie nicht bräuchte.Übliche Praxis: einen dritten Leiter als Signalbezug verlegen, an jedem Knoten über etwa 100 Ohm mit GND2 verbinden, um den Strom zu begrenzen, falls die Massen voneinander abweichen, und den Kabelschirm nur an einem Ende erden. Michael, deshalb hat man dir beigebracht, drei Adern zu verwenden, das ist die richtige Gewohnheit. Behalte die Bias-Beschaltung an einem Ende und die Terminierung an beiden Enden bei, so wie du es hast.
Tyler has part of it. Each receiver input also has its own resistance to that side’s GND2 (the input impedance, around 96k for a 1/8 unit load device, more or less), and the bias network ties A and B toward one side’s isolated supply and ground. Each isolated side is floating, so it settles wherever those resistances and the leakage across the isolation barrier put it. The two GND2s drift toward each other through the bus wires themselves. On a 2 m bench with nothing injecting current, that’s close enough, so it works.
Over 300 m between buildings you get induced common-mode voltages and lightning transients. With nothing defining the common mode, one side can sit far outside the receiver’s range and the link gets flaky, or the isolation barrier takes surges it doesn’t need to.
Standard practice: run a third conductor as a signal reference, connect it to GND2 at each node through about 100 ohm to limit current if the grounds disagree, and earth the cable shield at one end only. Michael, that’s why you were taught three wires, it’s the right habit. Keep the bias on one end and termination at both ends as you have it.
Von English mit KI übersetzt ·
Ha, kleine Welt. Ich habe für eine Stadt wie diese die Straßenbeleuchtung umgesetzt, mit City. Ob es Parkplätze unterstützt, weiß ich nicht, und eine Dokumentationsseite dazu habe ich auch nie gefunden.
Ha, small world, I’ve done street lighting for a town like that, on City. No idea if it does parking though, and I never found a doc page for it either.
Von English mit KI übersetzt ·
Du kannst den Port im Geräte-Manager unter Porteigenschaften, Erweitert, COM-Portnummer manuell fixieren. Das gilt aber pro USB-Buchse, daher taucht er sofort mit einer anderen Nummer auf, sobald jemand eine andere Buchse verwendet.
You can pin it by hand in Device Manager, port properties, Advanced, COM Port Number. But it’s per USB socket, so it comes back the moment someone uses another socket.
Von English mit KI übersetzt ·
Lassen Sie das alte Thermostat parallel etwa auf 12 °C als Frostschutz eingestellt. Wenn dann das Internet oder Ihre Platine ausfällt, friert das Gebäude trotzdem nicht ein.
Keep the old thermostat set to something like 12 °C as frost protection in parallel, then if the internet or your board is out the building still won’t freeze.
Von English mit KI übersetzt ·
Genau das ist das Problem. Beim Zero liegt Pin 1 am SD-Kartenende, aber in der inneren Reihe. Der Pin, den du benutzt hast, also der äußere Reihenpin an dieser Ecke, ist Pin 2, und der ist 5V. Ab dort weiterzählen: Pin 6 der äußeren Reihe ist GND, Pin 7 liegt in der inneren Reihe. Wenn dein Rot an Pin 2 ging und der Rest der Anleitung mit gespiegelter Platine gefolgt ist, hatte der DHT22 wahrscheinlich 5V oder GND an den falschen Beinen, deshalb wurde er warm.So kannst du es beim nächsten Mal sicher prüfen: Das Lötpad für Pin 1 ist eckig, alle anderen sind rund. Und direkt auf dem Pi:
$ pinout # kommt mit gpiozero, gibt eine ASCII-Karte deiner Platine aus
3V3 (1) (2) 5V
GPIO2 (3) (4) 5V
GPIO3 (5) (6) GND
GPIO4 (7) (8) GPIO14
Also: VCC an Pin 1 (3V3), DATA an Pin 7 (im Code GPIO4), GND an Pin 6. Für den DHT22 3V3 statt 5V verwenden, damit die Datenleitung auf einem Pegel bleibt, den der Pi verkraftet.Ob der Sensor überlebt hat: DHT22s sind robuster, als man denkt. Neu verkabeln, abkühlen lassen, erneut versuchen. Wenn er mit der korrekten Verkabelung immer noch „not found“ meldet, ist er hin, und die sind günstig.
That’s the problem. On the Zero, pin 1 is at the SD card end, but on the inner row. The pin you used, outer row at that corner, is pin 2, which is 5V. Count from there: pin 6 on the outer row is GND, pin 7 is on the inner row. If your red went to pin 2 and the rest followed the tutorial with the board mirrored, the DHT22 probably had 5V or GND on the wrong legs, which is why it got warm.
Ways to be sure next time: the solder pad for pin 1 is square, all the others are round. And on the Pi itself:
$ pinout # comes with gpiozero, prints an ASCII map of your board
3V3 (1) (2) 5V
GPIO2 (3) (4) 5V
GPIO3 (5) (6) GND
GPIO4 (7) (8) GPIO14
So: VCC to pin 1 (3V3), DATA to pin 7 (which is GPIO4 in code), GND to pin 6. Use 3V3 for the DHT22, not 5V, so the data line stays at a level the Pi can take.
Whether the sensor survived: DHT22s are tougher than you’d think. Rewire, let it cool, try again. If it still says not found with the correct wiring, it’s dead, they’re cheap.

