ciaran55
@ciaranwalsh55 · Se unió el junio 2025
Smart-city engineer · energy
- Temas
- 9
- Respuestas
- 68
- Puntos
- 0
Respuestas de foro creadas
Traducido del English por IA ·
El operador tenía una opción de APN con IP fija, nos dieron un /28. Redes permitidas configuradas en el perfil del armario. Probado con una placa de desarrollo en mi conexión doméstica usando un token de armario real: CONNACK 5, y la pestaña Log muestra el motivo del rechazo. Los tokens y el PSK están ahora en NVS; el cifrado de flash es lo siguiente, después de inutilizar una o dos placas de repuesto aprendiendo. El token de la placa extraviada fue revocado.
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.
Traducido del English por IA ·
Las redes permitidas era la parte que no conocía. Pero los routers de los armarios reciben direcciones dinámicas por celular, así que no tengo un rango que introducir.
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.
Traducido del English por IA ·
Para el ajuste realmente fino, también registraría los 200 Hz completos en una tarjeta SD y mantendría Hermetry para el panel del stand. Dos trabajos distintos.
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.
Traducido del English por IA ·
No envíe el .bin por MQTT. La OTA de Hermetry indica al dispositivo dónde descargar la imagen por HTTPS, y el dispositivo hace el resto. Hice 140 controladores de armarios de calle de esta forma el año pasado. Las piezas:Lado de Hermetry (un Admin, y un Owner una vez para la clave):
- Perfil de los sensores de sala, pestaña Firmware: active «Permitir actualizaciones de firmware para este perfil». Deje desactivadas las imágenes sin firmar.
- Firmware > Signing keys: el Owner añade su clave pública Ed25519. Usted firma cada .bin en su portátil y sube el .sig junto con él. Hermetry nunca guarda la clave privada.
- Subir firmware: Name debe coincidir con lo que la placa informa como su título de firmware, por ejemplo
room-sensor, Version por ejemplo2.1.0. - Asígnelo, primero a One device (el de su oficina), luego a todo el perfil.
Lado del dispositivo, una vez con escalera, y después nunca más. La placa recibe estos atributos compartidos en 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":"..."}
Su código entonces: informe fw_state DOWNLOADING con fw_progress, descargue fw_url con HTTPClient en la partición OTA usando Update.h, verifique el SHA-256 y la firma, informe VERIFIED, luego UPDATING y reinicie. Tras el reinicio publique current_fw_title y current_fw_version. Hermetry solo marca la actualización como Updated cuando aparece esa nueva versión. Si algo falla, informe FAILED con fw_error y mantenga la imagen anterior.Advertencias: fw_url es válida durante 15 minutos, así que si una descarga se atasca, pida de nuevo fw_url en v1/attributes/req/1 y reanude con una petición HTTP Range. Además, el firmware nunca se ofrece por MQTT sin cifrar, así que las placas deben usar TLS.Página completa: 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)
Traducido del English por IA ·
Bloques en las filas 1 y 3 con buen contraste significa que la pantalla se encendió pero nunca se inicializó, así que está en su modo de encendido de una sola línea. Casi siempre es la dirección I2C. Los backpacks con chip PCF8574A están en 0x3F, no en 0x27, y por fuera son idénticos. Ejecuta un escáner:
#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() {}
Segunda cosa para un ESP32: el backpack alimentado a 5V tiene sus pull-ups a 5V, así que SDA/SCL están en reposo a 5V en un chip de 3,3V. Normalmente funciona, pero no es lo ideal. Puedes alimentar el backpack a 3,3V (algunos LCD se ven tenues a 3,3V), quitar las resistencias pull-up del backpack y añadir 4,7k a 3,3V, o poner un pequeño level shifter entre ambos. Para algo en una pared de sala limpia durante años, yo usaría el level shifter.
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.
Traducido del English por IA ·
Resuelto, gracias Eric. Quité la suscripción echo; el armario ahora espera el PUBACK antes de descartar la lectura almacenada en búfer. La pantalla hace el GET cada 5 min. La primera llamada fue rechazada y me entró un poco de pánico, pero resultó que había creado la clave con mi propio login en la organización de prueba, así que el id de tenant en la ruta no coincidía con la clave. Creé una nueva en la organización correcta y funcionó enseguida.
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.
Traducido del English por IA ·
Antena en el tejado con un cable de 1 m y el filtro RC en la entrada. Dos días, no un solo pico, incluso con el técnico hablando por teléfono justo al lado. La alarma de nivel alto se había activado 11 veces el mes pasado en estos equipos, lo que nadie había relacionado con el router.
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.
Traducido del English por IA ·
El mismo patrón funciona para contadores de agua. increase nos salvó cuando un contador se cambió a mitad de mes y el nuevo empezó en 0.
Same pattern works for water meters. increase saved us when a meter was swapped mid-month and the new one started at 0.
Traducido del English por IA ·
¿Cuánto duran normalmente los cortes? ¿Minutos u horas?
How long are the outages usually? Minutes or hours?
Traducido del English por IA ·
¿Qué muestra date en la Pi cuando estás en el laboratorio?
What does date say on the Pi when you’re in the lab?
Traducido del English por IA ·
Tyler tiene parte de razón. Cada entrada del receptor también tiene su propia resistencia hacia el GND2 de ese lado (la impedancia de entrada, alrededor de 96k para un dispositivo de carga unitaria 1/8, más o menos), y la red de polarización conecta A y B hacia la alimentación aislada y la tierra de un lado. Cada lado aislado está flotante, así que se estabiliza donde lo sitúen esas resistencias y la fuga a través de la barrera de aislamiento. Los dos GND2 se acercan entre sí a través de los propios cables del bus. En un banco de 2 m sin nada que inyecte corriente, eso es suficientemente cercano, por eso funciona.A 300 m entre edificios aparecen tensiones de modo común inducidas y transitorios por rayos. Sin nada que defina el modo común, un lado puede quedar muy fuera del rango del receptor y el enlace se vuelve inestable, o la barrera de aislamiento absorbe sobretensiones que no necesita.Práctica estándar: tender un tercer conductor como referencia de señal, conectarlo a GND2 en cada nodo a través de unos 100 ohmios para limitar la corriente si las tierras no coinciden, y conectar a tierra la malla del cable solo en un extremo. Michael, por eso te enseñaron a usar tres hilos, es el buen hábito. Mantén la polarización en un extremo y la terminación en ambos extremos, como lo tienes.
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.
Traducido del English por IA ·
Ja, qué pequeño es el mundo. He hecho alumbrado público para un pueblo como ese, con City. No sé si sirve para aparcamientos, y tampoco encontré nunca una página de documentación al respecto.
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.
Traducido del English por IA ·
Puedes fijarlo a mano en el Administrador de dispositivos, propiedades del puerto, Opciones avanzadas, Número de puerto COM. Pero eso es por cada conector USB, así que vuelve a cambiar en cuanto alguien use otro conector.
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.
Traducido del English por IA ·
Mantenga el termostato antiguo ajustado a unos 12 °C como protección anticongelante en paralelo; así, si internet o su placa fallan, el edificio igualmente no se congelará.
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.
Traducido del English por IA ·
Ese es el problema. En la Zero, el pin 1 está en el extremo de la tarjeta SD, pero en la fila interior. El pin que usaste, la fila exterior en esa esquina, es el pin 2, que es 5V. Cuenta desde ahí: el pin 6 de la fila exterior es GND, el pin 7 está en la fila interior. Si tu cable rojo fue al pin 2 y el resto siguió el tutorial con la placa al revés, es probable que el DHT22 tuviera 5V o GND en las patas equivocadas, por eso se calentó.Formas de asegurarte la próxima vez: la almohadilla de soldadura del pin 1 es cuadrada, las demás son redondas. Y en la propia Pi:
$ pinout # viene con gpiozero, muestra un mapa ASCII de tu placa
3V3 (1) (2) 5V
GPIO2 (3) (4) 5V
GPIO3 (5) (6) GND
GPIO4 (7) (8) GPIO14
Entonces: VCC al pin 1 (3V3), DATA al pin 7 (que es GPIO4 en el código), GND al pin 6. Usa 3V3 para el DHT22, no 5V, para que la línea de datos se mantenga en un nivel que la Pi pueda soportar.Sobre si el sensor sobrevivió: los DHT22 son más resistentes de lo que parece. Vuelve a cablear, deja que se enfríe e inténtalo de nuevo. Si con el cableado correcto sigue diciendo que no lo encuentra, está muerto, y son baratos.
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.

