Setup hydroMazing Smart Garden System

cropped-hydromazing_smart_garden_system

Setup and Use hydroMazing

  • The Controller ( Arduino Nano ) uses 433MHz Transmitter to send codes to remote-controlled AC Outlets or can connect directly via a transistor, MOSFET, or relay.
  • Web Services Module ( Raspberry Pi ).
    • Optional Web-Camera ( USB Web-Camera ).
  • Optional  ( connect directly via a transistor, MOSFET, or relay.  Supports additional sensors: E.C., pH, Light Intensity, more floats and flow-rate sensors.

I liked the simple inventory management system application so much, I borrowed its web interface to improve hydroMazing:

hydroMazing snapshot

What are the steps needed to use hydroMazing?

  • Connect the Raspberry Pi to your local router using an Ethernet cable.
  • Plug in the hydroMazing Controller unit’s USB to the Raspberry Pi.
  • Optionally, plug in the USB webcam.
  • Power the Raspberry Pi.
  • Use a Power Squid ( Multiple Plugs ) to attach the Remote Controlled AC Outlet Modules to their corresponding appliance assignment according to the hydroMazing Smart Garden System’s settings.

Plug-in appliances to their corresponding remote controlled AC switch units.  Most growing environments can be configured as follows:

  1. Light
  2. Intake Ventilation Fan
  3. Exhaust Ventilation Fan
  4. Humidifier / Heater / Additional Lighting
  5. Pump(s)

Also see Controlling Appliances.

How to Access the Web Interface:

  • Use a wormhole service such as Dataplicity.io
  • Or, Discover the IP address that your router has assigned to the Raspberry Pi, running hydroMazing Services.
  • Or, use a DDNS service to update the dynamic address assigned to your router and directly access the web interface

 

  • Login to the web interface using the admin credentials provided.  Example URL of web interface http//[your-device].dataplicity.io/hydroMazing/
  • Click ~ Settings → Automatic Timezone → Update
  • Click ~ Settings → Email Notifications → [ enter your email address ] → Save
  • If your growing environment is not within an Ethernet cable distance away from the router then you will need to configure the WiFi.
  • Click ~ WiFi Settings → SSID → [ enter your router’s SSID ]

Passkey → [ enter your router’s WiFi password ] → Save

 

hydroMazing chart

 

More About Electronics:

More About hydroMazing:

More About Indoor Gardening:

 

 

Configure Your Own Internet Router

Hook Up Your Raspberry Pi

Connecting all your devices to the Raspberry Pi is very easy, but you want to do it in a specific order so it can recognize all your devices when it boots up. First, connect your HDMI cable to your Raspberry Pi and your monitor, then connect your USB devices. If you’re using an Ethernet cable to connect to your router, go ahead and connect that as well.  Finally, once everything is connected, go ahead and plug in your power adapter. The Raspberry Pi does not have a power switch, so once you connect the power adapter, it’ll turn on all by itself.

Connect to Your Wi-Fi Network

Connecting to your Wi-Fi network works the same in Raspbian as it does it any modern operating system.

  • Click the network icon (it’s the one with two computers) in the top right corner.
  • Select your Wi-Fi network name, and enter your password.

That’s it, you’re now connected to Wi-Fi. This will work in both the command line and in the graphical interface, so you only need to set it once. If you have an older Pi and you’re using a Wi-Fi adapter like this, the process is the same.

You have several devices connected to your WiFi router, so how can you tell the outside where you are serving-up Raspberry Pi?

Getting Online

The following section assumes you have an updated and upgraded Raspberry Pi 3 or equivalent, and installed L.A.M.P. (Linux.Apache.MySQL.PHP.)  Excellent article for getting started and RaspberryPi.org’s installing LAMP.

You have several devices connected to your WiFi router, so how can you tell the outside where you are serving-up Raspberry Pi?

Use a service like dataplicity OR DIY:  Let’s get familiar with our router’s advanced settings in your router manufacturer’s configuration tool.  Most home networks use one of these common IP addresses for their gateway to the Internet:

place-wifi-router

You will need to login to your router’s configuration tool.  The username and password should have been assigned at the time of setup.  First, we need to reserve an IP address for our Raspberry Pi to use on a regular basis.  Typically, the router will have a DHCP (Dynamic Host Configuration Protocol) Settings section, List and Bindings, etc.  The Raspberry Pi and all other devices on your LAN should be listed here.  Hopefully, your router will have a somewhat intuitive interface that will make sense as to how to assign an IP address to a device or MAC address.  If all else fails, consult your manufacturer’s instructions.

decapi-slider-raspberry-pi-casenetwork-782707_1280-980x637

The default port for web requests is 80.  You can leave the default unless your Internet Service Provider doesn’t allow port 80.  Next step in your router’s configuration is to have the router forward all incoming requests on port 80 to the Raspberry Pi.  Typically referred to as, Port Forwarding or Port Range Forwarding.  You will want to associate the Raspberry Pi’s IP address so that it will receive all incoming requests on port 80 or whatever port you find most appropriate.  (The most secure web server is one that is not connected to the Internet 😉  The default port for SSL is port 443.  Next step in your router’s configuration is to have the router forward all incoming requests on port 443 to the Raspberry Pi.  Motion Web-Cam Streaming:  The default port for motion is port 8081.  Next step in your router’s configuration is to have the router forward all incoming requests on port 8081 to the Raspberry Pi.

You could also allow Telnet, FTP, SSH, VNC, etc but I do not recommend unless you are familiar with the security risks associated with such services.

Get Yourself A Domain Name

http://www.YOUR_CUSTOM_DOMAIN.ddns.net

Check for the DDNS ( Dynamic Domain Name Service ) Setting in your Router’s advanced configuration settings.  Most routers will support one or more of the following, http://www.dyn.comhttp://www.noip.com, many others search Google for “Dynamic DNS”.  The service will offer the ability to register a domain name to associate with the Dynamic IP address that is assigned to you by your Internet Service Provider.  Typically, your router or a software plugin that you download and install will update the Dynamic DNS service’s database when your assigned IP address changes.

Secure Socket Layer

https://letsencrypt.org/

Let’s Encrypt our connection with the Raspberry Pi.

Install

Rather than apt-get Cerbot, I download the latest version directly from its repo:

sudo git clone https://github.com/certbot/certbot /etc/letsencrypt

Easy SSL through Automation

Certbot has a fairly solid beta-quality Apache plugin, which is supported on many platforms, and automates both obtaining and installing certs:

sudo /etc/letsencrypt/certbot-auto

 

Your domain name for your hydroMazing should now be secure.

Wired or Wireless?

Electricity replaces the sun, wind, and some natural processes as the dependency for plants to grow indoors.  

Starting a Smart Indoor Garden

The first glaring problem with the typical indoor garden is that extension wires are annoying and a potential safety hazard.  On the other hand, wireless communications can lack the reliability of the wired variant.  Going further, should the system be available to the local network or should it be connected to the Internet?

Since plants do not need Internet access in order to grow then we are potentially creating an additional dependency that the plant doesn’t want. The Internet is useful for providing access to your system, but security is questionable, how much control or data should be available?  A connection to the Internet can become another dependency if the system cannot operate without communication to a cloud-based or otherwise remote server. If something can fail; we should plan for the eventual occurrence of that possibility as best as possible. If a long electrical outage were to occur it would be prudent to have a backup generator, or solar rechargeable battery storage system.  If we can have better reliability with a wired connection, then it makes sense to use a combination of wired and wireless.

Next:  Getting Wired and Wireless

Communication options such as i2c, which is great for communicating with another microcontroller or Raspberry Pi and the many wireless options: WiFi, bluetooth, etc.

  • Remote Control using a RF 315MHz / 433MHz
  • Lightweight Bluetooth ( nRF24L01 )
  • Bluetooth ( HC-05 )
  • WiFi Module ( ESP8266 / CC3000 ) etc.

More Info:

Please share with friends and follow to receive a notification when I publish a new article.

 

Power to the People!

We believe you shouldn’t need expensive gadgets and technical expertise to be a successful gardener. We are committed to a greener planet!

A handy IndoorGardeningChecklist – print yourself a copy!


Image Credits: Power to the People, Patrick Nygren 2014.
Creative Commons Commercial Use License.