|
Post by SDL on May 24, 2019 9:23:03 GMT -8
Look in SGS.py at about line 88 and make sure that you see this.
############# # Debug True or False ############
DEBUG = True
Re-run your program and post the results.
Also, are you running Blynk? If you are, show us the plant moisture screen.
I'm wondering if your moisture sensors are reading 0 and so the software thinks it is a fault.
BP
|
|
|
Post by scottaandy on May 24, 2019 11:49:44 GMT -8
Check: Line 88 of SGS.py is DEBUG = True Re-run SGS.py: pi@switchdoclabs:~/SDL_Pi_SmartGardenSystem $ sudo python SGS.py [Errno 121] Remote I/O error [Errno 121] Remote I/O error Error accessing 0x49: Check your I2C address Error accessing 0x49: Check your I2C address Error accessing 0x4A: Check your I2C address Error accessing 0x4A: Check your I2C address SGS Version 009 - SwitchDoc Labs Program Started at:2019-05-24 12:03:13 ADS1115: Present OLED: Present Sunlight Sensor: Present hdc1000 Sensor: Present Ultrasonic Level Sensor: Present ---------------------- Plant / Sensor Counts ---------------------- Sensor Count: 1 Pump Count: 1 ---------------------- Extender Devices ---------------------- ADS1115_Ext1: Not Present ADS1115_Ext2: Not Present GPIO Extender 1: Not Present GPIO Extender 2: Not Present ---------------------- Future Smart Garden System Expansions ---------------------- SunAirPlus: Not Present Lightning Mode: Not Present Solar Power Mode: Not Present MySQL Logging Mode: Not Present ---------------------- Moisture Sensor: Present ---------------------- ----------------- Scheduled Jobs ----------------- Jobstore default: blinkLED (trigger: interval[0:00:05], next run at: 2019-05-24 12:03:20 PDT) forceWaterPlantCheck (trigger: interval[0:00:08], next run at: 2019-05-24 12:03:23 PDT) updateState (trigger: interval[0:00:10], next run at: 2019-05-24 12:03:25 PDT) statusLEDs (trigger: interval[0:00:15], next run at: 2019-05-24 12:03:30 PDT) checkForAlarms (trigger: interval[0:00:15], next run at: 2019-05-24 12:03:30 PDT) tick (trigger: interval[0:01:00], next run at: 2019-05-24 12:04:15 PDT) checkAndWater (trigger: interval[0:15:00], next run at: 2019-05-24 12:18:15 PDT) ----------------- Tick! The time is: 2019-05-24 12:04:15.164138 Tick! The time is: 2019-05-24 12:05:15.164523 Tick! The time is: 2019-05-24 12:06:15.166416 Tick! The time is: 2019-05-24 12:07:15.166274 ^Cexiting program Pump #1 turned Off done pi@switchdoclabs:~/SDL_Pi_SmartGardenSystem $ Here's a Dropbox Link www.dropbox.com/s/kvae6kcq4wosunh/IMG_1727.PNG?dl=0 to a screenshot of the Blynk. The Blynk info shows plant moisture at 65.3. And here's a Dropbox Link www.dropbox.com/s/3b8hxtydtdhwutt/BlynkSGS.PNG?dl=0 to a screenshot of Blynk when the Moisture Sensor taken out of the soil.The Blynk info shows plant moisture at 5.6. The OLED displayed ALARM DRY Thanks for the quick reply. Look forward to your help. Scott
|
|
|
Post by SDL on May 25, 2019 7:14:31 GMT -8
Thank you for the information.
Looks like the system is working but the pump is not turning on.
Would you plug the USB Pump directly into a USB port and see if it is pumping?
Also, you should see a blue light on the USB PowerControl NE board when the pump is activated. Are you seeing that?
BP
|
|
|
Post by scottaandy on May 25, 2019 12:56:15 GMT -8
This is how the Smart Garden System is preforming now: The Blynk app is able to turn the pump ON for just about a second when the MOISTURE SENSOR reading is above 60. Blynk does the same (ON for 1 second) when the MOISTURE SENSOR is out of the soil and the moisture reading is 6. I would expect it to stay ON until it received a MOISTURE SENSOR reading >= the threshold setting of 60. Here is a video of the OLED with the Moisture Sensor reading 6. Pump and USB PowerControl NE board are good. Its interesting how the OLED scroll sequence pattern of: #OMS FLT!, ALARM!, #OMS FLT!, PLANT DRY, ALARM! does not repeat the same.
Sorry about the video audio — doing the morning dishes while recording. Thanks for your continued help.
|
|
|
Post by SDL on May 28, 2019 10:57:50 GMT -8
OK. Now I get what you are worried about. The pump only turns on for a few seconds every 15 minutes until the threshold reaches 60%. It looks like the system is thinking there is a fault on the moisture detector. Alarm_Moisture_Sensor_Fault = 15.0 is in state.py
If the system thinks the moisture sensor is faulted, it overrides the water command and does not water. That covers a number of sins.
BP
|
|
|
Post by scottaandy on May 29, 2019 15:16:16 GMT -8
Great, thanks for explaining the logic. Took awhile to sink in. Makes sense to turn the pump ON and water a short amount of time (line 219 of SGS.py) wait 15 minutes (line 88 of state.py) — check Moisture sensor and run the pump again if <60. Smart approach to keep from over flooding the surface of the plant while it takes time for the water to soak down into the soil for a proper Capacitive Moisture sensor reading.
|
|
ab
New Member
Posts: 16
Raspberry Pi: Yes
|
Post by ab on Jun 7, 2019 14:51:28 GMT -8
Hi, I have exactly the same problem. I purchased the SD card and followed the instructions. The water calibration worked fine. I also have an alarm PLANT DRY (I purposely bought a poor, neglected, dried up plant that I thought would be good for SGS to nurse back to health). It seems there are a few instances of this problem, so is there a direct way to turn on the board that controls the pump? I didn't test the pump directly yet by connecting it to 5v, but someone else above did and it worked fine. Just waiting for ideas ...
Also, I read the bit above re short turn on time, but the tube seems to be dry, as if no water has been pumped. I will watch it for a while, but can I expect to hear it when it pumps??
Just tested the pump directly with 5v - works fine!
Regards, AB
|
|
ab
New Member
Posts: 16
Raspberry Pi: Yes
|
Post by ab on Jun 8, 2019 3:41:11 GMT -8
Hi, so here I am about 12 hours later and I have determined that it is actually working. I was expecting the pump to start running continuously until my dry plant was saturated, but now I understand that it does this very slowly, turning on briefly every 15 minutes (which is a good approach). There are a few reasons why I thought it wasn't working: -I didn't understand the issue of it responding slowly, with a brief ON time every 15 minutes -The pump is very quiet and there is enough ambient noise here that I could not hear it turn on -When I ran the SGS.py initially, I got this error in the terminal screen, which made me think there was something wrong: [Errno 121] Remote I/O error [Errno 121] Remote I/O error Error accessing 0x49: Check your I2C address Error accessing 0x49: Check your I2C address Error accessing 0x4A: Check your I2C address Error accessing 0x4A: Check your I2C address Is there any way to suppress this confusing message? Also, is there any discussion somewhere about the scalability of this system? We are planning to run a fairly large greenhouse system and this is one of the solutions we are testing for that application.
One other problem I had was that I could not seem to run the testAll.py program, it was not found. Can you please tell me which folder it is in? I did find the testAllSensors.py, so I was at least able to run that.
Tks, AB
|
|
|
Post by SDL on Jun 8, 2019 6:32:04 GMT -8
removing the errors is a reasonable request. If we can't do that (they may be buried in libraries we have no access to) then we will document what they mean (It's part of the device detection sequence).
You can go up to 9 plants at the moment. And actually, that is 9 sensors and and 9 USB controlled devices (could be 5V Valves, etc.). With a little more hardware (an I2C Mux), you can go to 8x4+1 = 33 USB devices. That is the practical limit, although you could go higher I believe with some more thought.
Our problem. The correct program name is: testAllSensors.py
You can turn any pump on for a few seconds by using the Blynk App.
BP
|
|
ab
New Member
Posts: 16
Raspberry Pi: Yes
|
Post by ab on Jun 8, 2019 9:50:19 GMT -8
Hi, ok, good to know on the scalability issue. So with a MUX board we can have 33 USB pumps and 33 soil moisture sensors. And a typical ordinary WiFi router can support approximately 250 Raspberry Pi boards? So about 8,250 separate 'zones', each with its own soil moisture sensor and nutrient pump, per router?
Tks, AB
|
|
|
Post by SDL on Jun 8, 2019 9:53:13 GMT -8
Yes, that is correct. I had not done the multi PI calculation!!!
BP
|
|
ab
New Member
Posts: 16
Raspberry Pi: Yes
|
Post by ab on Jun 8, 2019 10:14:21 GMT -8
and then we can also have multiple routers ... 
|
|
|
Post by Pump Not Executing on Nov 20, 2019 9:20:21 GMT -8
Hi there I'm having the same issue as scottaandy, same i2cdetect posting as well. The pumps are posted as turning on/off both in command line and blynk but it won't actually turn on.
|
|
|
Post by SDL on Nov 20, 2019 14:57:19 GMT -8
Post your "sudo i2cdetect -y 1" result and let's go from there.
BP
|
|