Skip to content
Snippets Groups Projects
Commit 948a2666 authored by Philipp Jonas Krieg's avatar Philipp Jonas Krieg
Browse files

light control by hand

parent 3c1f34b7
No related branches found
No related tags found
1 merge request!29Finished Communication Logic
......@@ -27,7 +27,6 @@ def analyze_service(p):
new_thread = threading.Thread(target=get, args=(p,))
new_thread.start()
# turns light on/off
if not p.light_auto_mode:
if is_time_between(p.light_time_on, p.light_time_off, now) and p.light_status == 0:
......@@ -41,6 +40,17 @@ def analyze_service(p):
lichtoff(p)
except:
print("analyze.py] No connection to ESP8266 possible")
else:
if p.light_status == 1:
try:
lichton(p)
except:
print("[analyze.py] No connection to ESP8266 possible")
else:
try:
lichtoff(p)
except:
print("analyze.py] No connection to ESP8266 possible")
# checks ph-value and start ph handling routine if needed
#if not(p.ph_target[0] <= p.ph_status <= p.ph_target[1]) and not p.ph_routine_started:
......@@ -56,16 +66,6 @@ def analyze_service(p):
pumpe2(p)
p.nutrition_pump_status = 0
# handling of camera was moved to seperate script
# check other sensors here
# if datetime.datetime.now() - p.picture_last > datetime.timedelta(minutes=10):
# # take and analyze new photo
# print("made a new photo")
# p.picture_last = datetime.datetime.now()
# starts analyze service in new thread
def start_analyze_service(p):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment