24.10.2018, 13:42
Try adding log to all checkwrite calls, like this:
Code:
if opened then
fullyOpened = (os.microtime() - firstTimestamp) >= openingValveTime
if fullyOpened then
log(grp.checkwrite(pumpGA, true))
nextCalculationAfter = minInterval
else
log(grp.checkwrite(pumpGA, false))
nextCalculationAfter = openingValveTime + 1 - (os.microtime() - firstTimestamp) -- run a little after possible change
end
else
log(grp.checkwrite(pumpGA, false))
nextCalculationAfter = openingValveTime + 1
end