emily30
@emily-campbell · Se unió el agosto 2025
Backend developer · energy
- Temas
- 6
- Respuestas
- 36
- Puntos
- 0
Respuestas de foro creadas
Traducido del English por IA ·
Me pregunté lo mismo cuando hicimos nuestra primera instalación, así que aquí va lo que aprendí.Todo se reduce al chip concentrador (familia SX1302/SX1303 en las pasarelas actuales, SX1301/1308 en las antiguas). No es una sola radio, es un banda base que demodula 8 canales en paralelo y, en cada canal, todos los factores de propagación a la vez. Además, un sensor no tiene que «conectarse»: transmite, todas las pasarelas en alcance lo oyen, y listo. No hay asociación como en Wi-Fi. Así que escuchar cientos de sensores consiste sobre todo en escuchar ráfagas cortas que rara vez se solapan.Las pasarelas económicas de interior usan la misma familia de chips. Lo que se pierde son las cosas de exterior: carcasa, una buena antena en alto, backhaul celular, GPS.Para Hermetry, revisa tres cosas antes de comprar:
- Un modelo para tu banda. El servidor de red de Hermetry sigue el plan de frecuencias de la pasarela, así que basta con que la pasarela y los sensores estén en el mismo plan.
- Compatibilidad con Basics Station (LNS). El antiguo packet forwarder UDP no es compatible.
- Permite configurar tc.uri, subir tc.trust y establecer el token (tc.key). Hermetry no usa CUPS, se configura una vez a mano.
Sobre los canales: Hermetry envía a la pasarela su configuración de radio al conectarse (en EU868, los 8 canales más un canal LoRa de 250 kHz y un canal FSK), así que no tienes que configurar los canales tú mismo.Keisha, para un almacén: pasarela de interior en el centro, montada en alto, y revisa el RSSI/SNR de los sensores más lejanos en el registro de tramas antes de confiar en la cobertura. Las estanterías llenas de metal absorben mucho.
I asked the same thing when we did our first site, so here’s what I learned.
It comes down to the concentrator chip (SX1302/SX1303 family in current gateways, SX1301/1308 in older ones). It isn’t one radio, it’s a baseband that demodulates 8 channels in parallel and on each channel every spreading factor at once. A sensor doesn’t have to «connect» either: it transmits, every gateway in range hears it, done. No association like Wi-Fi. So listening to hundreds of sensors is mostly listening to short bursts that rarely overlap.
The cheap indoor ones use the same chip family. What you give up is the outdoor stuff: enclosure, a good antenna up high, cellular backhaul, GPS.
For Hermetry, check three things before buying:
- A model for your band. Hermetry’s network server follows the gateway’s frequency plan, so the gateway and your sensors just need to be on the same one.
- Basics Station support (LNS). The old UDP packet forwarder isn’t supported.
- It lets you set tc.uri, upload tc.trust and set the token (tc.key). Hermetry doesn’t use CUPS, you configure it once by hand.
On the channels: Hermetry sends the gateway its radio configuration when it connects (on EU868 the 8 channels plus a 250 kHz LoRa channel and an FSK channel), so you don’t set channels yourself.
Keisha, for a warehouse: indoor gateway in the middle, mounted high, and check RSSI/SNR of the furthest sensors in the frames log before you trust coverage. Racking full of metal eats a lot.
Traducido del English por IA ·
A propósito. Un board es algo que muchas personas pulsan, así que solo recibe los comandos seguros que enumeraste.
On purpose. A board is something many people click, so it only gets the safe commands you listed.
Traducido del English por IA ·
Tenemos un flujo que envía datos a una API de proveedor, con la clave en una fila de encabezado personalizada (X-Api-Key). ¿Debería pasarse al nuevo secreto con nombre o a otro lugar?
We have a flow that posts to a supplier API with the key in a custom header row (X-Api-Key). Should that move to the new named secret, or somewhere else?
Traducido del English por IA ·
Tiene sentido, gracias Maria. La energía por despertar era la idea que no tenía. Vamos a usar un STM32L0 y mediremos un ciclo de despertar completo con un analizador de energía en lugar de leer las hojas de datos. Y sí, el intervalo de transmisión es ahora el tema principal de discusión.
That makes sense, thanks Maria. Energy per wake-up was the idea I didn’t have. We’re going with an STM32L0 and we’ll measure a full wake cycle with a power profiler rather than reading datasheets. And yes, the transmit interval is now the main discussion.
Traducido del English por IA ·
Actualización para quien encuentre esto más adelante. Nuestra unidad tiene el terminal de encendido/apagado remoto; el instalador le conectó un cable de dos hilos el jueves. El enchufe ahora solo cierra un contacto seco; saqué la salida del relé de la carcasa del enchufe y la llevé a una pequeña caja DIN. El estado de funcionamiento vuelve por un GPIO libre como ac.running.La regla se activó de verdad ayer cuando la sala llegó a 27.4; el aire acondicionado arrancó y recibí la notificación. Un error que cometí al principio: había desactivado Ask antes de usar el interruptor, y lo volví a activar tras el comentario de Rachel sobre clics accidentales.
Update for anyone finding this later. Our unit has the remote on/off terminal, the installer fitted a two wire cable to it on Thursday. The plug now just closes a dry contact, I took the relay output out of the plug housing into a small DIN box. The run status comes back on a spare GPIO as ac.running.
The rule fired for real yesterday when the room hit 27.4, the AC started and I got the notification. One thing I had wrong at first: I had turned off Ask before running on the switch, put it back on after Rachel’s comment about clicking things by accident.
Traducido del English por IA ·
Brian, hecho, ahora tiene su propio perfil y el rango de la oficina está fijado.emily23, tienes razón y eso acaba con mi plan. Lo probé a la hora de comer: desenchufé durante 30 segundos, volví a enchufar, la unidad interior pitó dos veces y se quedó apagada. Así que el enchufe solo puede apagarlo, y apagar un compresor inverter a mitad de ciclo probablemente tampoco es buena idea.
Brian, done, it has its own profile now and the office range is pinned.
emily23 you are right and that kills my plan. I tested it at lunch: pulled the plug for 30 seconds, plugged back, the indoor unit beeped twice and stayed off. So the plug can only kill it, and killing an inverter compressor mid-cycle is probably not great either.
Traducido del English por IA ·
Tu compañero tiene medio razón. El búfer en las pasarelas con licencia cubre la caída del enlace: guardan las lecturas localmente y las envían más tarde con sus marcas de tiempo originales, de modo que el historial se completa. Cuánto guardan depende del modelo, así que conviene preguntar por el modelo concreto antes de confiar en ello. Pasarelas con licencia y Hermetry EdgePero un búfer no sirve de nada cuando se corta la alimentación. La pasarela se apaga, y también las interfaces RS-485 de tus medidores si están en la misma alimentación. No hay nada que leer. Así que en tu caseta la UPS es lo que mantiene el flujo de datos, y el búfer es lo que cubre los cortes de LTE.Para el cargador, yo no construiría uno. Un módulo UPS DC para riel DIN (24 V o 12 V, conecta la batería directamente, hace carga flotante y conmutación, y tiene una salida de relé de «fallo de red») cuesta aproximadamente lo mismo que las piezas y el tiempo que dedicarías. Si decides construirlo, los números de Rahul son correctos: unos 13,6-13,8 V de carga flotante a 20 °C, corriente limitada a unos 0,1C (0,7 A para 7 Ah) y compensación por temperatura si la caseta se calienta.Conecta el contacto de «fallo de red» a una entrada de la pasarela y envíalo como mains_ok. Así, una alarma con mains_ok == 0 te avisará del propio corte, y puedes hacer que la alarma de desconexión de los medidores espere más que el tiempo de autonomía de la UPS menos un margen. Si usas la solución Remote sites ready, su perfil de UPS ya tiene claves como ups_a_status y ups_a_charge que podrías rellenar.
Your colleague is half right. Buffering on licensed gateways covers the link going down: they keep readings locally and send them later with their original timestamps, so the history fills in. How much they keep depends on the model, worth asking about the specific one before relying on it. Licensed gateways and Hermetry Edge
But a buffer doesn’t help when the power is off. The gateway is off, and so are your meters’ RS-485 interfaces if they’re on the same supply. There’s nothing to read. So in your hut the UPS is what keeps data flowing, and the buffering is what covers LTE dropouts.
For the charger, I’d not build one. A DIN-rail DC UPS module (24 V or 12 V, takes the battery directly, does float charge and switchover, has a «mains fail» relay output) is about the price of the parts and the time you’d spend. If you do build, Rahul’s numbers are right: about 13.6-13.8 V float at 20 °C, current limited to around 0.1C (0.7 A for 7 Ah), and temperature compensation if the hut gets hot.
Wire the «mains fail» contact to a gateway input and send it as mains_ok. Then an alarm on mains_ok == 0 tells you about the outage itself, and you can make the offline alarm of the meters wait longer than the UPS runtime minus a margin. If you use the Remote sites ready solution, its UPS profile already has keys like ups_a_status and ups_a_charge you could fill.
Traducido del English por IA ·
Lo hice en casa el invierno pasado. Bombillas: elige unas con una API LAN local documentada. Las bombillas WiZ aceptan JSON por UDP en el puerto 38899, LIFX tiene su protocolo LAN; ambas funcionan desde Python sin cuenta en la nube una vez conectadas a tu Wi-Fi. Unas 10-15 GBP cada una.
La lista está vacía porque el Switch solo puede enviar comandos del catálogo Commands del perfil del dispositivo. Así que:
1. En el perfil del Pi, pestaña Commands, añade light.set, nivel Basic, parámetros room (Choice: hallway, living) y on (Yes / no). Las placas solo envían comandos del catálogo de nivel Basic; un comando Privileged se rechaza en una placa.
2. En el Pi, gestiona v1/rpc/req/+, conmuta la bombilla, responde en v1/rpc/res/{id} y publica el estado real como telemetría, en números: {"hallway_on": 1}.
3. Ajustes de la tarjeta Switch: Cuando se use este control, Ejecutar un comando, dispositivo = el Pi, comando light.set, room como valor fijo, on desde el valor del control. Después vincula Current state a hallway_on.
Ese último paso responde a David: el Switch muestra lo que informa el Pi, así que consulta la bombilla cada 30 s más o menos y publícalo; así también se verá un cambio con el interruptor de pared. Si un interruptor de pared corta la corriente, la bombilla simplemente desaparece, así que deja los interruptores de pared encendidos. Detalles en Control cards.
Did this at home last winter. Bulbs: pick ones with a documented local LAN API. WiZ bulbs take JSON over UDP port 38899, LIFX has its LAN protocol, both work from Python without any cloud account once they’re on your Wi-Fi. Around 10-15 GBP each.
The list is empty because the Switch can only send commands from the device profile’s Commands catalog. So:
1. On the Pi’s profile, Commands tab, add light.set, tier Basic, parameters room (Choice: hallway, living) and on (Yes / no). Boards send only Basic tier catalog commands, a Privileged one gets refused on a board.
2. On the Pi, handle v1/rpc/req/+, switch the bulb, answer on v1/rpc/res/{id}, and publish the real state as telemetry, as numbers: {"hallway_on": 1}.
3. Switch card settings: When this control is used, Run a command, device = the Pi, command light.set, room as a fixed value, on from the control’s value. Then bind Current state to hallway_on.
That last step answers David: the Switch shows what the Pi reports, so poll the bulb every 30 s or so and publish it, then a wall switch change shows up too. With a wall switch cutting power the bulb is just gone, so leave the wall switches on. Details on Control cards.
Traducido del English por IA ·
Cuando pulso Revocar en una fila, ¿la sesión se invalida de inmediato o sigue activa hasta que caduque su token de acceso?
When I hit Revoke on a row, is that session dead immediately, or does it live until its access token runs out?
Traducido del English por IA ·
…estaba en 115200. Cambié el sketch a 9600 y las líneas están limpias. La bomba de calor ahora aparece como su propio dispositivo hijo, ida 41.3, retorno 36.8. Gracias a todos, sobre todo a Lewis por la advertencia del divisor, iba a conectarlo directamente.
…it was on 115200. Changed the sketch to 9600 and the lines are clean. The heat pump shows up as its own child device now, flow 41.3, return 36.8. Thanks all, Lewis especially for the divider warning, I was about to wire it straight.
Traducido del English por IA ·
Kevin A y Maria tienen razón en ambos puntos. Hice casi el mismo controlador de luz para nuestra oficina el año pasado. Analiza el JSON con ArduinoJson (recibe el buffer y la longitud, así que no hace falta null), toma el id de la petición del final del topic y responde en v1/rpc/res/ con ese id. El «waiting for the device» se mantiene porque la placa nunca recibe respuesta.
#include <ArduinoJson.h>
void callback(char* topic, byte* payload, unsigned int length) {
String t(topic);
String id = t.substring(t.lastIndexOf('/') + 1); // "17"
StaticJsonDocument<256> doc;
if (deserializeJson(doc, payload, length)) return;
if (doc["method"] == "light.set") {
int level = doc["params"]["level"] | -1; // -1 if missing
if (level >= 0 && level <= 100) {
analogWrite(D5, map(level, 0, 100, 0, 1023));
client.publish(("v1/rpc/res/" + id).c_str(), "{"ok":true}");
return;
}
}
client.publish(("v1/rpc/res/" + id).c_str(), "{"ok":false}");
}
El analogWrite del ESP8266 va de 0 a 1023 por defecto, de ahí el map. Y suscríbete a v1/rpc/req/+ después de cada reconexión, no solo en setup, o los comandos dejan de llegar tras la primera caída del Wi-Fi.
La lista de topics está en MQTT topics and payload reference.
Kevin A and Maria have both bits. I did nearly the same light controller for our office last year. Parse the JSON with ArduinoJson (it takes the buffer and length, so no null needed), pull the request id off the end of the topic, and answer on v1/rpc/res/ with that id. The «waiting for the device» stays because the board never gets an answer.
#include <ArduinoJson.h>
void callback(char* topic, byte* payload, unsigned int length) {
String t(topic);
String id = t.substring(t.lastIndexOf('/') + 1); // "17"
StaticJsonDocument<256> doc;
if (deserializeJson(doc, payload, length)) return;
if (doc["method"] == "light.set") {
int level = doc["params"]["level"] | -1; // -1 if missing
if (level >= 0 && level <= 100) {
analogWrite(D5, map(level, 0, 100, 0, 1023));
client.publish(("v1/rpc/res/" + id).c_str(), "{"ok":true}");
return;
}
}
client.publish(("v1/rpc/res/" + id).c_str(), "{"ok":false}");
}
ESP8266 analogWrite is 0-1023 by default, hence the map. And subscribe to v1/rpc/req/+ after every reconnect, not only in setup, or commands stop after the first Wi-Fi drop.
The topic list is on MQTT topics and payload reference.
Traducido del English por IA ·
Me decidí por el HC-06. rfcomm0 funciona, pero recibo datos basura como «fx9cw_c=xe2…» en lugar de la línea.
Went HC-06. rfcomm0 works but I get garbage like «fx9cw_c=xe2…» instead of the line.
Traducido del English por IA ·
Hola Buğra. ¿Puede un flujo enviar lecturas a nuestro propio endpoint HTTP? Y al revés, ¿puede uno de nuestros servicios enviar datos a un flujo?
Hi Buğra. Can a flow send readings to our own HTTP endpoint? And the other way round, can one of our services push data into a flow?
Traducido del English por IA ·
Una cosa más para el caso del viernes por la noche: añada una alarma de desconexión en la pasarela. Cuando la pasarela se desconecta, sus dispositivos hijos también se desconectan, así que una sola alarma le indica que toda la línea se ha quedado en silencio.
One more thing for the Friday night case: add an offline alarm on the gateway. When the gateway goes offline its children go offline too, so one alarm tells you the whole line went quiet.
Traducido del English por IA ·
Un MOSFET de canal N en el lado alto necesita que su puerta esté varios voltios por encima de su fuente para encenderse por completo. Desde el mismo raíl de 24 V no se puede llevar la puerta por encima de 24 V, así que la fuente solo puede subir hasta la tensión de puerta menos el umbral.
An N-channel on the high side needs its gate several volts above its source to turn on fully. From the same 24 V rail you can’t get the gate above 24 V, so the source can only rise to whatever the gate gets minus the threshold.

