lot_manager/test.py

31 lines
747 B
Python
Raw Normal View History

2023-12-01 09:21:23 +08:00
import datetime
import time
import requests
2023-12-01 18:00:11 +08:00
2023-12-01 09:21:23 +08:00
while (True):
print(time.time())
time.sleep(10.0)
# 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
# }
2023-12-01 18:00:11 +08:00
# data = LOT_DATA(**data, create_time=int(time.time()))
# add(data)
# print(data)
2023-12-01 09:21:23 +08:00
# requests.post("http://192.168.1.27:8000/add/lot_data", json=data)