From 5cccf4267401d11f39a16d4aa890dc892cc02575 Mon Sep 17 00:00:00 2001 From: xyj <10908227994@qq.com> Date: Sat, 2 Dec 2023 13:26:11 +0800 Subject: [PATCH] mqtt --- conf/test.conf | 13 ------------- requirements.txt | 3 ++- test.py | 26 -------------------------- 3 files changed, 2 insertions(+), 40 deletions(-) delete mode 100644 conf/test.conf delete mode 100644 test.py diff --git a/conf/test.conf b/conf/test.conf deleted file mode 100644 index b8ec499..0000000 --- a/conf/test.conf +++ /dev/null @@ -1,13 +0,0 @@ -[program:test] -directory=/home/pi/lot_manager -command=/usr/bin/python test.py -user=pi -;是否随开机自启 或者reload自启动 -autostart=false -;失败重启 -autorestart=true -;重启次数 -restart_times=3 -redirect_stderr=true -stopsignal=TERM -stopasgroup=True diff --git a/requirements.txt b/requirements.txt index 0bfef0a..acda6c7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,5 @@ sqlalchemy~=2.0.19 uvicorn~=0.23.2 fastapi~=0.95.1 paho-mqtt~=1.6.1 -requests~=2.31.0 \ No newline at end of file +requests~=2.31.0 +pyserial~=3.5 \ No newline at end of file diff --git a/test.py b/test.py deleted file mode 100644 index 458dfdb..0000000 --- a/test.py +++ /dev/null @@ -1,26 +0,0 @@ -import datetime -import time - -import requests - -# data = { -# "wind_speed": 26, -# "wind_direction": 6, -# "ambient_temperature": 66, -# "ambient_humidity": 78, -# "carbon_dioxide": 94, -# "ambient_air_pressure": 48, -# "rainfall": 3, -# "ambient_lighting": 59, -# "soil_temperature": 71, -# "soil_moisture": 19, -# "soil_conductivity": 62, -# "soil_PH": 49, -# "soil_potassium_phosphate_nitrogen": 5, -# "soil_potassium_phosphate_phosphorus": 5, -# "soil_potassium_phosphate_potassium": 86 -# } -# data = LOT_DATA(**data, create_time=int(time.time())) -# add(data) -# print(data) -# requests.post("http://192.168.1.27:8000/add/lot_data", json=data)