Skip to content

wolfberryllc/MetaIoT-Cloud

Repository files navigation

MetaIoT-Cloud: A system for monitoring, visualizing, and storing sensor data in the cloud.

MetaIoT-Cloud is a comprehensive system for monitoring, visualizing, and storing sensor data in the cloud. It offers an end-to-end solution for collecting, managing, analyzing, and visualizing real-time data, providing valuable insights and enabling informed decisions. It utilizes powerful tools to monitor and manage large-scale sensor networks, allowing users to visualize and manage data in a simple and efficient manner. It also offers an intuitive user interface for easily configuring and managing devices, as well as powerful analytics and visualization tools for extracting meaningful insights and taking action. Furthermore, MetaIoT-Cloud allows users to securely store data in the cloud and access it from anywhere, anytime. It also provides automated alerts and notifications for quickly responding to changes in the data. With MetaIoT-Cloud, users can easily and quickly gain insights from their sensor data and make more informed decisions.

*Available now - Sensor to Data Visualization and Cloud Storage âś…

1667482098370

This project helps developers prototype and publish sensor-driven (Apps) using Unity3d, Firebase, and Google Cloud.

Starter Project (Planter AI Web App) + Raspberry Pi + Arduino + Unity + Firebase + Google Cloud.

We've developed an innovative sensor-driven application called Planter AI, which combines Raspberry Pi, Arduino, Unity, Firebase, and Google Cloud to help developers prototype and publish their apps quickly and easily.

Using Python APIs, you are able to store data collected from the Raspberry Pi into Google Firebase. This data is then collected from Firebase and displayed in Unity for a mobile application, and can be accessed through a static IP address.

Accounts Needed

Asset 2

Software Requirements

Before you begin on your Raspberry pi make sure that you have all the installed software and you have ran the most recent updates.

sudo apt update
  1. Arduino IDE Download
sudo apt install arduino
  1. Visual Studio Code Download
sudo apt install code

Hardware Requirements

Asset 3

Additional Hardware

  • Mobile Phone iOS & Android

  • Micro SD Card 64GB

Steps

Repository

  1. Fork repository

  2. Create a folder on your Raspberry Pi desktop and name your project

  3. Open Terminal

  4. Change Directory to the new folder you just created

cd /foldername 
  • get clone
git clone https://(urlofrepository) 
  • browse to the folder with another change directory
cd /MetaIoT/PlanterAI-main/SensorApi

Verify Sensor Kit Base

Browse to Arduino Sensor Kit Lessons and run through the lessons to verify that your sensor kit base sensors are working properly. The values should display in through the serial monitor found in the tools section of the Arduino IDE.

Install Dependencies

These will be run in the home folder of the repository you just created and cloned to your desktop. Please note that you will also need Python installed with pip on the machine you are using to build your application. Only use this if any of the dependencies are not working within your app.

  1. Install Firebase Firebase Website
pip install python-firebase

or

 npm install firebase

additionally you can run the command below if pip and npm do not work for you.

pip install git+https://github.com/ozgur/python-firebase

  1. Install pylance pylance Webpage
pip install pylance
  1. Install pyFirmata pyFirmata Website
pip install pyFirmata
  1. Install Flask Flask Website
pip install Flask
  1. Install Flask SocketIO Flask SocketIO website
pip install Flask-SocketIO 
  1. Install Pyrebase Pyrebase Website
pip install Pyrebase
  1. Install Eventlet Eventlet Website
pip install eventlet

Firebase

Create Firebase Project

Once you have created your Firebase account browse to your console https://console.firebase.google.com/ and click add project

Then you will be prompted to create a project name. Please feel free to use whatever name you would like.

Next you will add Google Analytics

Select the Default Account for Firebase

Add Database

Browse to build and Realtime Database on the left hand side of the console

at the top you will be given an option to Create Database

Select your Database location and hit next

For this project you will start in Test Mode. Once you have selected test mode select Enable

You will now be taken back to the console and you are ready to add your app.

Register your app and set up firebase hosting

After you register your app you will run NPM install from the terminal inside your Sensor API folder. In the event NPM does not install in your folders create a package.json file and place the following code in it.

{
  "dependencies": {
 
  }
}

Modifications

  • The template design is located in SensorAPI /templates/index.html

  • Modify lines 62 ---> 71 with your firebase database and application information from what you see on your screen. Take whats under

// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional

Then save it

You will now go back to your terminal inside of the root folder of your project (SensorAPI folder)

Run npm install -g firebase-tools

You will now login to firebase using

firebase login

Once you have logged in you will run

firebase init

You will then see something similar to this in your terminal

Use the down arrow and space bar to select Hosting configure files for Firebase Hosting and (optionally) set up github action deploys

Then hit enter

In the next screen type y and hit enter and do the same for Configure as single page app and set up automatic builds

You will then see this screen

type in your username and repo for the project username/MetaIoT

You should then see a screen similar to the one below. Run through the questions and use this screen as a reference to the answers

You will now see a public HTML file inside of your code files

You will now copy your templates index.html and replace the index.html file in public

Now you can run

firebase deploy

Browse to the url and you should now see the project template!

Arduino Board

  1. Connect the Arduino Base Sensor kit to Arduino Uno

  2. Plug the device into your Raspberry Pi or another computer using an installer

  3. Download Arduino IDE available at Arduino

  4. Upload Sketches located in PlanterAI-main/SensorApi/AnalogInputArdinu/AnalogInputArdinu.ino

  5. Upload Sketches located in PlanterAI-main/SensorApi/sketch_may21a/sketch_may21a.ino

Run your project

from your SensorAPI folder run

python3 demo.py

and then

python3 main.py

Database Security

***Coming Soon ***