-
Notifications
You must be signed in to change notification settings - Fork 0
ThingSpeak Adaptor
Paolo Grasso edited this page Jul 23, 2020
·
1 revision
The ThingSpeak adaptor relies on two configuration files:
- cherrypyconf: Configuration file for CherryPy webserver
- conf.json: Configuration file which contains catalog ip, port, MQTT topic and URL of ThingSpeak website.
When launched, the adaptor should:
- Start a thread which collects MQTT messages from sensors.
- Start a thread which create a timer to prevent the adaptor to publish data on ThingSpeak within 15 seconds.
- Start a thread which CherryPy RESTful webserver.
- Process MQTT messages from sensors containing environmental values. These data are aggregated into a temporary database which will be published on ThingSpeak every 15 seconds.
- POST environmental data on ThingSpeak, collected from sensors
- GET environmental data from ThingSpeak requested by control strategies, Telegram bot and Freeboard
- GET resource information from the catalog (e.g. the fieldID of a ThingSpeak channel for a specific environmental resource in order to publish related data)
Main scripts
Sensors
Control strategies
User interface