An Urbanfarming bot that you can chat with. Make fresh, organic produces for your family, right at your home. Let plantybot take care of maintaining your farm.
Groot, Gaurdian of the Galaxy (No image copyright)
Many of us citybred have busy lives and farming may sound like a happy dream to us, but a low priority activity to venture into.
What if we can make healthy produces at home, while putting in minimal time into our farm? This is where plantybot comes in.
Plantybot is an Internet of things(IoT) solution for in-house farming. The farm is designed as stacks of horizontal planes where green vegetables can be planted. Equipped with sensors, it is self/minimal maintenance. You can talk to plantybot through FB messenger and get notified anytime about the status of your farm. You can even change the parameters like lighting, irrigation, etc.
An interesting way to make the farm self sustainable is to make it an aquaponics ecosystem.
Aquaponics is a farming technique which combines raising fishes in freshwater (aquaculture) and soil-less farming (hydroponics), making them a self sustaining ecosystem.
Take a look at this video to get more understanding of aquaponics.
Open Source Aquaponic Greenhouse from Open Source Ecology on Vimeo.
A basic setup
Basic workflow
The water from the fish tank is rich with nutrients from the fish excretions.
We have a pebble farmbed with our plantation.
This water needs to be pumped into the farm beds periodically, and is drained back into the fish tank.
This keeps the water pure, oxygenated for the fishes and inturn provides nutrients for the plants.
IoT workflow
The main blocks to the implementation are:
1. The farming setup (Physical Mechanism)
2. The sensors and hardware setup (Electronics)
3. REST API (Web Service)
4. Chatbot NLP engine (Artificial Intelligence)
5. A chat client (FB Messenger)
These blocks are connected in such a way that a user could maintain their farm by interacting with an AI chatbot, getting status updates of the farm and requesting changes to farm parameters.
Farmbed setup Aquaponics farming setup would contain:
1. Adding artificial lights (LED strips)
2. Sensors drive the system.
Temperature, pH, water level,
lighting on the irrigation bed etc are monitored
3. Based on the sensing info,
actuators irrigate the bed,
or the fishes are fed
4. The information collected are periodically
updated to a server through a Web-API
5. A chatbot service (messenger based) is connected
to this API and it is used to notify the user
about the health and productivity of your farm
6. Other notifications like when the
fish food storage has to be refilled,
health of fish tank,
emergency alerts etc are also sent
How to make a messenger bot?
We are making a messenger bot, a bot user with whom we can chat with from messenger.
High level steps
References:
One of the basic concept of making a chatbot into a AI chatbot, is making the bot understand user
intent.
For example when the user starts a conversation with the bot by saying "Hi", the bot should understand that the intent is greeting
and create a response like "Hey there {username}". Some common intents that make our bot sound human:
1. greeting (e.g. user says "Good Morning")
2. help (e.g. user says "Can you help me?")
3. status (e.g. user says "how's it going?",
"how are things in my farm?" etc)
4. customercare (e.g. user says
"Can I talk to some support?")
5. name (e.g. user asks plantybot
for its name "what's your name?")
6. location (e.g. user asks plantybot
"Where do you live?")
There are many web services which serve as the bots AI engine. For example https://wit.ai is facebooks Chatbot AI engine, that is free even for commercial use. Other options are API.AI (Googles'), Lex (Amazons), IBM Watson, LUIS (microsofts).
We are going with API.Ai for its scalability and intutive interface.
We intend to develop a ROS based solution on Raspberry Pi for automating the desired, intended aquaponics system on our PlantyBot. The higher level architecture of the system is depicted in the following diagram.
The state information of the system as read by relevant sensors equipped in the system is passed onto a Reasoner. The Reasoner periodically runs algorithms to take decisions on irrigation routines with the collected data. The Reasoner then connects to a Chatbot Application over the web. The Chatbot communicates directly with the User, thereby giving the status of the farm, taking instructions from the user and regularly initiating processes to perform health checkups on the system. The Reasoner along with the Chatbot application forms the core A.I. of the system. The A.I. is backed up by the sensor suite and the actuation system directly controlled through the Raspberry Pi microcomputer. This A.I. based control system represents the overall architecture of the PlantyBot.
On Raspberry pi side, we have four main parts:
Raspberry Pi, has to collect data, use the Wifi module to connect to the Webhooks and update them regularly (say once every 10mins)
We are using:
References and product links:
RPi, has to collect data, use the Wifi module to connect to the WebHooks of the plantybot webservice and update them regularly (say once every 10mins)
If unsupervised by the user, the bot should be able to take care of the farming bed with good defaults. So it should be able to irrigate the farm periodically and feed the fish in appropriate intervals. The user should however be given control over changing the frequency of irrigation/amt of water supplied, force feed fishes too
Python Flask is a great microwebframework that makes it easy to implement webhooks and a RESTful web API
The webhooks are used by the hardware for updating the server with its observations (like temp, humidity etc).
The Web API is used by the Chatbot service to interact with the database and fetch latest information about someone's farm
AWS is used for hosting.
We can use AWS Lambda which is a serverless architecture for hosting the flask app. Ref: https://github.com/Miserlou/flask-zappa
AWS RDS can be used to host a POSTGRE-SQL database, which works easily with flask. (We need to design the database tables and figure what are the information we will be saving on to it)
We need to create and train intents in API.AI (or LEX) for each of the intents we come up with. Then we need to connect that to the flask app.
A tutorial on Wit.ai
This is a prototype to the product we have envisioned. We will be adding more features in the future. Some of the features in our minds are adding DNA BioChips for detecting plant diseases and profile of nutrients it absorbs. We will also be implementing analytics to our software architecture to figure out, for example, which plants grow best in a particular geolocation, etc.
Also for any updates create an issue here.
Check out our organization page on Github: https://github.com/plantybot/
<div class="fb-customerchat" page_id="945132208957908" minimized="true">