farmee.OS: An All-API-Approach

An All-API-Approach to software development

In this blog post, I’ll try and take you through some of our thoughts on software architecture for farmee.OS. Let’s shed some light!

Our smart farming operating system is split into two parts: hardware interfaces and a cloud portal. Let’s call the latter the brain of the farmee world.

The portal is where logic takes place – it is designed to be a massively scalable web application, consisting of a server part and web based GUI. We use React for the latter and we think the hype is true: it is that good (and fun, too). But since times are changing fast, especially in the web development world, the thing that endures will not necessarily be the GUI technology. Thus, we use our own farmee API to connect the GUI to the brain. This makes it future-proof and a highly flexible:

  • Changing the frontend technology?
  • Developing mobile or desktop apps?
  • Integrating third party services?
  • Some brilliant idea like “You can now control your water cycle with your smart watch”?

Yes, yes, yes and yes! This high level of flexibility is crucial for us, since we don’t know what future farmee-farmers are going to do with farmee.OS, yet.

Growing in units

We group hardware modules into units. A unit defines an area where plants grow – no matter if it is a small garden patch, a huge farming site, or a grow rack aboard a Mars spacecraft. As you can see, those units are massively heterogeneous – in fact the only thing we know is that we do not know them all and probably never will.

Therefore, we develop a standard language for those units to talk to their brain (by the way: we do not necessarily limit this to the farmee.OS-cloud – let’s think a little bigger here).

Coming up with a new language

Let’s flippantly call this an All-API-Approach – we try to be the Ludwik Lejzer Zamenhof of technology farming (yes, we just want to mention that funny name in a blog post). So, this is what we do to create the farmee-Esperanto:

  • Every source of data and every business logic action can be accessed via a nicely documented (Home – Swagger), clearly understandable Application Programming Interface (“REST style” :))
  • We talk JSON (JavaScript Object Notation – Wikipedia) and a lot of our RnD time goes into document structures, which describe the data and processes which appear in the world of technology farming.

All the freaking stuff happening behind this communication layer is rendered irrelevant, for instance:

  • Our hardware modules mostly utilize Python and usually come in all flavors of raspberry
  • We’re Symfony-guys and use it for our cloud software

Oh yes, we can hear you screaming: “Oh no, Raspberry, my kid uses that at school – what about full professional industrial boards?!” and “OMG PHP, is it 1999 again? Why don’t you use GOlang or be really cool and 1970ies and all and use C?!”

The thing is: you can do everything! Our APIs bundle micro and not-so-micro services to be as powerful and flexible as possible (when it comes to software development, “pragmatic” is our favorite word).

At a glance

  • Everything, everything is accessible via the API
  • Hardware modules talk to the API via http
  • The business logic happens in the central unit, this is also where “the soil of all living plants” is located: data, data and – did we forget to mention? – data!
  • While Hardware units aren’t dumb as f*** they are basically the executing part of the system
  • Our system is open: if you meet the standards, you can be a part of it

Diving deeper

  • We develop a Symfony-based API application
  • We use SQL and NoSQL technologies for data storage
  • Hardware units need to have a http client and talk to the application via APIs, beyond that requirement nothing is limited or even based on proprietary technologies
  • At developing stage, we mainly use Raspberry Pis and control them with Python Scripts
  • We use ReactJS for the GUI
  • Yes, we test automatically (PHPUnit, jest) and we do like that whale (Docker)

Join the discussion in the forum!


Thoughts on plant recipes

What exactly does a plant need to grow?

As we started out, we had absolutely no clue, to be honest. So we decided to do what we do best: gather knowledge first and then boil it down so that everybody is able to understand it. We still have a lot to learn, but, together with the help of experts, we figured out a first draft of what a plant recipe might look like.

Lots of data

First and foremost, a plant recipe is a collection of data. It enables any user, be it a human or a piece of software, to identify a given plant and figure out what this plant needs. To make things really simple, the latter mostly indicates the plants needs of water, light and nutrients. But it should also tell you how to correctly treat the plant, where to plant it and what to do if you or the plant gets into trouble.

