Skip to content

Development of webos-based smart home gardening web app

Notifications You must be signed in to change notification settings

dudgns128/webos-gardening

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Contributors Forks Stargazers Issues MIT License webos


Logo

Smart Home Gardening Project with WebOS

It's a webOS-based smart home gardening project with remote and automatic control!

πŸŽ₯ View Demo Β· 🐞 Report Bug Β· πŸ’¬ Request Feature

πŸ—‚οΈ Table of Contents πŸ—‚οΈ
  1. About The Project
  2. Specifications
  3. Getting Started
  4. Contact

About The Project

projectImage1 projectImage2

Development Motivation and Description

[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

Key Features

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.

Must Read

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.

Specifications

Built With

WebApp

ReactnpmHTML5JavaScriptFigmaNodejsHTTP

  • 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.

JS-service

JavaScriptNodejsnpmWEBSOCKETLS2API

  • 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.

External Server

AWSWEBSOCKETHTTPSpring

  • 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.

Database

MySQLInfluxDB

  • 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.

Hardware

LGArduinoRaspberry

  • 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.

Development Environment

window

System Architecture

πŸ–ΌοΈ System Architecture πŸ–ΌοΈ

System Architecture

πŸ–ΌοΈ Database ERD πŸ–ΌοΈ

Database ERD

(back to top)

Hardware Setup

Sample

Raspberry Pi

  • HardWare : Raspberry Pi 4 Model B 8GB
  • OS : WebOS OSE
  • TouchDisplay : Raspberry Pi Display 10.1-Inch Touch Screen LCD
  1. Download WebOS image from WebOS OSE

    pre build image file
  2. 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.

  3. Formatting SD Cards

    • You can refer to it and format the SD card.
    • Windows 10 default format doesn't matter!
  4. 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.

Circuit Diagram & Sensor & Actuator

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.

Sensor νšŒλ‘œλ„

Getting Started

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.

  1. Clone the repository.

    git clone https://github.com/dudgns128/webos-gardening.git
  2. Move into the cloned directory.

    cd webos-gardening\gardening_react
  3. Install npm

    npm install
  4. 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.

Contact

πŸ’‘ κΉ€μ˜ν›ˆ (dudgns128) : [email protected]

πŸ’‘ λ°•μ§€ν™˜ (hw-ani) : [email protected]

πŸ’‘ κΉ€μž¬ν›ˆ (nanocode00) : [email protected]

πŸ’‘ 였승우 (dhtmddn00) : [email protected]

πŸ’‘ ν™μ§€μŠΉ (HONG-2019110129) : [email protected]

(back to top)

About

Development of webos-based smart home gardening web app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •