-
Notifications
You must be signed in to change notification settings - Fork 0
Catalog
Paolo Grasso edited this page Jul 23, 2020
·
1 revision
The resource catalog relies on five configuration files:
- cherrypyconf: Configuration file for CherryPy webserver
- conf.json: Configuration file which contains catalog ip, port and MQTT topic
- static.json: Resource JSON where all information about the actors are stored
- dynamic.json: Resource JSON where mutable information are stored. These include timestamps and topics for sensors, and current irrigation parameters.
- api.json: Configuration files where critical information are stored (Telegram token, ThingSpeak IDs and APIs)
When launched, the catalog should:
- Start a thread with CherryPy RESTful webserver
- Start a thread with MQTT subscriber which listens to sensors alive messages
- Start a thread which remove inactive sensors from dynamic.json
- It replies to requests containing broker IP, telegram token, ThingSpeak APIs, info related to a specific ID or the general JSON files.
- It changes irrigation parameters on dynamic.json and irrigation hours on static/dynamic.json.
- It is able to add gardens, plants and devices upon request. The new devIDs, plantIDs and gardenIDs are automatically generated in a sequential way.
- It listens to all sensor topics (with wildcards) and keep tracks of active sensors by updating their timestamps on dynamic.json and deleting them when they are inactive.
Main scripts
Sensors
Control strategies
User interface