Webserver_Dashboard and basic functionality #1

Merged
Roman_Schenk merged 12 commits from Webserver_Layout into master 2022-08-23 20:28:05 +02:00
4 changed files with 7 additions and 3 deletions
Showing only changes of commit 633750d0dc - Show all commits

View File

@ -8,5 +8,5 @@ class FileIO:
def loadZones(self):
zones = []
for i in range(12):
zones.append(Zone(number=i+1, name="Zone " + str(i+1), actualHumidity=50, desiredHumidity=30, autoMode=True, state=False, setState=0, endTimeSetState=0, planedDuration=0))
zones.append(Zone(number=i+1, name="Zone " + str(i+1), actualHumidity=50, desiredHumidity=70, autoMode=True, state=False, setState=0, endTimeSetState=0, planedDuration=0))
return zones

View File

@ -41,6 +41,8 @@ class Zone:
self.state = True
case 3:
self.state = False
if (not self.planedDuration > 0):
self.setState = 0
def refreshStateManualmode(self):
@ -62,6 +64,8 @@ class Zone:
self.state = True
case 3:
self.state = False
if (not self.planedDuration > 0):
self.setState = 0
def refreshState(self):

View File

@ -51,7 +51,7 @@ class ZoneManager:
return False
def switchZoneState(self, zone, state, duration, instant=False):
if(instant or self.systemSettings.multiZoneIrrigation or state==False or (not self.isAnyZoneBusy())):
if(instant or self.systemSettings.multiZoneIrrigation or state==False ): #or (not self.isAnyZoneBusy())
zone.switchState(state=state, duration=duration, instant=True)
else:
self.addIrrigationJob(IrrigationJob(id=self.random.randint(a=100000000, b=999999999), zone=zone, duration=duration))

View File

@ -13,7 +13,7 @@ webserver = Webserver(zoneManager=zoneManager, port=80)
def cronJobs():
while True:
time.sleep(1)
time.sleep(0.5)
zoneManager.cronJobs()
if __name__ == "__main__":