1 Star 0 Fork 0

西安石油大学-郑宏涛 / arduino.io

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

my arduino Data display and alarm

This is an IoT platform developped using flask where people can veiw the temperature, humidity and gaz state

Overview

Some photos about this project:

login

regsiter

cards_edit

card_data DHT11 Humidity Gaz

Running this app

As a standalone app

install python (Optional:Create virtual environment)

  1. install python
  2. git clone the project then cd into the directory
  3. run virtualenv -p /usr/bin/python3 venvor python -m venv venv to create a virtual environment
  4. activate it using source venv/bin/activate
  5. pip install -r requirements/base.txt to install the app libaries and it dependencies
  6. you must install mosquitto as mqtt server accept arduino dataapt install mosquitto

setting up the databse

  1. you need to have mysql server installed in your machine, if you are working in linux just typr sudo apt-get update && apt-get install mysql-server
  2. type sudo mysql to enter to the database
  3. app sql config in .env .env-mysql app/config/py migtatnois/alembic.ini files
  4. example:
  5. sqlalchemy.url = mysql+pymysql://iot_platform:secret@localhost:3306/iot_platform_db
  6. mysql+pymysql://db_user:db_user_passwd@lP:port/db_name
  7. .....

run the app

After installing, run the server using ./start.sh Access the running app in a browser at the URL written to the console (most likely http://localhost:5000)

set mail address

You can set the recipient and sender of the alert mailbox in the file policy/bot.py

set nginx web proxy server

# example file
# /etc/nginx/sites-available/arduino-web 
server{
  listen 80;
  server_name 127.0.0.1;  #you ip address or name address
  location / {
    proxy_pass  http://127.0.0.1:5000;
    proxy_set_header Host $proxy_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }
}

set nginx enable

ln -s /etc/nginx/sites-available/arduino-web  /etc/nginx/sites-enabled/
sudo systemctl enable nginx --now
MIT License Copyright (c) 2020 deconf Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/xsyu_security/arduino.io.git
git@gitee.com:xsyu_security/arduino.io.git
xsyu_security
arduino.io
arduino.io
main

搜索帮助

53164aa7 5694891 3bd8fe86 5694891