The relevant values or lrC - the current temperature, and lRmCd - the trigger point.
At 1800 today, the event log reported the following values:
Script lRmCld: 3
Script lrC: 2
The entire script that is failing to function is below. I have bolded the lines that might help with the assessment. Note that I have tried to simplify the conditions with lines that are commented out - none of which worked. I have verified that both 'warmup' variables are false.
- Code: Select all
[b]season = indigo.variables[325456157].value
[/b]hseOcc = indigo.variables[612296111].getValue(bool)
[b]warmup18 = indigo.variables[566274194].getValue(bool)
warmup20 = indigo.variables[1193285363].getValue(bool)
[/b]import time
# get the trigger values (trigXXX: abbreviation for FD low point trigger)
hSmpCld = indigo.variables[658575084].getValue(int) #htr sump COLD threshhold
hSmpOK = indigo.variables[1115411517].getValue(int) #htr sump OK
htWtrCld = indigo.variables[295376955].getValue(int) #htWtrTank COLD threshhold
htWtrOK = indigo.variables[154728201].getValue(int) #htWtrTank OK
[b]lRmCld = indigo.variables[1086851778].getValue(int) #livingRm COLD threshhold
lRmOK = indigo.variables[711165647].getValue(int) #livingRm OK
[/b]stWtrCld = indigo.variables[25559805].getValue(int) #streetWater COLD threshhold
stWtrOK = indigo.variables[483412678].getValue(int) #streetWater OK
upStrsCld = indigo.variables[840732144].getValue(int) #upstairs COLD threshhold
upStrsOK = indigo.variables[63463463].getValue(int) #upstairs OK
wCabCld = indigo.variables[415421705].getValue(float) #wineCabinet COLD threshhold
wCabOK = indigo.variables[364969593].getValue(float) #wineCabinet OK
outsideCld = indigo.variables[680985657].getValue(int) #outside COLD threshhold
outsideOK = indigo.variables[78723147].getValue(int) #outside OK
crwlSpcCld = indigo.variables[427855415].getValue(int) #crawlSpace COLD threshhold
crwlSpcOK = indigo.variables[1756484536].getValue(int) #crawlSpace OK
statSetPt = indigo.variables[453519410].getValue(int) #stat set point (from var, not stat)
# get the current temperatures (xxxC: abbreviation for space temp)
dev = indigo.devices[647163782] #street water
stWtrC = int(dev.states["temperature"])
dev = indigo.devices[895358553] #wine cabinet
wineCabC = int(dev.states["temperature"])
[b]dev = indigo.devices[883519697] #living room
lrC = int(dev.states["temperature"])
[/b]
[b]dev = indigo.devices[634066077] #upstairs
upStrsC = int(dev.states["temperature"])
[/b]
dev = indigo.devices[1969337208] #outside
outC = int(dev.states["temperature"])
dev = indigo.devices[892742387] #hot water tank
htWtrC = int(dev.states["temperature"])
dev = indigo.devices[1386749935] #heater sump
sumpC = int(dev.states["temperature"])
dev = indigo.devices[46322275] #crawl space
crwlSpcC = int(dev.states["temperature"])
# verify that the variables have been imported properly
[b]indigo.server.log(" season: {}".format(season))
[/b]
indigo.server.log(" outsideCld: {}".format(outsideCld))
indigo.server.log(" outC: {}".format(outC))
indigo.server.log(" crwlSpcCld: {}".format(crwlSpcCld))
indigo.server.log(" crwlSpcC: {}".format(crwlSpcC))
[b]indigo.server.log(" lRmCld: {}".format(lRmCld))
indigo.server.log(" lrC: {}".format(lrC))
indigo.server.log(" upStrsCld: {}".format(upStrsCld))
indigo.server.log(" upStrsC: {}".format(upStrsC))
[/b]indigo.server.log(" hSmpCld: {}".format(hSmpCld))
indigo.server.log(" sumpC: {}".format(sumpC))
indigo.server.log(" htWtrCld: {}".format(htWtrCld))
indigo.server.log(" htWtrC: {}".format(htWtrC))
indigo.server.log(" wCabCld: {}".format(wCabCld))
indigo.server.log(" wineCabC: {}".format(wineCabC))
indigo.server.log(" stWtrCld: {}".format(stWtrCld))
indigo.server.log(" stWtrC: {}".format(stWtrC))
# proceed with the if/then turn off heat for anything that is OK (> FD OK test) w AG
time.sleep(3) #allow time for temp variables to be updated
if stWtrC > stWtrOK:
indigo.actionGroup.execute(358770212) #stWtr tape off
if wineCabC > wCabOK:
indigo.actionGroup.execute(955423681) #wine can htr off
if sumpC > hSmpOK:
indigo.actionGroup.execute(172000814) #htr sump tape off
if not hseOcc:
if lrC > lRmOK or upStrsC > upStrsOK:
if not("warmup18" or "warmup20"):
indigo.actionGroup.execute(431011597) #htr 5C
if htWtrC > htWtrOK:
indigo.actionGroup.execute(460903989) #htWtr off
[b]# next, proceed with the if/then turn on heat for anything that is cold (fails FD test) w AG
if season == "winter":
#if (lrC < lRmCld) or (upStrsC < upStrsCld):
if (lrC < lRmCld):
# if not("warmup18"):# or "warmup20"):
if not("warmup18" or "warmup20"):
indigo.actionGroup.execute(1307638528) #htr 7, cntr, main water off [/b]
if sumpC < hSmpCld:
indigo.actionGroup.execute(1808251937) #htr sump tape on, cntr
if htWtrC < htWtrCld:
indigo.actionGroup.execute(599509902) #htWtr On, cntr
if stWtrC < stWtrCld:
indigo.actionGroup.execute(90585841) #stWtr tape on, cntr, water off
if wineCabC < wCabCld:
indigo.actionGroup.execute(1406401903) #wine can htr on, cntr
#last, send email notifications f(FD condition)
time.sleep(3) #allow time for devices to switch on as necessary before reporting their status
if (lrC < lRmCld or \
upStrsC < upStrsCld or \
crwlSpcC < crwlSpcCld or \
outC < outsideCld or \
sumpC < hSmpCld or \
htWtrC < htWtrCld or \
stWtrC < stWtrCld or \
wineCabC < wCabCld ):
indigo.actionGroup.execute(966172245) #if any cond fails, sends FD email (AG - FD Status Email)
elif (outC > outsideOK):
indigo.actionGroup.execute(1538967727) # (AG - FD notCold email)
else:
indigo.actionGroup.execute(963098824) #all temps ok emai (AG - FD no exceptions email)
The preview showed that the bolding did not work. How can I help point to the issues in a script in the future?