File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -112,9 +112,6 @@ def connected():
112112 microcontroller .reset ()
113113io .publish (alarmfeed , 0 )
114114io .publish (resolvedfeed , 0 )
115- #io.publish(reconnectedfeed, 1)
116- #time.sleep(.25)
117- #io.publish(reconnectedfeed, 0)
118115
119116while True :
120117 try :
@@ -192,7 +189,7 @@ def connected():
192189 io .publish (resolvedfeed , 0 )
193190
194191 #check motion sensor if there is no alarm
195- if (alarm1 is False and alarm2 is False and prealarm is False ):
192+ if (not alarm1 and not alarm2 and not prealarm ):
196193 #update pir sensor
197194 motion .update ()
198195 #if motion stopped
@@ -219,7 +216,7 @@ def connected():
219216
220217 print ("\n " )
221218
222- # Explicitly pump the message loop.
219+ # Explicitly pump the message loop to avoid MQTT timeouts .
223220 io .loop ()
224221
225222 #check difference between time now and start times if more than N seconds start beeping
You can’t perform that action at this time.
0 commit comments