From 1445ffdcdedef749950e839e5e9875f484f42267 Mon Sep 17 00:00:00 2001 From: julio Date: Tue, 6 Oct 2026 03:42:10 -0300 Subject: [PATCH] fix(historico): pull-down no pino do PIR evita disparos falsos com o sensor desligado Co-Authored-By: Claude Opus 5.5 --- historico.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/historico.py b/historico.py index 14764bd..b64a7dd 100644 --- a/historico.py +++ b/historico.py @@ -181,7 +181,8 @@ class Historico: continue chip, _, linha = self.pir['linha'].partition(':') try: - self.processo_pir = subprocess.Popen(['gpiomon', '-c', chip, '-e', 'rising', linha], + # pull-down: com o sensor desligado o pino não fica "flutuando" (disparos falsos) + self.processo_pir = subprocess.Popen(['gpiomon', '-c', chip, '-b', 'pull-down', '-e', 'rising', linha], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) self.pir.update(disponivel=True, erro='') for _ in self.processo_pir.stdout: