123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- """
- created by caliskan at 19.04.2023
-
- contains all constants for the backend architecture of the smart garden project
- """
-
- MQTT_BROKER_LOCAL = "lorem ipsum"
- MQTT_BROKER_GLOBAL = "mqtt.eclipseprojects.io"
- RASPI_CLIENT_ID = "smart_farming_raspi"
- BACKEND_CLIENT_ID = "smart_farming_server"
-
- # Topics:
- Topics = {
- "ROBOT_ACTION_DRIVE": "ROBOT/ACTION/DRIVE",
- "ROBOT_ACTION_GETPOSITION": "ROBOT/ACTION/GETPOSITION",
- "ROBOT_ACTION_GETBATTERY": "ROBOT/ACTION/GETBATTERY",
-
- "ROBOT_DATA_SENSORDATA": "ROBOT/DATA/SENSORDATA",
- "ROBOT_DATA_BATTERY": "ROBOT/DATA/BATTERY",
- "ROBOT_DATA_POSITION": "ROBOT/DATA/POSITION",
- "ROBOT_DATA_PICTURE": "ROBOT/DATA/PICTURE",
-
- "BACKEND_ACTION_DRIVE": "BACKEND/ACTION/DRIVE",
- "BACKEND_ACTION_GETPOSITION": "BACKEND/ACTION/GETPOSITION",
- "BACKEND_ACTION_GETBATTERY": "BACKEND/ACTION/GETBATTERY",
- "BACKEND_ACTION_GETALLDATA": "BACKEND/ACTION/GETALLDATA",
-
- "BACKEND_DATA_SENSORDATA": "BACKEND/DATA/SENSORDATA",
- "BACKEND_DATA_SENSORDATAALL": "BACKEND/DATA/SENSORDATA_ALL",
- "BACKEND_DATA_POSITION": "BACKEND/DATA/POSITION",
- "BACKEND_DATA_BATTERY": "BACKEND/DATA/BATTERY",
- "BACKEND_DATA_PICTURE": "BACKEND/DATA/PICTURE"
-
- }
-
-
- # MQTT Messages:
-
- # region Robot -> Backend
- SENSORDATA = {
- "AirTemperature": 0.0,
- "AirHumidity" : 0.0,
- "SoilMoisture" : 0.0,
- "Brightness" : 0,
- "PlantID": 0,
- "ActionID": 0
- }
-
- # TODO When sensor is available
- POSITION = {
- "Position": ""
- }
-
- BATTERY = {
- "Battery": 0.0
- }
-
- # endregion
-
- # region Backend -> Robot
-
- DRIVE = {
- "PlantID": 0,
- "ActionID": 0
- }
-
- # GETPOSITION -> no message needed
-
- # GETBATTERY -> no message needed
-
- # endregion
-
- # region Backend -> Frontend
-
- PLANTDATA = {
- "AirTemperature": 0.0,
- "AirHumidity" : 0.0,
- "SoilMoisture" : 0.0,
- "Brightness" : 0,
- "PlantID": 0,
- "Timestamp": "",
- "MeasurementID": 0
- }
-
- ALLPLANTDATA = [
- PLANTDATA,
- PLANTDATA,
- PLANTDATA,
- PLANTDATA,
- PLANTDATA,
- PLANTDATA
- ]
-
- # TODO When sensor is available
- POSITION = {
- "Position": "",
- "Timestamp": ""
- }
-
- BATTERY = {
- "Battery": 0.0,
- "Timestamp": ""
- }
-
- # endregion
-
- # region Frontend -> Backend
-
- DRIVE = {
- "PlantID": 0
- }
-
- # GETPOSITION -> no message needed
-
- # GETBATTERY -> no message needed
-
- # GETALLDATA -> no message needed
-
- # endregion
|