dougstrickland
Junior Member
Posts: 54
Raspberry Pi: Yes
Other Device: Wemos, Arduino...
|
Post by dougstrickland on May 31, 2017 8:25:47 GMT -8
I want to modify the trigger interval for updateState, but can't find where the scheduler jobs are kept. I want to set the update to 30 seconds from 10. Where should I look?
|
|
dougstrickland
Junior Member
Posts: 54
Raspberry Pi: Yes
Other Device: Wemos, Arduino...
|
Post by dougstrickland on May 31, 2017 9:09:27 GMT -8
I didn't go far enough...
I found the parameters at lines 831 through 854. I was using nano at first but couldn't find it. I switched to Sublime and using its better search function was able to locate the block.
# prints out the date and time to console scheduler.add_job(tick, 'interval', seconds=60)
# blink optional life light scheduler.add_job(blinkLED, 'interval', seconds=5, args=[1,0.250])
# update device state scheduler.add_job(updateState, 'interval', seconds=10)
# check for alarms scheduler.add_job(checkForAlarms, 'interval', seconds=15) #scheduler.add_job(checkForAlarms, 'interval', seconds=300)
# send State to PubNub scheduler.add_job(publishStateToPubNub, 'interval', seconds=10)
# check and water scheduler.add_job(checkAndWater, 'interval', minutes=15)
# save state to pickle file scheduler.add_job(saveState, 'interval', minutes=30)
|
|
|
Post by SDL on May 31, 2017 12:42:32 GMT -8
You found it!
BP
|
|
SeanJ
New Member
Posts: 6
Raspberry Pi: Yes
|
Post by SeanJ on Dec 4, 2017 13:40:02 GMT -8
Hey guys,
I may have a need to run the pump a bit longer than the current default. In terms of duration Pump ON (I believe its in seconds). Where exactly should I change the ON time for the pump/flow? I've looked at the code and it's not 100% clear to me where this is set. Thanks.
|
|
|
Post by faltek on Dec 8, 2017 12:21:28 GMT -8
Hi ! Open SmartPlantPi.py
Line 220 totalWaterPumped = pumpWater(2.0)
Change the value of (2.0) to the number of secondes needed !
And i've added this line after the line 201 for more information of total water pumped
print "Total Water Pumped = %6.2f" % totalWaterPumped
it was present in a debug line.
*- I'm beggining in coding, so don't hesitate to correct my mistake ! I'm here to learn !
|
|
SeanJ
New Member
Posts: 6
Raspberry Pi: Yes
|
Post by SeanJ on Dec 10, 2017 15:09:22 GMT -8
Thanks faltek! I was still hunting for that! I did notice that line when i was originally looking through the code, although the past tense "water pumped" was throwing me off I guess.
|
|
SeanJ
New Member
Posts: 6
Raspberry Pi: Yes
|
Post by SeanJ on Dec 11, 2017 7:32:11 GMT -8
Here's another one that is getting the better of me: Whenever I have a successful watering, the state.Pump_Water_Full gets set to false. One thing i can think of is it's not getting the totalWaterPumped value after pumping, therefore it 'thinks' totalwaterpumped is <= 0.0 (even though i know it physically watered). My water flow sensor is hooked up and working. It seems to me there may be some (DEBUG) lines in the code that maybe need to be removed so the code can properly reference the totalwaterpumped value following each watering. ? faltek? lol
|
|