config values
This commit is contained in:
parent
745315020b
commit
90cf74e0a2
@ -19,7 +19,7 @@ STATE_ERROR = "error"
|
||||
|
||||
LIGHT_READ_DELAY_S = 30
|
||||
LIGHT_CONSECUTIVE_READS = 10
|
||||
LIGHT_LX_THRESHOLD = {"open":10, "close":0}
|
||||
LIGHT_LX_THRESHOLD = {"open":5, "close":0}
|
||||
|
||||
MQTT_HOST = "gitlab"
|
||||
MQTT_TOPIC = "outdoor/chickenhouse/gate"
|
||||
@ -32,7 +32,7 @@ POWER_SENSOR_I2C_ADDRESS = 0x40
|
||||
CONSECUTIVE_CURRENT_READS = 1000
|
||||
|
||||
MAX_ENGINE_POWER = {"up":330, "down":300}
|
||||
MAX_GATE_RUNTIME = {"open":250, "close":250}
|
||||
MAX_GATE_RUNTIME = {"open":270, "close":250}
|
||||
|
||||
|
||||
class GateState(object):
|
||||
@ -92,7 +92,7 @@ class GateState(object):
|
||||
next_state = self.__next_state
|
||||
if self.__is_transition():
|
||||
self.__gate_handler.close()
|
||||
sleep(2)
|
||||
sleep(5)
|
||||
self.__gate_handler.stop()
|
||||
self.__comserver.transmit(MQTT_TOPIC, str(time()) + " Opened " + \
|
||||
str(self.__power_data.average()) + " mW")
|
||||
@ -108,7 +108,7 @@ class GateState(object):
|
||||
next_state = self.__next_state
|
||||
if self.__is_transition():
|
||||
self.__gate_handler.open()
|
||||
sleep(2)
|
||||
sleep(5)
|
||||
self.__gate_handler.stop()
|
||||
self.__comserver.transmit(MQTT_TOPIC, str(time()) + " Closed " + \
|
||||
str(self.__power_data.average()) + " mW")
|
||||
|
Loading…
Reference in New Issue
Block a user