From 2e79cdd10ebb9da856e67d6d509b9ab54938926e Mon Sep 17 00:00:00 2001 From: jerick Date: Mon, 28 Nov 2022 16:07:55 -0500 Subject: [PATCH] wait after kill --- mqtt/tempSensor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mqtt/tempSensor.py b/mqtt/tempSensor.py index fa5cd84..da2f26c 100644 --- a/mqtt/tempSensor.py +++ b/mqtt/tempSensor.py @@ -93,6 +93,7 @@ def publish(client, temp, humidity): for proc in psutil.process_iter(): if proc.name() == 'libgpiod_pulsein' or proc.name() == 'libgpiod_pulsei': proc.kill() +time.sleep(1.0) client = connect_mqtt() client.loop_start() print (sensor)