thompsonplc
@lthompson · Se unió el mayo 2025
Automation engineer · pharma · 14 years in the field
- Temas
- 7
- Respuestas
- 65
- Puntos
- 0
Respuestas de foro creadas
Traducido del English por IA ·
Aoife dio en el clavo. Operamos AGV en un almacén farmacéutico y tuvimos el mismo fallo hasta que cambiamos tres cosas.Mecánica: deje que la base haga la alineación final. Un embudo en V o dos rieles guía inclinados que dirijan el robot a la posición en los últimos 15 cm, con contactos con resorte que tengan cierto recorrido. El IR solo tiene que meterlo en el embudo. Los contactos más anchos de Michael ayudan, pero el embudo es lo que corrige el caso torcido.Lógica: «docked» significa que circula corriente de carga, no «el IR es más fuerte». Tras detenerse, espere 2 s y lea la corriente de carga. Si no está, retroceda 30 cm, vuelva a aproximarse, hasta 3 intentos. Tras 3 fallos, deje de intentarlo e informe.Lado del gemelo: coloque cada base (si informa algo) en el activo de la sala en la que está, y coloque los robots en el site, ya que se mueven entre zonas e informan su zona en la telemetría. Luego derive una clave status para los robots, en la Pi o en el flujo raíz: critical tras 3 intentos de acoplamiento fallidos o batería por debajo del 15 %, warning mientras reintenta, ok en otro caso. El estado del site toma el peor estado de todo lo colocado bajo él, de modo que un robot atascado pone la nave en rojo en la vista del site sin que nadie abra la telemetría. Guarde también una copia numérica (0/1/2), porque las claves de texto no tienen historial en gráficos. Cómo se agrega el estado: Site status and the status key.
Aoife put her finger on it. We run AGVs in a pharma warehouse and had the same failure until we changed three things.
Mechanical: let the dock do the final alignment. A V-shaped funnel or two angled guide rails that steer the robot into position in the last 15 cm, with spring-loaded contacts that have some travel. IR only has to get it into the funnel. Michael’s wider contacts help, but the funnel is what fixes the crooked case.
Logic: «docked» means charging current flows, not «IR is strongest». After stopping, wait 2 s and read the charge current. If it’s not there, back off 30 cm, approach again, up to 3 tries. After 3 failures stop trying and report it.
Twin side: place each dock (if it reports anything) on the room asset it sits in, and place the robots on the site, since they move between zones and report their zone in telemetry. Then derive a status key for the robots, either on the Pi or in the root flow: critical after 3 failed docking tries or battery under 15 %, warning while it’s retrying, ok otherwise. Site status takes the worst status of everything placed under it, so a stuck robot turns the hall red on the site view without anyone opening telemetry. Also store a numeric copy (0/1/2), because text keys have no chart history. How the status rolls up: Site status and the status key.
Traducido del English por IA ·
Movemos material espeso y fibroso en las líneas de residuos farmacéuticos, y allí también surge la cuestión de la bomba.Las bombas PD sumergibles de verdad son raras. El único tipo que puede estar dentro del líquido es la bomba de doble diafragma accionada por aire (AODD). Funciona con aire comprimido, no tiene componentes eléctricos en el pozo, tolera sólidos y puede funcionar en seco sin dañarse. Con carcasa de acero inoxidable o hierro dúctil y válvulas de clapeta (no de bola), maneja bien lodos fibrosos. Necesita un compresor y el caudal es pulsante, así que, si molesta, instale un amortiguador de pulsaciones antes del separador.Las otras opciones honestas mantienen la bomba en seco:Una bomba de cavidad progresiva junto al pozo, por debajo de su nivel más bajo, con una succión inundada corta y un triturador delante para la paja. Es la alimentación clásica del separador y ofrece el caudal más estable. Una bomba de manguera (peristáltica), que puede autocebarse varios metros y no le afectan las fibras, a costa de cambiar la manguera.Para la pantalla: el conjunto básico solo tiene una bomba Motor, pero la biblioteca Process tiene Diaphragm pump, Peristaltic pump, Gear pump y Submersible pump, y la biblioteca Wastewater tiene una Screw pump (la apariencia más cercana a una cavidad progresiva) y una Dosing pump, si su organización dispone de esas bibliotecas. Los símbolos de bomba admiten los valores Running, Speed y Direction, además de la insignia de modo manual/automático Mode; por tanto, asocie Running a algo como pump_running y Speed a la salida del variador en porcentaje. Si el dispositivo envía claves con el nombre del identificador del símbolo (p1.running, p1.speed), se conectan por nombre sin tener que seleccionarlas.
We move thick, fibrous stuff in pharma waste lines, and the pump question comes up there too.
Real immersion PD pumps are rare. The one type that can sit in the liquid is an air-operated double-diaphragm pump (AODD). It runs on compressed air, has no electrics in the pit, tolerates solids and runs dry without damage. With stainless or ductile iron body and flap valves (not balls) it handles fibrous slurry well. You need a compressor and the flow pulses, so put a pulsation dampener before the separator if it minds.
The other honest options keep the pump dry:
A progressive cavity pump next to the pit, below its lowest level, with a short flooded suction and a macerator in front for the straw. That’s the classic separator feed and gives the steadiest flow. A hose (peristaltic) pump, which can self-prime several metres and doesn’t care about fibres, at the cost of hose changes.
For the screen: the core set only has a Motor pump, but the Process library has Diaphragm pump, Peristaltic pump, Gear pump and Submersible pump, and the Wastewater library has a Screw pump (closest look to a progressive cavity) and a Dosing pump, if your organisation has those libraries. Pump symbols take Running, Speed and Direction values plus the hand/auto Mode badge, so bind Running to something like pump_running and Speed to the VFD’s output in percent. If the device sends keys named after the symbol id (p1.running, p1.speed), they connect by name without picking.
Traducido del English por IA ·
Es por el nivel. Un control de tablero solo envía comandos que están en el catálogo del perfil, de nivel Basic y sin alto impacto. Privileged, Critical y cualquier cosa marcada como alto impacto se rechazan a propósito desde un tablero («envíalo desde la consola del dispositivo»), por eso el selector no los ofrece.Nosotros tenemos una puerta de muelle de carga configurada igual. Pon gate.pulse en Basic y desmarca alto impacto; después deja activada «Preguntar antes de ejecutar» en la acción del botón, para que el operador siga recibiendo un cuadro de confirmación (el servidor también lo exige, nadie puede saltárselo desde otro cliente). Vincula una línea de estado a door_closed para que la gente vea lo que hace la puerta, no lo que pulsó. Quién puede pulsarlo depende de los permisos: Ejecutar comandos de widgets más el permiso para enviar comandos básicos. El turno de noche los tiene, las personas que solo miran el tablero no.Y un detalle del lado del ESP32: un comando puede llegar dos veces. Guarda los últimos 32 identificadores de solicitud durante 10 minutos y no vuelvas a ejecutar el mismo id. En una puerta que alterna con cada pulso, esto importa: un duplicado significa que se abre y se cierra otra vez.Página con las reglas de los tableros: Control cards.
It’s the tier. A board control only sends commands that are in the profile’s catalogue, Basic tier, and not high impact. Privileged, Critical and anything marked high impact get refused from a board on purpose («send it from the device console»), so the picker doesn’t offer them.
We run a loading-bay door the same way. Set gate.pulse to Basic and untick high impact, then leave «Ask before running» on in the button’s action, so the operator still gets a confirm dialog (the server enforces it too, nobody skips it from another client). Bind a status line to door_closed so people see what the door is doing, not what they pressed. Who may press it is down to permissions: Run widget commands plus permission to send basic commands. Night shift gets those, people who only look at the board don’t.
And one thing on the ESP32 side: a command can arrive twice. Keep the last 32 request ids for 10 minutes and don’t run the same id again. For a gate that toggles on each pulse this matters, a duplicate means it opens and closes again.
Page with the board rules: Control cards.
Traducido del English por IA ·
Instala una versión actual de Raspberry Pi OS Lite (legacy) para que las bibliotecas TLS estén actualizadas. Hermetry exige TLS 1.2 o superior con suites ECDHE, y una imagen de 2013 no podrá conectarse.
Put a current Raspberry Pi OS Lite (legacy) on it so the TLS libraries are up to date. Hermetry wants TLS 1.2 or newer with ECDHE suites, and a 2013 image won’t connect.
Traducido del English por IA ·
Jessica dio en el clavo con el problema principal: a 15-20 cm estás dentro de la zona ciega. Monta el sensor más arriba; un trozo corto de tubo de PVC como separador funciona, de modo que el depósito lleno quede al menos a 30 cm.El segundo problema es la temporización en Python. Los bucles de espera activa en una Pi 3 pierden flancos cada vez que el planificador interviene. Usa gpiozero con la fábrica de pines pigpio: marca los flancos con tiempo en el daemon:
from gpiozero import DistanceSensor
from gpiozero.pins.pigpio import PiGPIOFactory
import statistics, time
s = DistanceSensor(echo=24, trigger=23, max_distance=4.5,
pin_factory=PiGPIOFactory())
def level_cm():
vals = []
for _ in range(7):
vals.append(s.distance * 100); time.sleep(0.1)
return statistics.median(vals)
La mediana de 7 lecturas descarta el eco ocasional que rebota en la pared del depósito. Después envía {"distance_cm": d, "level_pct": ...} como números y configura una regla de alarma sobre level_pct por debajo de 20 con un debounce de 3 lecturas, para que un eco erróneo no despierte al encargado.
Jessica nailed the main issue: at 15-20 cm you’re inside the blind zone. Mount it higher, a short PVC pipe section as a stand-off works, so full tank is at least 30 cm away.
Second issue is the Python timing. Busy-wait loops on a Pi 3 miss edges whenever the scheduler steps in. Use gpiozero with the pigpio pin factory, it timestamps edges in the daemon:
from gpiozero import DistanceSensor
from gpiozero.pins.pigpio import PiGPIOFactory
import statistics, time
s = DistanceSensor(echo=24, trigger=23, max_distance=4.5,
pin_factory=PiGPIOFactory())
def level_cm():
vals = []
for _ in range(7):
vals.append(s.distance * 100); time.sleep(0.1)
return statistics.median(vals)
Median of 7 throws away the odd echo off the tank wall. Then send {"distance_cm": d, "level_pct": ...} as numbers and put an alarm rule on level_pct below 20 with a debounce of 3 readings, so one bad echo doesn’t wake the warden.
Traducido del English por IA ·
Exactamente eso: pi3-disable-bt estaba ahí con un comentario «for chiller» de 2019. Lo cambié por pi3-miniuart-bt + core_freq=250, hci0 está activo, las ocho etiquetas aparecen en un escaneo y el sondeo del enfriador no perdió ni un ciclo. Solo es un cambio de configuración, así que la validación lo trata como un cambio menor.
Exactly that, pi3-disable-bt was there with a comment «for chiller» from 2019. Swapped to pi3-miniuart-bt + core_freq=250, hci0 is up, all eight tags show in a scan and the chiller polling didn’t miss a beat. Config change only, so validation treats it as a minor change.
Traducido del English por IA ·
^ sí. Y usa pines GPIO que no tengan función de arranque, así que evita 0, 2, 12 y 15 para los bucles.
^ yes. And use GPIO pins that have no boot role, so avoid 0, 2, 12 and 15 for the loops.
Traducido del English por IA ·
Reinicié la alimentación, sí. pi-bluetooth está instalado. systemctl status hciuart indica failed, «Failed to start Configure Bluetooth Modems connected by UART».
Power cycled, yes. pi-bluetooth is installed. systemctl status hciuart says failed, «Failed to start Configure Bluetooth Modems connected by UART».
Traducido del English por IA ·
El String desaparece antes de que lo uses. (String("barn-") + WiFi.macAddress()) crea un temporal que se destruye al final de esa línea, así que clientId apunta a memoria liberada. Lo que haga el heap después acaba en tu ID de cliente. Me pasó con una placa de sensores hace años y perdí un día entero.Lo mismo con setServer(host.c_str(), ...): PubSubClient guarda el puntero, no una copia, así que si host es un String local en setup() tendrás fallos extraños de reconexión más tarde.Usa buffers que vivan tanto como el cliente:
static char clientId[32];
static char brokerHost[64];
void setupMqtt() {
uint8_t mac[6];
WiFi.macAddress(mac);
snprintf(clientId, sizeof(clientId), "barn-%02x%02x%02x", mac[3], mac[4], mac[5]);
strlcpy(brokerHost, settings.host.c_str(), sizeof(brokerHost));
mqtt.setServer(brokerHost, 8883);
}
// later
mqtt.connect(clientId, settings.token.c_str(), "");
settings.token.c_str() está bien dentro de la llamada siempre que settings sea global.
The String is gone before you use it. (String("barn-") + WiFi.macAddress()) makes a temporary that’s destroyed at the end of that line, so clientId points into freed memory. Whatever the heap does next ends up in your client ID. Bit me on a sensor board years ago and I wasted a day too.
Same trap with setServer(host.c_str(), ...): PubSubClient keeps the pointer, not a copy, so if host is a local String in setup() you’ll get odd reconnect failures later.
Use buffers that live as long as the client:
static char clientId[32];
static char brokerHost[64];
void setupMqtt() {
uint8_t mac[6];
WiFi.macAddress(mac);
snprintf(clientId, sizeof(clientId), "barn-%02x%02x%02x", mac[3], mac[4], mac[5]);
strlcpy(brokerHost, settings.host.c_str(), sizeof(brokerHost));
mqtt.setServer(brokerHost, 8883);
}
// later
mqtt.connect(clientId, settings.token.c_str(), "");
settings.token.c_str() is fine inside the call as long as settings lives globally.
Traducido del English por IA ·
Bien, entonces todo es solo un contacto seco y esto es fácil. Hace un tiempo hice casi lo mismo para el almacén de un cliente.Los 2,2k que midió son la resistencia de fin de línea (EOL). El panel antiguo la usaba para distinguir entre «cerrado», «cable cortado» y «cortocircuito». Tiene dos opciones:
- Lo más sencillo: omitirla o ignorarla y leer cada bucle como una entrada digital. Puerta cerrada = 2,2k a tierra, que con el pull-up interno del ESP32 (alrededor de 45k) se lee como LOW. Abierta = HIGH. Funciona, pero un cable cortado se ve exactamente igual que una puerta abierta.
- Mantener la supervisión: lea cada bucle en un pin ADC con un pull-up de 10k a 3,3 V. Cerrado son unos 0,6 V, abierto 3,3 V, en cortocircuito 0 V. Así podrá enviar un valor
faultaparte.
Para 20 bucles se quedará sin pines ADC utilizables, así que yo usaría entradas digitales o añadiría un expansor I2C MCP23017 para las entradas.PIR: coloque una fuente de 12 V en el armario, alimente los PIR desde ella y conecte el contacto N.C. del relé a una entrada exactamente como una puerta. Conecte el negativo de 12 V a la tierra del ESP32 solo si es necesario, el relé ya está aislado. Los contactos de sabotaje también pueden ir a entradas si quiere saber cuándo alguien abre una tapa.En el lado de Hermetry, envíe cada entrada como 0/1, no como true/false, para obtener un historial en gráfico. Algo como:
{"door_lobby": 0, "door_dock": 1, "pir_hall": 0, "tamper_any": 0}
Envíe en cada cambio y además una vez por minuto, para que el último valor esté actualizado. Luego una regla de alarma como door_dock == 1 en el perfil, y una condición horaria para fuera de horario.
Good, then everything is just a dry contact and this is easy. I did almost the same thing for a client’s warehouse a while back.
The 2.2k you measured is the end-of-line (EOL) resistor. The old panel used it to tell «closed» from «wire cut» from «short». You have two choices:
- Simplest: bypass or ignore it and read each loop as a digital input. Closed door = 2.2k to ground, which with the ESP32 internal pull-up (around 45k) reads as LOW. Open = HIGH. That works, but a cut wire looks exactly like an open door.
- Keep the supervision: read each loop on an ADC pin with a 10k pull-up to 3.3 V. Closed is about 0.6 V, open is 3.3 V, shorted is 0 V. Then you can send a separate
faultvalue.
For 20 loops you will run out of usable ADC pins, so I’d do digital inputs, or add an MCP23017 I2C expander for the inputs.
PIRs: put a 12 V supply in the closet, power the PIRs from it, and wire the N.C. relay contact to an input exactly like a door. Tie the 12 V negative to the ESP32 ground only if you need to, the relay is isolated anyway. The tamper contacts can go to inputs too if you want to know when someone opens a cover.
On the Hermetry side, send each input as 0/1, not true/false, so you get a chart history of it. Something like:
{"door_lobby": 0, "door_dock": 1, "pir_hall": 0, "tamper_any": 0}
Send on every change plus once a minute, so the latest value is fresh. Then an alarm rule like door_dock == 1 on the profile, and a time condition for after hours.
Traducido del English por IA ·
Aisha y Ciaran tienen las dos causas. Hice esto una vez para un Nano en una unidad de tratamiento de aire, aquí está la receta completa para la placa ZS-040.1. Ponga el HC-05 en modo AT: mantenga pulsado el botoncito mientras lo alimenta, el LED parpadea lentamente (aproximadamente cada 2 s). Comuníquese con él a 38400 desde un adaptador USB-serie. 2. Configúrelo (115200 si su Nano funciona con «ATmega328P», 57600 si solo funciona «Old Bootloader»):
AT+ROLE=0
AT+UART=115200,0,0
AT+POLAR=1,0
AT+POLAR=1,0 hace que PIO11 baje a nivel bajo mientras hay un enlace activo. 3. Cableado del reset. La ZS-040 no saca PIO11 a un pin de cabecera, así que suelde un cable fino al pin 32 del módulo. Conéctelo al RESET del Nano a través de un condensador de 0,1 uF, igual que lo hace el DTR del chip USB. Cuando avrdude abre el puerto, el enlace se establece, PIO11 baja, el condensador convierte eso en un pulso de reset corto, y el bootloader queda escuchando. 4. Desconecte STATE de RESET.Es delicado, y la primera sincronización tras emparejar a veces falla, así que pruebe dos veces antes de volver a depurar.
Aisha and Ciaran have the two causes. I did this for a Nano in an air handler once, here’s the whole recipe for the ZS-040 board.
1. Put the HC-05 in AT mode: hold the little button while powering it, the LED blinks slowly (about every 2 s). Talk to it at 38400 from a USB-serial adapter. 2. Set it up (115200 if your Nano works with «ATmega328P», 57600 if only «Old Bootloader» works):
AT+ROLE=0
AT+UART=115200,0,0
AT+POLAR=1,0
AT+POLAR=1,0 makes PIO11 go low while a link is up. 3. Reset wiring. The ZS-040 doesn’t bring PIO11 out to a header pin, so solder a thin wire to pin 32 of the module. Connect it to the Nano’s RESET through a 0.1 uF capacitor, the same way the USB chip’s DTR does it. When avrdude opens the port, the link comes up, PIO11 drops, the capacitor turns that into a short reset pulse, and the bootloader is listening. 4. Disconnect STATE from RESET.
It’s fiddly, and the first sync after pairing sometimes fails, so try twice before you start debugging again.
Traducido del English por IA ·
Eso era. El HAL_Delay(5) lo había añadido probando a ciegas; quitarlo y esperar a TC me da los 9 bytes completos y el CRC cuadra siempre. Tampoco hay más eco. Ahora paso a DMA con idle line, como sugirió Aoife.
That was it. The HAL_Delay(5) was something I’d added while guessing, removing it and waiting on TC gives me all 9 bytes and the CRC checks out every time. No more echo either. Moving to idle line DMA next like Aoife suggested.
Traducido del English por IA ·
Ninguna de las dos, la petición se decodifica bien en el osciloscopio y el medidor responde a ella. El problema está en mi lado.
Neither, the request decodes fine on the scope and the meter replies to it. It’s my side.
Traducido del English por IA ·
No construya el asunto del ADC/DAC. Si su placa se reinicia o el DAC produce un pico, el PLC ve un salto de nivel y usted pasa a ser quien tumbó la planta. Lo que añada a ese lazo debe mantener la lectura del PLC correcta incluso cuando su lado esté caído.Dos cosas que he usado, ambas de catálogo:
- Un divisor/aislador de señal alimentado por lazo, una entrada y dos salidas aisladas de 4-20 mA. El PLC recibe una salida y su nodo la otra. Los alimentados por lazo toman la energía del propio lazo, así que compruebe el presupuesto de tensión: alimentación menos mínimo del transmisor menos caída del aislador menos carga de la entrada del PLC debe seguir siendo positivo a 20 mA.
- La idea de Aisha, hecha de forma segura: una pequeña resistencia shunt en serie con un módulo de entrada analógica aislado que tenga salida Modbus RTU. El aislamiento elimina el lazo de tierra que preocupaba a Ciarán. Su gateway lo lee por RS485 como cualquier otro dispositivo Modbus. Misma comprobación del presupuesto de tensión; un shunt de 50 ohmios provoca una caída de 1 V a 20 mA.
Prefiero la 1 porque la ruta de señal del PLC es un componente certificado y no un shunt que alguien pueda quitar más adelante.Después, en Hermetry, envíe el valor bruto en mA y conviértalo allí. En el flujo raíz, un bloque Scale antes de Save telemetry asigna el rango 4-20 a su rango de depósito, y guarda el valor bruto para localizar fallos (por debajo de 3,8 mA significa lazo roto):
Scale: in_min 4, in_max 20, out_min 0, out_max 100 -> level_pct
El ejemplo de valor derivado está en Derived values.
Don’t build the ADC/DAC thing. If your board resets or the DAC glitches, the PLC sees a level jump and you’re now the person who tripped the site. Anything you put in that loop must keep the PLC’s reading correct even when your side is dead.
Two things I’ve used, both off the shelf:
- A loop-powered signal splitter/isolator, one input, two isolated 4-20 mA outputs. The PLC gets one output, your node the other. Loop-powered ones take the power from the loop, so check the voltage budget: supply minus transmitter minimum minus the isolator’s drop minus the PLC input’s burden must stay positive at 20 mA.
- Aisha’s idea done safely: a small series shunt with an isolated analog input module that has Modbus RTU output. The isolation removes the ground loop Ciarán worried about. Your gateway reads it over RS485 like any other Modbus device. Same voltage budget check, a 50 ohm shunt costs 1 V at 20 mA.
I prefer 1 because the PLC’s signal path is a certified part and not a shunt someone may remove later.
Then in Hermetry send the raw mA and convert there. In the root flow, a Scale block before Save telemetry maps 4-20 to your tank range, and you keep the raw value for fault finding (below 3.8 mA means a broken loop):
Scale: in_min 4, in_max 20, out_min 0, out_max 100 -> level_pct
The derived value example is on Derived values.
Traducido del English por IA ·
Aisha tiene razón. Hermetry guarda un cuerpo que no es JSON como una única clave raw, por eso ves el texto de tu plantilla. Construye el JSON con printf y envía todos los sitios en un solo mensaje, es más barato y ordenado:
#!/bin/bash
json="{"
while read -r ip name; do
if ping -c 3 -W 2 "$ip" > /dev/null 2>&1; then ok=1; else ok=0; fi
json+=$(printf '"%s.up":%d,' "$name" "$ok")
done < /home/pi/sites.txt
json="${json%,}}"
mosquitto_pub -h "$BROKER" -p 8883 --capath /etc/ssl/certs -u "$TOKEN" -q 1
-t v1/telemetry -m "$json"
Tres pings, no uno: se considera activo si cualquiera de ellos responde.
Para la alerta, una regla de alarma en el perfil por clave de sitio con un debounce por conteo, de modo que necesite varias lecturas malas seguidas antes de activarse y varias buenas para desactivarse:
{ "type": "pump3_unreachable",
"title": "Pump 3 modem not answering",
"severities": [ { "severity": "MAJOR", "condition": { "key": "pump3.up", "op": "==", "value": 0 } } ],
"debounce": { "mode": "count", "raise": 5, "clear": 2 },
"enabled": true }
Cinco minutos de pings fallidos antes de que alguien se entere. Añade también una regla Device offline para la Pi, si no, una Pi caída parece que «todo va bien». Opciones de debounce: Debounce, hysteresis and dampening.
Aisha has it. Hermetry stores a body that isn’t JSON as a single raw key, which is why you see your template text. Build the JSON with printf, and send all sites in one message, cheaper and tidier:
#!/bin/bash
json="{"
while read -r ip name; do
if ping -c 3 -W 2 "$ip" > /dev/null 2>&1; then ok=1; else ok=0; fi
json+=$(printf '"%s.up":%d,' "$name" "$ok")
done < /home/pi/sites.txt
json="${json%,}}"
mosquitto_pub -h "$BROKER" -p 8883 --capath /etc/ssl/certs -u "$TOKEN" -q 1
-t v1/telemetry -m "$json"
Three pings, not one: counts as up if any one comes back.
For the alert, an alarm rule on the profile per site key with a count debounce, so it needs several bad readings in a row before it opens and several good ones to clear:
{ "type": "pump3_unreachable",
"title": "Pump 3 modem not answering",
"severities": [ { "severity": "MAJOR", "condition": { "key": "pump3.up", "op": "==", "value": 0 } } ],
"debounce": { "mode": "count", "raise": 5, "clear": 2 },
"enabled": true }
Five minutes of failed pings before anyone hears about it. Add a Device offline rule for the Pi too, otherwise a dead Pi looks like «everything fine». Debounce options: Debounce, hysteresis and dampening.

