dougstrickland
Junior Member
Posts: 54
Raspberry Pi: Yes
Other Device: Wemos, Arduino...
|
Post by dougstrickland on Jun 20, 2017 8:13:35 GMT -8
Okay, I've run SDL_Pi_SI1145.py and get the following output:
Vis: 4669 IR: 24505 Vis Lux: 1807.37704918 IR Lux: 9939.3442623 UV Index: 23.64
So there's some UV output, but nothing shows up on Freeboard. I've reset the datasource to be datasources["SmartPlantPi"]["SmartPlantPi_UVIndex"], but still get zero output on Freeboard.
Any suggestions for troubleshooting this?
|
|
dougstrickland
Junior Member
Posts: 54
Raspberry Pi: Yes
Other Device: Wemos, Arduino...
|
Post by dougstrickland on Jun 20, 2017 7:45:08 GMT -8
okay I've replaced the sensor - but I am still getting zero output from the UV sensor. Is there a test script that examines the output of the sensor? Any other troubleshooting advice?
|
|
dougstrickland
Junior Member
Posts: 54
Raspberry Pi: Yes
Other Device: Wemos, Arduino...
|
Post by dougstrickland on Jun 19, 2017 17:54:57 GMT -8
Say, why don't you write up a guest blog post for us on connecting it to grafana? That would be really cool! BP I second that request!
|
|
dougstrickland
Junior Member
Posts: 54
Raspberry Pi: Yes
Other Device: Wemos, Arduino...
|
Post by dougstrickland on Jun 10, 2017 6:21:31 GMT -8
Curious if there's been any development of integrating the SmartPlantPi with Alexa voice control? I'd love to be able to hear my plant's status with my Echo Dot...
|
|
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)
|
|
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 8:21:03 GMT -8
I've moved the project outside, and I'm sensing around 27,000 lux for both IR and Visible light. UV Index is still reading zero. What should I try next?
|
|
dougstrickland
Junior Member
Posts: 54
Raspberry Pi: Yes
Other Device: Wemos, Arduino...
|
Post by dougstrickland on May 31, 2017 6:33:40 GMT -8
I'm wondering about adding sensors to the SmartPlantPi project. I was thinking about a barometric pressure sensor like the SparkFun Barometric Pressure Sensor Breakout - BMP180. It's I2C though, and my I2C bus is full of other sensors...
How would you approach adding another sensor (analog, I2C, or other) to this project?
Where to begin?!
:-)
|
|
dougstrickland
Junior Member
Posts: 54
Raspberry Pi: Yes
Other Device: Wemos, Arduino...
|
Post by dougstrickland on May 30, 2017 16:30:41 GMT -8
|
|
dougstrickland
Junior Member
Posts: 54
Raspberry Pi: Yes
Other Device: Wemos, Arduino...
|
Post by dougstrickland on May 29, 2017 6:55:48 GMT -8
I like sparklines to show trends in data streams easily. I noticed when I turned on sparklines for the temperature panel it didn't work. I figured out that the feed from the SmartPlantPi.py script concatenates the Metric/US C or F to the end of the number so that Freeboard interprets it as a string. I fixed this by modifying the script, then adjusting the sparkline panel to display the units. On line 315 of SmartPlantPi.py I changed the myMessage code to look like this: myMessage["SmartPlantPi_Temperature"] = "{:4.1f}".format(returnTemperatureCF(state.Temperature) ) effectively removing this at the end: returnTemperatureCFUnit() Then set the Sparkline Units to "deg F" See my dashboard live at freeboard.io/board/Vlm3IMAttachments:
|
|
dougstrickland
Junior Member
Posts: 54
Raspberry Pi: Yes
Other Device: Wemos, Arduino...
|
Post by dougstrickland on May 29, 2017 6:05:00 GMT -8
I've been wondering about the fact that the UV Index measurement is always reading 0, so I took my 200 watt reptile UV bulb and stuck it over the sensor. I'm still getting a reading of 0. The visible light went up to about 2900 lux, and the IR shot up to 14,000 lux, but UV still reads zero.
Is this a defective sensor, or am I missing something else?
|
|
dougstrickland
Junior Member
Posts: 54
Raspberry Pi: Yes
Other Device: Wemos, Arduino...
|
Post by dougstrickland on May 28, 2017 8:17:56 GMT -8
|
|
dougstrickland
Junior Member
Posts: 54
Raspberry Pi: Yes
Other Device: Wemos, Arduino...
|
Post by dougstrickland on May 27, 2017 5:45:42 GMT -8
I did not run the script as sudo.
Learning as we go!
|
|
dougstrickland
Junior Member
Posts: 54
Raspberry Pi: Yes
Other Device: Wemos, Arduino...
|
Post by dougstrickland on May 26, 2017 11:01:16 GMT -8
I'm apparently having problems during watering? i just saw this:
Tick! The time is: 2017-05-26 11:30:22.405293 checkandWater: 65.00 Threshold / 58.01 Current Watering Plant [Errno 13] Permission denied: 'SPPState.pkl' File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "SmartPlantPi.py", line 468, in saveState output = open('SPPState.pkl', 'wb')
Tick! The time is: 2017-05-26 11:31:22.405613
Seems like a problem with a pickle?!
|
|
dougstrickland
Junior Member
Posts: 54
Raspberry Pi: Yes
Other Device: Wemos, Arduino...
|
Post by dougstrickland on May 26, 2017 9:23:19 GMT -8
When I press the button the display updates with black text on a white background stating "water filled". After a second, the text reverses to white text on a black background, then halts execution of the program, and exits. I get the following error message:
Traceback (most recent call last): File "SmartPlantPi.py", line 948, in <module> saveState() File "SmartPlantPi.py", line 468, in saveState output = open('SPPState.pkl', 'wb') IOError: [Errno 13] Permission denied: 'SPPState.pkl' pi@raspberrypi:~/Adafruit_Python_GPIO/SDL_Pi_SmartPlantPi $
Any suggestions as to what might be causing this error? Up until I press the button everything seems to be working correctly, at least it is updating the display every 10 seconds...
|
|