Browse Source

Lock the garage door when LOCK is asserted

Zachary Kotlarek 12 năm trước cách đây
mục cha
commit
683b9d41d1
1 tập tin đã thay đổi với 9 bổ sung và 0 xóa
  1. 9 0
      dmx/garage.pl

+ 9 - 0
dmx/garage.pl

@@ -96,6 +96,15 @@ while (1) {
 		$update = 0;
 		$update = 0;
 	}
 	}
 
 
+	# Do not operate when LOCKed
+	if ($update && $exists{'LOCK'}) {
+		DMX::say('Garage door locked');
+		if ($exists{'GARAGE_CMD'}) {
+			DMX::say('Access denied to: ' . $exists{'GARAGE_CMD'});
+		}
+		$update = 0;
+	}
+
 	# Update the relay
 	# Update the relay
 	if ($update) {
 	if ($update) {