What can I do with a plant recipe?

There are different use cases we are taking into account while developing the standard for plant recipes:

  1. Offline use
  2. Use in farmee.OS
  3. Import into other software

Offline use

Offline use means printing the recipe on a single sheet of paper. This print only includes the most important information to grow the specific crop, for example in a typical gardening scenario. It will prepare the recipe in a way a human being can read and understand, quick and easy. You could use it to grow the plant at home, in your garden or a raised bed. You will learn when to plant, where to plant and how to treat the plant during the course of its life until harvest.

This is a mockup of a plant recipe offline export:

Use in farmee.OS

This, of course, is the most important use case for us. Imagine setting up a farm in farmee.OS, which means you are telling the software which plants you are planning to grow. In order to do that, you might be dragging tomatoes into a virtual field. The moment you drop the plant into your field, farmee.OS immediately identifies the plant. Of course, it already knows all the different plant recipes, so it can give you a number of useful information based on this action, for example:

  • suggest suitable carrier materials, seeding distance and neighboring plants
  • setup irrigation and light cycle for the virtual field (in consideration of neighboring plants)
  • setup nutrition structure (also in consideration of neigboring plants)
  • adjust pH-value and conductivity of water
  • set or suggest temperature and humidity range

This enables you to successfully grow plants without knowing a lot about them yourself. It truly makes smart farming easy to use for everybody.

This is what the farmee.OS dashboard currently looks like, not exactly futuristic!

Creating a standard

We believe there is an urgent need for a strong basis to enable automated growth in a huge number of different scenarios. This, of course, is a an open standard, that is not only usable in farmee.OS, but any other given soft- or hardware. Our goal is to create this open standard. Anyone can contribute and anyone can download these recipes.

Tolerances

As you might know, hydroponic farming has very tight tolerances. Soil functions as a powerful buffer for water and nutrients. If you take away that buffer, tiny deviations might kill your plants. Therefore, a plant recipe used in a vertical or indoor farming scenario must use data that is far more specific than an offline printout used by a human farmer. Because of this we’ll make sure our data is as specific as possible, with simplification only happening during output for specific use cases, such as offline printouts.

But what about corrupt data? A plant recipe can only be as good as the data someone feeds it. Which leads me to:

Who writes plant recipes?

Anybody can! As we’re developing an open standard, it just needs someone to input data. We’ll provide an entry form and import functionality to enable anyone to contribute to the open recipe database.

Of course, there are lots of obstacles in that process, for example verification of data. Anybody can punch in some numbers, but are these numbers correct for a given crop? We’ll make sure recipes used in farmee.OS are verified by experts to make sure your crop is well-protected, but also plan to offer a bigger number of community-generated recipes you can download and use at your own risk.

Machine learning

Humans make mistakes, that’s why we’re aiming for automated correction of data with the use of machine learning. If farmee.OS can be used to measure plant growth in different farms, it can be used to automatically alter and verify plant recipes. Of course, we’re far from automatic growth monitoring at the moment, but that’s what we’re aiming for.

For you tekkies out there: Data storage and access

Data is stored partly in relational and non relational structures. It is accessed via a REST-style API which communicates in JSON Data format. We use this API in our own software as well as we plan to make it accessible to third party apps.

Due to the structure we provide, the data representation layer of a recipe can be used to create visual representations of the recipe (in Apps, Web-Apps and good old printouts), plus it can be used as a basis for machine-to-machine interfaces.

You might guess what we are aiming for here: automation and auto-optimization.

How does a plant recipe data structure look like?

We’ve posted our current plant recipe data structure in the forum and will use that thread to further discuss anything on plant recipes, so make sure to sign up if you’d like to join and follow that discussion!

Thoughts on plant recipes – in the farmee-forum.


greenYou: The innovative indoor greenhouse

Growing your own food in your garden is nice, but what if you don’t have a garden? German startup greenYou provides you with simple solutions to grow crops in your kitchen. Their products combine function and design in a smart and innovative way. We talked to Erik, managing partner of greenYou.

