3 minute read

octogreen - a lua esp8266 window farming system

How to build a window farming system and how to monitor it with lua. This is just a small project that I am doing for myself in order to get in touch with LUA and the esp8266 chip.

ESP8266 monitoring my plants

The idea

I was always fascinated by those hydroponic window farms. Growing plants inside the city using the environment around you. In my case that’s three windows, no balcony, no garden.

So I went to the do-it-yourself store and bought a basic kit of materials that I might need in order to build this project. Adding a nodemcu based on the famous esp8266 added some more possibilites to monitor my plants.

The product

This small experiment should lead into some sort of a product that is easy to assemble, easy to use and easy to run. I want to build a product - something that thrills me.

It will be a longer journey, right now everything is wired, sensors are working and send data to a REST style API. That’s a start and I will continue to add more things to this project - maybe an enclosure will be a good idea.

Prototype supported by duct tape

The bill of materials (BOM)

In order to build this a few materials that you probably don’t have already are needed. Here is a list of the stuff that I used.

Building material

Most of the materials can be found almost anywhere. Check diy-stores, the junkyard or your garage. The tubes, adapters and the air pump can be found in an aquarium store, a diy store.

  • 4 empty PET bottles (I used 1.5 litres and they are fine
  • 7 metres silicone tube (use green for octogreen) 46 mm
  • 1 Y adapter 46 mm
  • 5 metres string (Paracord works well)
  • 2 one-way valves
  • 1 air pump (I used an EHEIM air pump 100)
  • 1 roll of duct tape (EVERY cool project needs duct tape)
  • 1 timer socket with at least 3 programmable times

Gardening parts

You need some hydroponic parts for your window garden to make this whole thing work. For the German/Austrian readers: You might think of the product Seramis for this project - this will not work! Seramis stores the water and stays wet, as we are building a hydroponic agriculture we can’t use it. Hydroton only stores very little water and the roots won’t start to rot.

  • foamed clay / hydroton
  • Net pot / hydroponic pot
  • Fertilizer for hydoponics
  • Some seeds (I used mint, basil)


I used a Swiss Army knife to build my prototype and that worked reasonably well to cut the PET bottles with the scissor that’s in the knife. However, next time I would prefer using a hole puncher - you can also melt the holes inside the bottles with a hot nail. However, this might release some posionous smoke, therefore I would avoid it.

IT equipment

The NodeMCU based on the ESP8266 is a wonderful development board for this project. I used it with a small breadboard and connected all the wires, sensors to it.

  • 1 NodeMCU ESP8266
  • 1 TSL2561 Light sensor
  • 1 DHT 1122 Temperature/Humidity sensor
  • 1 DS18B20 waterproof sensor
  • 1 126x64 OLED i2c Display (SSD1306)

Please note the professional fixing

Why does this work?

With this window farming system we are building a hydroponic agriculture. The plants which are growing up in this environment start to build different roots compared to the plants that are planted in soil.As the plant can’t get the nutrients from the soil, they are pulling them out of the water. Therefore it’s required to add a tiny little amount of fertilizer to the water.

The timer makes sure that the pump will run at least sometimes a day to bring new water to the plants. Right now I am running mine 3 times a day for about 10 minutes.

comments powered by Disqus