$300 Food Computer - MVP


#125

Thank you @Webb.Peter

I have not managed to get everything up and running. From a clean set-up I installed the buildScript.sh. Crontab seemed to work fine, I did have to initiate CouchDB manually (releaseScript_DB.sh) but then had it working on localhost:5984. I did not manage to have my own data shown on localhost:8000 or through the index.html. I have attempted to reboot but this just causes problems to CouchDB and I am required to re-run the releaseScript_DB.sh (no access to localhost:5984/_utils after reboot). My sensors and webcam work. Do you have any suggestions?


#126

You should only need to run ReleaseScript_DB.sh once, it compiles and builds the database. If it is not up and running, they you need to start it, not rebuild it. It should start on a reboot. If not, you can use /home/pi/MPV/scripts/startCouchDB.sh (which should be called by the startup file rc.local).
What problems are you getting with CouchDB when you reboot?


#127

Upon each reboot I have to re-run ReleaseScript_DB.sh i.e. when I reboot and type localhost:5984 in the browser, the page cannot be reached. I can manually run the ReleaseScript_DB.sh, which then allows me to access localhost:5984/_utils. The server localhost:8000 is accessible but with foreign data. Running startCouchDB.sh does not seem to solve the problem.


#128

I don’t have enough details to be able to help you.
Why do you say you have to re-run ReleaseScript_DB.sh? What indicators are there that it will not start up again?
Typing localhost:5984 will display a message if CouchDB is up, not data or the interface - what are you seeing (screenshot?)
The data in the browser is some test data to show that things are working. Until you have run for a while and generated your own data, you won’t see anything different.


#129

Have you tried clearing your browser history? I know this sounds ridiculous, but this happens to me all the time with “Chromium” on Raspberry Pi where the dashboard won’t refresh. Maybe I’m wrong, @drewthomas89 any suggestions?

We’re up and running from start now, the software guide will be up by this weekend.


#130

I have removed MVP and CouchDB and re run the buildScript.sh. After the buildScript.sh has run I get these images in the browser:

After a reboot I get this:

I keep getting these errors:

12/16/17 13:33:54 Finished building CouchDB - now running

Install Libraries and Local changes

sh: 0: getcwd() failed: No such file or directory

12/12/17 22:44:34 Run permissions set
sh: 0: getcwd() failed: No such file or directory

Install CouchDB

sh: 0: getcwd() failed: No such file or directory

Installing CouchDB

12/14/17 16:37:30 Run permissions set
sh: 0: getcwd() failed: No such file or directory

What Stretch version are you running on?


#131

Several issues going on here, I am not sure what release you are working with, as several things don’t exactly make sense.

  1. The chart you are showing is my custom multi-temperature chart, and not the one that is suppose to be with the release (it should have only one temperature reading). The index.html in Git shows the single temperature chart is being called, I am not sure where you got that code.
  2. Did you run all of the scripts? If you are re-booting and not getting things running, I am suspicious that couchInit.sh and BuildScript_Final.sh did not get run (and possibly BuildScript_Local.sh). couchInit.sh creates the databases in couchDB, and none are showing in your Futon view.

Thanks for posting the images, as it helps to clarify the issues.


#132

Thank you for your reply, it is much appreciated.

Yes I see the problem with Futon view. I have run everything again on a clean setup (NOOBS Stretch 2.4.5). I created a new file buildScript.sh and pasted the code from https://github.com/webbhm/OpenAg-MVP-II. After the install, there was no data on localhost:5984 so I proceeded with the following:
/home/pi/MVP/setup/releaseScript_DB.sh
##the localhost:5984/_utils contained databases, localhost:8000 not running ##
/home/pi/MVP/setup/releaseScript_Test.sh
/home/pi/MVP/setup/releaseScript_Final.sh

After a reboot there is no data on localhost:5984 or localhost:8000 and the web index.html shows foreign data (e.g. multi-temperature chart)

Are these steps consistent with the intended setup?

If I run theses scripts:

/home/pi/MVP/scripts/startCouchDB.sh
/home/pi/MVP/scripts/startServer.sh

I can access localhost:5984/_utils (with databases) and localhost:8000 (with foreign data and multi-temp chart)


#133

I think you are still not getting all the pieces, but not sure why. The scripts in Git should all have been run; buildScript.sh calls releaseScript.sh, and looking at the code in Git, it calls all the others.
If you see MVP_Sensor_Data, _replication and _users your database should be good; if not, run:
/home/pi/MVP/setup/CouchInit.sh
Also, try running:
/home/pi/MVP/setup/releaseScript_Local.sh

If releaseScript_Test.sh ran with no errors, it should have rebuilt the charts and given you something other than the placeholder that was in Git.


#134

I have run the releaseScript_Local.sh and tested. I am still missing the charts with my own data on localhost:8000 and index.html. My data does seem to be logging to CouchDB (database mvp_sensor_data)

System PASSED on the releaseScript_Test.sh with no errors

Upon reboot, CouchDB seems to be down (no access on localhost:5984) as well as Server localhost:8000


#135

Run/rerun /home/pi/MVP/setup/buildScript_Final.sh (no harm done by re-running it). It should modify /etc/rc.local. The output should say it has already modified the file, else it will make the changes. You may then want to go to a command line and type:
sudo leafpd /etc/rc.local
Look at the file, the next to the last line (before exit 0) should be a call to /home/pi/MVP/scripts/startup.sh - this is what starts the web server and CouchDB when the Raspberry starts.
The charts don’t clear old data, they just append with new. It will take a day to see much change, the temperature chart covers a bit over 24 hours.


#136