Q: Hi Erik, what is greenYou?

Erik: greenYou is a young startup, which develops smart indoor gardening solutions. We also see greenYou as a lifestyle brand for people who want to grow their own organic food at home, without compromising on design. This also applies to bars and restaurants that want to offer fresh, organic herbs for their meals and cocktails.

Q: Tell us a little bit about your company: How did you get started?

Erik: Sören and I got to know each other over the internet in 2016. He had started a small indoor greenhouse but could not produce it any longer. I liked the idea and with the help of a Norwegian product design company, that I have strong ties to, we were able to design our own greenhouse: the greenUnit 2.0. We started a rapid development process in May 2016 and had our first prototype in September 2016, at display at a fair. Looking back it was a really crazy timeline, but with a lot of passion and a strong partner we had the finished product in our warehouse in mid-May 2017.

 

“Just wait and let it grow”

 

Q: You have several products in your portfolio. Could you give us an overview?

Erik: Beside different organic seeds from mint to chili we also have the self-watering, smart pots to plant them. The greenPot has a water control function that reminds the user to refill water, so the plants do not faint. In addition to that, the greenPot Plus+ comes with a LED lighting. So you can grow herbs or other plants without direct sunlight. It also can be used as a reading lamp or desk lamp for efficient use of power, thus serving several purposes.

Last but not least, we have our bigger greenUnit 2.0. It contains our newly developed Sunlight LED Technology, and of course also an automatic watering solution.

With this innovative indoor greenhouse we are targeting indoor gardeners, who want to grow their organic herbs and vegetables throughout the year. It is also a great learning aid for schools and kindergartens to grow plants with the children in the classroom. Due to its automatic watering solution and minimal maintenance effort, it also suits very well into offices and reception desks. Another key market is bars and restaurants that want to serve their guests homegrown organic herbs. The mint for a cocktail can be harvested directly in front of the guest. Our feedback is, that customers love it and bar owners improve sales.

 

Q: What do your customers have to do when they want to grow crops with your systems?

Erik: That’s the nice and easy thing with our system: You just have to fill in soil or an alternative substitute, plant the organic seeds (we always deliver our products with seeds) and fill water in the tank. Then just wait and let it grow!

 

Q: You don’t need any fertilizer?

Erik: The fertilizer is in the soil, but of course the plants use it up by time after some replanting. We are working on a cooperation with a company specializing on microorganisms which produce fertilizer in the soil for more than one year – totally organic, no chemicals! We want to offer a solution with microorganisms, if possible within this year if tests go well – it looks promising so far.

 

Q: What makes the greenUnit and the greenPot special compared to similar products?

Erik: During development we have focused on functionality, design and quality. I think that we have set a new standard with the greenUnit 2.0 and the new Sunlight LED Technology. All of our products have a straight and honest design and fit into bars, restaurants, offices and homes with their simple, modern look.

Q: You mentioned your SUNLIGHT LED TECHNOLOGY. What are its effects on plant growth?

Erik: Our goal was to develop an artificial and energy-efficient grow light solution. Having said that, we soon knew that we have to work on a lighting solution which doesn’t require active cooling.
Research and tests showed which color temperature and spectrum has the most impact on the growth of plants. There are many different factors that influence the growing process of plants, but the perfect lighting is among the most important ones.

 

“Homegrown food will always taste best”

 

Q: What have been your biggest technical challenges so far and how did you manage to overcome them?

Erik: There were many challenges during the development process of our new greenUnit 2.0. Starting with the specification and testing of our Sunlight LED Technology to different production methods of the other parts to make them look nice and fit perfectly. Thankfully, there are techniques like 3D printing nowadays, speeding up the development process.

 

Q: How do you think the Indoor Farming market will develop within the next couple of years?

Erik: There are two trends we discovered: One is to go back to organic food and grow your own food at home. With our indoor garden, you can grow crops, sprouts and herbs throughout the whole year inside your own flat. The second trend is to optimize the grow process of plants with the help of artificial light and computer-aided watering and nutrition supply.

