rachelr77
@roberts-r · Se unió el noviembre 2025
Facility manager · buildings · new to IoT
- Temas
- 2
- Respuestas
- 34
- Puntos
- 0
Respuestas de foro creadas
Traducido del English por IA ·
Lo hice para las lavadoras de dos de nuestros edificios (recuentos de monedas), así que aquí está lo que me funcionó aunque no soy programador.Envíe un total acumulado por columna, cada pocos minutos, como números simples:
{"vend.col1": 1834, "vend.col2": 977, "vend.col3": 2210, ...}
Luego, en la tarjeta del gráfico, elija el agregado «increase». Está pensado para contadores: cada intervalo muestra cuánto aumentó el contador, y si el valor baja porque la placa se reinició, cuenta desde cero en lugar de mostrar un enorme valor negativo. Así que un reinicio no le cuesta nada, siempre que no reinicie dos veces dentro de un mismo intervalo y no supere el valor anterior.Enviar {«col3»: 1} por venta también funciona con «sum», pero si se pierde un mensaje, el recuento se pierde para siempre. Con totales, el siguiente mensaje se pone al día.Una cosa que me dio problemas: los intervalos diarios son días UTC. Estamos en hora del Este, así que mis barras «por día» se dividían a las 7 u 8 de la tarde. Para días locales use intervalos horarios y sume las horas, o simplemente conviva con ello.Para «probablemente vacía»: guarde el total en el momento del rellenado (yo escribo un atributo de servidor por columna los lunes desde la página del dispositivo) y genere una alerta cuando el total menos ese valor supere aproximadamente 38. Hago esa parte en un flujo porque una condición de alarma no puede hacer operaciones aritméticas entre dos valores.La página es Aggregates and rollups.
I did this for the laundry machines in two of our buildings (coin counts), so here’s what worked for me even though I’m no programmer.
Send a running total per column, every few minutes, as plain numbers:
{"vend.col1": 1834, "vend.col2": 977, "vend.col3": 2210, ...}
Then on the chart card pick the aggregate «increase». It’s made for counters: each bucket shows how much the counter went up, and if the value goes down because the board rebooted, it counts from zero instead of showing a huge negative. So a reboot costs you nothing as long as you don’t reboot twice inside one bucket and land above the old value.
Sending {«col3»: 1} per vend also works with «sum», but if a message is lost the count is gone for good. With totals the next message catches up.
One thing that tripped me: day buckets are UTC days. We’re on Eastern time, so my «per day» bars were split at 7 or 8 pm. For local days use hourly buckets and add up the hours, or just live with it.
For «probably empty»: store the total at refill time (I write a server attribute per column on Monday from the device page) and alert when total minus that passes 38 or so. I do that part in a flow because an alarm condition can’t do arithmetic between two values.
Page is Aggregates and rollups.
Can you print what clientId actually contains right before connect?
Oh I have the same kit! Never knew what white was for
+1, also what’s the difference between pitch, roll and yaw? 😅

