Nouveau : le pare-feu IA surveille toute la plateforme et explique chaque incident en termes simples. Découvrez comment ça marche

Paper towel level alarms fire every time someone pulls a towel

Paper towel level alarms fire every time someone pulls a towel

Résolu 3 3

Backend dev, new to hardware, and I volunteered for this, so be kind.

Our office has 12 restrooms. I built a small ESP32 + VL53L0X time-of-flight sensor that sits on top of each paper towel and toilet roll dispenser and measures the distance down to the paper, every 30 s, sending {"dist_mm": 143}. Full is around 40 mm, empty around 190 mm.

I made an alarm rule on the profile: dist_mm > 160, severity WARNING. The cleaning supervisor got 70 e-mails on the first day. It fires whenever someone pulls a towel (the hand is in the way, or the roll swings) and then clears again 30 s later. It also fires on the toilet rolls when the roll spins. How do I make it only tell her when a dispenser is really running low?

Measure twice, poll once.
♥ 0

On the device: take 5 readings a second apart and send the median, not one sample. Kills most of the hand-in-the-way readings before they leave the board.

If it isn't logged, it didn't happen.
♥ 0

I’m new to IoT too, but we did exactly this for soap dispensers in our buildings last year and fought the same e-mail flood, so here’s what ended up working.

Send a fill level in percent instead of millimetres, it’s easier for the cleaners to understand: fill_pct = (190 - dist) / 150 * 100 on the ESP32. Then add debounce and hysteresis to the rule so one odd reading can’t open it, and a reading hovering at the limit can’t close and reopen it. Ours, adjusted to your numbers:

{
  "type": "paper_low",
  "title": "{{device.name}}: paper at {{value}} %",
  "severities": [
    { "severity": "WARNING", "condition": { "key": "fill_pct", "op": "<", "value": 20 } }
  ],
  "debounce": { "mode": "count", "raise": 4, "clear": 2 },
  "hysteresis": 10,
  "notify": {
    "recipients": [ { "kind": "email", "email": "cleaning-lead@yourcompany.example" } ],
    "minSeverity": "WARNING"
  },
  "enabled": true
}

With readings every 30 s, raise 4 means it has to be low for about 2 minutes in a row, and it only clears once it’s back above 30 % (after a refill). Paste it in the profile’s Alarm rules tab in JSON mode. E-mail only goes to explicit addresses in the notify block, so use the supervisor’s address there, not a role. Name the devices after the restroom (« 2F Men, towels ») because the title uses the device name. The debounce settings are explained on Debounce, hysteresis and dampening.

Timestamps in UTC or it didn't happen.
Solution acceptée♥ 2

Deployed the median on the boards and this rule on Monday. 3 e-mails all week, each one a dispenser that was actually almost empty. The supervisor asked if she can get the toilet roll ones in the morning only, but that’s a problem for next week.

Measure twice, poll once.
♥ 0
4 sujets de 1 à 4 (sur un total de 4)
  • Vous devez être connecté pour répondre à ce sujet.

Rejoignez la discussion

Connectez-vous pour poser et répondre à des questions, aimer les messages utiles et marquer la réponse qui a résolu votre problème. Chaque contribution rapporte des points et des niveaux.

Partager