It's a webOS-based smart home gardening project with remote and automatic control!
π₯ View Demo
Β·
π Report Bug
Β·
π¬ Request Feature
ποΈ Table of Contents ποΈ
[Difficulty in growing and managing plants at home]
- Time and cost burden to manage plants every day, and barriers to entry into cultivation and management, especially for beginners
- When growing at home, each environmental condition (wind, sunlight, humidity, temperature, etc.) is different, so there is a limit to cultivating only by referring to the manual
[Features for user convenience and satisfaction]
- Automatic control to maintain appropriate environmental conditions according to plant species, monitoring companion plant conditions, and managing companion plant affection through JS service between HW and web apps
- Development of external servers and mobile pages to implement user information management, remote control (watering/light volume), and multiple individual plant management functions
1. Automation of Maintaining Optimal Environmental Conditions Based on Plant Species
-
Real-time data collection is achieved through sensors connected to an Arduino, including temperature and humidity sensors, light sensors, and moisture sensors.
-
Based on the collected sensor data, an automatic watering system and light control system create suitable environments for different plants automatically.
-
The appropriate environmental conditions for each plant species are stored in a database using domain knowledge in botany. For instance, cacti require temperatures of 30-40Β°C during the day and 10Β°C at night, with high light levels and 40-60% humidity, while peonies require temperatures of 18-25Β°C and 50-70% humidity.
2. Meeting Various User Needs
-
The system supports both an automation mode for convenient management and a customization mode for users who wish to interact directly with their plants. Users can switch between modes without restrictions. For example, someone who enjoys watering their plants manually can use the customization mode but switch to automation mode when they need to be away for an extended period.
-
Through a mobile web interface, users can monitor plant conditions and environmental factors remotely, such as light and moisture levels, and make adjustments as needed.
In this main
branch, except for the HW connection, the contents corresponding to the webos/dev
branch are merged.
We provide logic and functions to make them easier to understand and utilize, and we use dummy data, not actual data.
If you would like to see the contents including the HW connection, you can find it on the webos/devHW
branch.
- webOS Emulator: Pre-built image applied in a local environment using VS Code extension webOS Studio for React app development.
- Luna-bus API: Used to interact with the JS service.
- HTTP Communication: Used for server interaction.
- Main Logic: Implemented within the JS service in webOS.
- DB8: Used as the internal database in webOS.
- Functionality: Handles tasks like plant automation control, leveling up, satisfaction metrics, and HW sensor data collection.
- Remote Control: Communicates with an external server via WebSocket.
- Spring Boot: Utilized for server construction.
- REST Controllers: Designed using HTTP for functionalities like login and registration.
- WebSocket Controllers: Designed for real-time data transmission.
- Spring JPA: Used for database configuration and setup.
- AWS EC2 Ubuntu: Environment for server deployment.
- MySQL: Stores basic data such as user and plant information.
- InfluxDB: Used for storing time-series data, appropriate for environmental sensing information collected every 5 seconds, deemed unsuitable for RDBMS.
- Devices: Raspberry Pi 4 flashed with webOS pre-built image, Arduino, display resolution set to 1920x1080.
- Sensors: DHT11, CDS light sensor, water level sensor, NeoPixel connected via I2C communication.
- Data Handling: Sensor data read through Arduino IDE and transmitted to Raspberry Pi 4.
- Control: Arduino controls motor and NeoPixel settings based on commands from Raspberry Pi.
- HardWare : Raspberry Pi 4 Model B 8GB
- OS : WebOS OSE
- TouchDisplay : Raspberry Pi Display 10.1-Inch Touch Screen LCD
-
Download WebOS image from WebOS OSE
-
Extracting image files
-
Uncompressed using the 7-zip program
-
You can decompress it and a folder called webos-ose-2-24-0-raspberrypi4-64.tar is created.
-
If you enter the folder, there is a .tar file, and you can proceed with decompressing it.
-
Uncompressed creates a folder called webos-ose-2-24-0-raspberrypi4-64.
-
When you enter the folder, you'll find a .mic file, which means the Image file is ready.
-
-
Formatting SD Cards
- You can refer to it and format the SD card.
- Windows 10 default format doesn't matter!
-
Image flashing to sd card
- Image flashing to sd card using program : Win 32 Disk Imager
- Please select the .mic file obtained above, select the SD card you formatted, and press the Write button.
- It's taking some time.
- Done! Now when you insert the SD card into the bottom of the Raspberry Pi and boot it up, WebOs will boot normally!
- If Writing Successful appears, you have successfully flashing the image on the sd card.
Note: The Arduino source code is uploaded to arduino/i2cSlaveFinal within the Hardware branch.
- Ardiuno Nano: Communicates Raspberry Pi with I2C, to control all sensors and actuators. See docs of webOS peripheralmanager.
- 24 x WS2812B Neopixel Ring: Used for light actuator. Connected to Arduino Nano Pin 3.
- Water pump: Used for watering actuator. Requires transistor circuit or motor driver. See docs of arduino. In this project's circuit diagram, use current amplification circuits with diodes and transistors. Connected to Arduino Nano Pin 4.
- DHT11: Temperature and humidity sensor. Connected to Arduino Nano Pin 2.
- SEN030101: Light sensor for approximate value. Can be replaced with CDS cell and pull-up resistor. Connected to Arduino Nano Pin A0.
- SZH-EK057: Water level sensor. Connected to Arduino Nano Pin A1.
- SEN030003: Soil moisture sensor. Connected to Arduino Nano Pin A2.
This guide will help you set up and run the project in your local environment. Follow these steps to get started.
Note: This guide is tailored for a setup on a single local PC, And your device, whether it is an emulator or a Raspberry Pi, must be running continuously.
-
Clone the repository.
git clone https://github.com/dudgns128/webos-gardening.git
-
Move into the cloned directory.
cd webos-gardening\gardening_react
-
Install npm
npm install
-
Open Git Bash
./deploy.sh <name of device>
step is detailed in the README.md
file of the respective folder, allowing you to sequentially progress and gather the necessary information.