Software apps and online services
This Smart Greenhouse was demoed at Re:Invent 2015. Here is a time-lapse video of the actual greenhouse getting built on the Re:Invent floor.
Smart Greenhouse is a self regulating, micro-climate controlled environment for optimal plant growth. Climatic conditions inside the greenhouse, such as, temperature, humidity, luminosity, soil moisture are continuously monitored. Small variations in these climatic conditions trigger automated actions. The automated actions evaluate change and take corrective action thus maintaining optimal conditions for plant growth.
Smart Greenhouse is a greenhouse with sensors and actuators. The sensors and actuators are connected to Intel Edison based micro controller. The micro controller send data and receive commands from a control center hosted in AWS cloud. Users can interact with Smart Greenhouse through a dashboard or a tablet application. Users can also issue voice commands to the greenhouse.
Architecture of Smart Greenhouse can be broken down into three major components
- Connected greenhouse with Sensors and Actuators
- Control Center
- User Interaction devices
Lets look at each one of these in more detail.Connected greenhouse with Sensors and Actuators
The connected devices inside the Smart Greenhouse communicate with AWS IOT service using Intel Edison micro-controller boards that are housed in the spine of the greenhouse. There are two micro-controller hubs, a sensor hub for gathering all the sensor data and an actuator hub controlling actuators associated with devices. Each of the hub micro-controller boards have a NodeJS based application running and talking to connected devices on one end and AWS IOT service on the other end. The NodeJS application running on micro-controller board talks to
Connected greenhouse hardware implementation details
Sensor node is an Intel Edison microcontroller board with a NodeJS application running on it. The NodeJS application reads data from all the connected sensors every second and publishes the readings to AWS IOT service over a secured channel using MQTT protocol.
General data flow for the sensor node is as follows:
1. Read from connected sensors every second
2. Convert the readings into appropriate units
3. Envelope the readings into json based payload
4. Send the json payload as MQTT message to AWS IOT
Actuator node is another Intel Edison microcontroller board with NodeJS application running on it. The actuator NodeJS application subscribes to a set of MQTT topics and waits for messages to arrive on these topics. The actuator MQTT topics convey commands for the actuators connected to the greenhouse. Data flow for actuator node is as follows:
1. Subscribe to actuator MQTT topics and listen for messages on these topics
2. When the message arrives, parse the message into command and determine the actuator associated with the message
3. Execute the command by sending appropriate signals to the actuator specified by the message
4. After a preconfigured delay, read the status of actuator and send the reading to AWS IOT message topicControl Center
Control Center is backend infrastructure of the Smart Greenhouse involving Controller web application, Streaming web server and monitoring Lambda functions
Smart Greenhouse backend infrastructure consists of
- Controller Web Application
- Streaming Web Server
- Monitoring Lambda functions
Controller Web Application
Controller Web Application is a set of RESTful APIs used to control the Smart Greenhouse. This is a NodeJS application utilizing ‘expressesjs' for request response handling and ‘passportjs' for authentication. This application accepts REST PUT commands to carry out various IOT Greenhouse tasks such as opening a window vent or turning on a sprinkler.
Streaming Web Server
Streaming Web Server is used to communicate status of Smart Greenhouse to the interested parties in real time. This is a WebSockets streaming server based on NodeJS. It listens for MQTT topic updates from IOT Greenhouse and publishes these updates on a streaming WebSockets channel. Front-end application running in a browser can get real-time updates from this channel about the conditions in greenhouse such as current temperature, humidity and luminosity. Actuator state updates are also communicated on this channel.
Monitoring Lambda Functions
Conditions in greenhouse such as, temperature and humidity are monitored continuously by triggering AWS lambda functions through IOT rules engine. Lambda function then evaluates the readings for conditions such as ‘temperature is greater than 75 degrees Fahrenheit for 5 seconds and for at least 3 readings’. If condition is satisfied, a set of preconfigured actions such as opening a vent, turning on fan and switching off humidifier are fired.
Users can interact with the Smart Greenhouse using a dashboard, through voice prompts or using a tablet app
The web-based dashboard shows real-time graph of current temperature, humidity, soil moisture and luminosity. Greenhouse fan, ventilation windows, overhead lamp, led light and humidifier can also be controlled by the web-based dashboard application.
Simple commands such as ‘Alexa turn on the fan’ can be used with Amazon Echo device to activate the fan. The Alexa commands currently supported for the smart greenhouse are:
1. Alexa what is Internet of Things
2. Alexa turn on/off fan
3. Alexa turn on/off vents
4. Alexa turn on/off overhead lamp
Accenture developed an android app, which has similar functionality as that of the web based dashboard. This app can also be used to interact with the Smart Greenhouse.