floriponics.com header image 2

Greenhouse connected to the internet

May 18th, 2015 · No Comments

Update 5-16-16.

We sold our house and the greenhouse.  The Raspberry Pi went with the sale.  :(

We call the new greenhouse “Floriponics 2.0″    it is smaller and we are learning how to work around the other differences.   I want to get the temperature monitoring working and I didn’t want to wait for the new Rasberry Pi to get here…  So I’m doing some experiments with an old PC.   I have the sensors reporting but haven’t figured out how to (safely) push the data to the internet.


After about 10 years of researching and collecting, the Floriponics greenhouse is (was) connected to the internet.

Everything is (was) running on the Raspberry Pi

Temperature sensors can (could) be seen at https://personal.xively.com/feeds/1128311125

We tried the webcam, but it filled up the SD card and crashed the Pi.  And my wife didn’t want to be spied on.

Those simple pages required about 3 weekends of work.  Some of it was fun.

The temperature sensors are Dallas 1-wire DS18B20 connected to GPIO pin 4 on the Raspberry Pi similarly to http://projects.privateeyepi.com/home/temperature-sensor-project-using-ds18b20 .


I used PrivateEyePi’s scripts for the temperature sensors but didn’t like the 5 minute update limitation — so I set up the Xively account.  The I2C port only supports 1-wire by “bitbanging” using the w1-gpio and w1-therm packages.  Apparently it is not as robust as the USB, serial, Ethernet, and chip-based solutions, but it is working fine for what I’m doing.  I used Cat5 cable with the orange pair  as the data  — brown to pin 1 (3.3V power), orange to ground, and white/orange connected to GPIO4.  The sensors submerged in water are simply a sensor slipped into a section of drinking straw and filled with silicone seal.  ( I used Silicone 1 but Silicone II would have worked just as well — Silicone 1 — smells like vinegar, and Silicone 2 doesn’t — both are nearly inert when cured).  The waterproof sensors, I connected the green pair in parallel with the orange pair so the data can be daisy chained  and not a star configuration.    (Signal comes in on orange pair and goes on to the next sensor on the green pair.)

Anyway, I tried to get owfs working but it is not compatible (at least not easily) with the w1-gpio required to use pin 4 of the Raspberry Pi.  I tried several workarounds and realized that the w1-gpio file system did most of what I wanted (for the short term, anyway).  I found a python script that pushed a single temperature to Xively and got it working.  But I had trouble getting more than one sensor to report.  The multi-sensor scripts I found on the net had outdated api data pointing to pachube or cosm.   After much trial and error (and learning a fair amound of python in the process) I got all my sensors reporting to xively.    I didn’t want to type the 16 digit serial for each and every sensor so I let the software organize them from smallest to largest.  The potential problem with that is that if (and when) a sensor gets added or subtracted, it messes up the names of the channels in xively.  Eventually, when the sensors are used as inputs for controlling vents and heaters, it will be important to address each sensor directly so there is no ambiguity.    With only 7 sensors, it is not a big issue yet.

I thought the Raspberry Pi camera module would be fairly easy  to get working — unfortunately, I opted to install “motion” which does not support the Raspberry Pi module natively — it apparently was designed around USB webcams.  After some searching, I found “motion-mmal” which allowed me to use the camera.  Unfortunately, by this time, I was logging into the raspberry pi through SSH with putty.exe on my windows box.  There is no easy way to view jpg’s or videos via SSH.  And the Raspberry Pi is very slow.  If the parameters are not perfect for the camera, “motion” times out.  I found out that I have to stop motion, edit the motion.conf file, and then restart motion for any changes to take effect (better than rebooting).  And the streaming video doesn’t work on Chrome or Internet Explorer.  Safari can view the camera but needs to be refreshed.  VLC seems to work the best so far.

I still want to get the dynamic DNS updater working and figure out a way to stream the webcam data in a format that IE and Chrome can tolerate.





Tags: Uncategorized

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment