Skip to content

anedyaio/anedya-streamlit-dashboard-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

anedya-streamlit-dashboard-example

An example dashboard developed in streamlit

Logo

The Anedya IoT cloud enables users to monitor and control IoT devices remotely. The dashboard displays real-time data on humidity and temperature, as well as providing control buttons to operate a fan and a light. The control buttons sync with real-time changes, reflecting the current state of the devices.

Demo Dashboard Gauge-Image

Features

  • User Authentication: Basic login functionality.
  • Live Data Visualization: Real-time humidity and temperature charts using Altair.
  • Device Control: Buttons to turn the fan and light on and off, syncing with real-time changes.
  • Automatic Data Refresh: Auto-refresh functionality for live updates.

Setup and Configuration

  • Node ID: Obtain the Node ID from the Anedya dashboard by navigating to the project section and selecting the node.
  • API Key: Obtain the API key from the Anedya dashboard by navigating to the project -> APIKEY.

Integration with hardware

Connect your Nodemcu with a DHT sensor and a relay module as per the basic-home-automation with nodeMcu, basic-home-automation with pico example. Upload the provided sketch from the repo to read sensor data and control devices.Follow the detailed instructions in the README.

Usage

Running Locally

  1. Clone the Repository: Clone anedya-streamlit-dashboard-example repo from anedya github.
git clone https://github.com/anedyaio/anedya-streamlit-dashboard-example.git
cd anedya-streamlit-dashboard-example
  1. Install Dependencies: To ensure the application has all the necessary libraries, you'll need to install the dependencies listed in the requirements.txt file. This file contains a list of all the packages along with their versions that the app depends on. Here's how to install these dependencies:
  • Open a terminal or command prompt.
  • Navigate to the directory where you cloned the repository.
  • Run the following command to install the dependencies using pip:
pip install -r requirements.txt

This command reads the requirements.txt file and installs all the listed packages.

  1. Run the Streamlit App: Start the Streamlit server:
streamlit run Home.py

This will launch the dashboard in your default web browser.

Hosting on Streamlit Cloud

  1. Fork the Repository: Fork this repository to your own GitHub account.
  2. Sign Up / Log In to Streamlit Cloud: Go to Streamlit Cloud and sign in with your GitHub account.
  3. Create a New App:
  • Click on "New app".
  • Select your forked repository.
  • Set the branch to main (or the branch you want to deploy from).
  • Set the main file path to Home.py.
  1. Deploy: Click "Deploy" to launch your app on Streamlit Cloud.

License

This project is licensed under the MIT License.

Tip

For Anedya documentation, click here. [!TIP] For more information, visit anedya.io