Thank you. I believe that I am experiencing difficulties with the /etc/rc.local. Although the script includes the line /home/pi/MVP/scripts/startup.sh it does not seem to start the server and CouchDB properly after a reboot. I can manually run startup.sh, which then starts both the Server and CouchDB. I played around with adding sleep time to the script but this did not seem help. Any suggestions? I will wait for enough data collection, in order to see if the charts are built.


#137

Not sure what to say. If rc.local is not working, I am not sure of which direction to go.
You might check the log files (in /home/pi/MVP/logs) and see if there is anything there that gives any indication of errors.
I need to look into this some more.


#138

I am troubleshooting over at @drewthomas89’s right now on his MVP. We are running into the same problem @DanB and I’m going to have a call with @webbhm to try and resolve this and will get you the fix by tomorrow. I’ll get back with you ASAP.


#139

@DanB @Webb.Peter @webbhm

I’m linking a build guide I’ve made for the current software version. Starting from an empty SD card and following these instructions I was successful; Please let me know if you run into any problems or if any of the instructions are unclear.


#140

Have you looked into using beneficial microbes to help with microbial antagonism? I noticed in the strawberry thread that other guy is “flushing” his strawberry water every few days. I know little in the area of hydroponics / aeroponics , but even my experience with growing random plants in jars of water seemed like they needed the water changed frequently to do well. I just assumed that this was because the water got “stale” mostly from being a anaerobic environment where bacteria could grow but also that the plant roots were dying from lack of CO2 / Oxygen. I suspected that adding a pump with a aerostone or whatever they are called might fix this, but i never got around to trying it. I just bought some [airstones] though the other day.

I’ve seen airstones used in lots of DIY window growing and diy algae bioreactors.

Check out this PDF i copied from Maximum Yield Magazine, May 2016, page 86.
output.pdf (469.3 KB)


#141

@BioLumo I could talk about this for hours!

What you are referring to is the lack of oxygen in the root zone, we measure this as Dissolved Oxygen (DO), which is directly related to the temperature in the root zone as well. Warmer temperatures = lower DO saturation point. There’s all sorts of cutting edge techniques to increasing oxygen (nanobubbles, high-pressure aeroponics, liquid ozone, etc) but I prefer to just lower the root zone temperature if possible.

“Temperature controls the rate of plant growth. Generally, as temperatures increase, chemical
processes proceed at faster rates. Most chemical processes in plants are regulated by enzymes
which, in turn, perform at their best within narrow temperature ranges. Above and below these
temperature ranges, enzyme activity starts to deteriorate and as a result chemical processes slow
down or are stopped. At this point, plants are stressed, growth is reduced, and, eventually, the
plant may die. The temperature of the plant environment should be kept at optimum levels for
fast and successful maturation. Both the air and the nutrient solution temperature must be
monitored and controlled. A chiller must be purchased to maintain the water temperature at a
sufficiently cool level. Water temperature should be maintained at 50-68 F (15-20 C).
Temperature control of the nutrient solution is critical to controlling the pathogen population so
that the entire crop is not lost to disease”

http://www.cornellcea.com/attachments/Cornell%20CEA%20baby%20spinach%20handbook.pdf


#142

@Webb.Peter, cool. Are you saying just controlling temperature alone can create a specific amount of DO in the water? I find that hard to believe that controlling temperature just on its own would have such a dramatic effect, but i acknowledge my ignorance in this area. Though i can see it helping.

So it sounds like you indeed are controlling root temperature (water) separate from air temp. That’s good. I had read awhile back that most plants prefer their roots to be slightly cooler than their leaves. Sounds like you are keeping the roots at 20 C while your leaves are at about room temp (22-23 C). Most human pathogenic microorganisms grow at 37C (body temp), but this is not true for all and i would think certainly not true for many plant pathogens.

Controlling temp will help with many, but i imagine many others are adapted to cooler temps and will thrive in those temps quite well (i.e. 20 C), so i think investigating other pathogen reduction techniques to be worth the effort. Hence my mentioning of Microbial Antagonism. This is a technique that works well in humans, so why not in plants. Besides i know in soil plants often grow better when grown in non-sterile non-mono environments like with beneficial fungi as the fungal networks help plants gain more nutrients. Paul Stamets work also mentions crazy cool interesting things like how fungal networks can transmit pathogen data to other plants. For example when one tree is attacked by a certain bug the fungal networks can transmit that data over miles away and the other plants that have not been attacked show a response to the bug attack by emitting certain stress chemicals. But this is in soil, not water. Still cool though.

Though not pathogenic, a good example of this adaption to different temperatures can be seen in domesticated strains of Oyster Mushrooms. The white ones grow at 55–75 °F. The blue ones grow at 45–65 °F. . And the pink ones grow at 70–85 °F.

EDIT: i forgot to add that with aeroponic piezo-based misters that if you leave them on all the time they heat up the water quite a bit from all the vibration going on. So i imagine controlling water/root temps with those could be quite the challenge.


#143

I’m weak on the pathogen area, but I do know there is a correlation between temperature and DO. I have yet to experiment with how well air stones completely saturate water, and where exactly the line is drawn.

image (16)

This is a good thread on the topic, also Caleb drops some knowledge that’s relevant:

If you’re looking into piezo’s you should read up on the discussions about fogponics on these forums:

@BioLumo Edit: if nothing else just read this:


#144

Hi @Webb.Peter, I am about to order from the BOM based on your 12/17 updates. Having read through this entire thread when I have found time over the last month, I noticed that you had asked if someone could create an amazon shopping list for “one click” shopping. Do you know if anyone has done this yet? I can try to make the shopping process even more seamless (you guys have done a great job already!) for the next person if there isn’t already a ready-made list. Looking forward to getting started with my wife!