Q: And where will greenYou be in 10 years? What is your vision?

Erik: Ten years is a very long time. It’s difficult to predict the future of indoor gardening, but I think we will have to be creative and efficient to feed all humans on the planet in future. As the horizontal space is limited, vertical gardens are getting more attention. There could be a big positive climate effect in the cities if house facades would be used to grow plants. The air would be cleansed by the plants and if we would grow food in the cities we wouldn’t need all the trucks driving to the stores to supply them with vegetables and fruits.

Industry 4.0 is affecting all areas of our life. With the help of sensors and big data we try to optimize every process around us. People even try to optimize themselves with smart tracking devices and apps where nutrition and sport is tracked. In ten years every single ingredient of a menu in a restaurant will be traceable back to all the suppliers and all the nutritions in it will be available with a simple photo, taken by the mobile phone or NFC like technology in the food.

But food growing and production will always be relevant, midst in a world of digitalization and technology – and homegrown food will always taste best!

 

Wanna know more? greenYou will appear in a TV feature on German station NDR on Friday Sept 22 at 8:15 PM CEST.

All pictures (c) by greenYou


LIVE AT STUTTGART - The place we grow our company and crops

As you might know from our very first blog post, farmee has modest goals like reinventing urban food production and solving the future food crisis. We will do so by simplifying smart farming, effectively building an accessible open software and hardware platform to manage and control your farm and crops.

As an early stage startup, we still have to figure out a lot to achieve our goals. And we know, of course, that we have a long way to go. What is already set though, is where we will be while figuring things out. And we’re always open for visitors, in case you’re interested what we’re doing around here.

Growing, together

The old factory building of Leitz, a famous german office supplies company, is located in Stuttgart-Feuerbach. It is currently a huge construction site, since production moved away some years ago. Today, the old building is set to become one of Europe’s biggest Innovation Campuses.

On 36,000 square meters, our friends at LIVE AT WORK are developing their vision of the future of work: shared offices, startup and company spaces, a machine park and a maker’s market place, fitness club, a restaurant, bistros as well as a rooftop terrace to meet, work and enjoy everything LIVE AT STUTTGART – the projects name – has to offer.

A project of this magnitude isn’t done over night and we are more than grateful that farmee is a part of this story from the very beginning, peacefully co-existing on the construction site. While the construction workers are busy getting the other areas ready for new tenants, we have found our base on the seventh floor, together with the corporate startup platform Pioniergeist, their residential startup teams and the startup studio hatchery.

Isn’t that the perfect surrounding to invent the future of farming?

 

Photo by LIVE AT STUTTGART

 

Why is farmee and LIVE AT STUTTGART such a good fit?

A cornerstone of the LIVE AT STUTTGART concept is the close proximity of all tenants on campus and the synergetic opportunities generated, when working together and repeatedly meeting in the community areas.

A basic idea is to create value cycles within the campus, where startups, corporates and artists not only become co-workers, but also inspiring customers or partners in crime.

With farmee, we want to be the first startup to fully embrace this spirit by not only working at the premises, but also becoming a supplier for the campuses restaurant. We already have two prototype racks here, which are currently our base for development purposes, but we’ll make that lab a permanent institution – and always open for anyone interested. Last but not least, we’ll try to install a fancy showroom on-site, suitable for educational purposes and events of any kind.

Today, as you can see in the image below, our base is a bit less glittery, but has all the magic of a fresh start in an inspiring environment!

Hard at work in the farmee office.

To sum it up:

  1. You can visit us anytime, just give us a shout beforehand, so we can safely guide you through the construction site
  2. If you do so, you can see two working prototype racks in our lab as well as witness the birth of our operating system farmee.OS
  3. We have great plans for farmee and LIVE AT STUTTGART, e.g. using the community area to create a showroom and other knowledge touch points to get the idea of open smart farming out there
  4. We’re planning a cooperation with the on-site restauraunt to produce and deliver food that is truly homegrown..

Join us in the forum and tell us your ideas about this place!