The dweet integration service, found in the chatper14/dweet_integration_service folder, is a Python-based integration service that receives dweets and re-publishes them as messages to MQTT topics. This service provides us with a simple approach to integrate a service such as IFTTT with our Tree MQTT service program.
The dweet integration service is made up of the following files:
- main.py: The main program entry point.
- config.py: The configuration parameters.
- thing_name.txt: Where your thing name is saved. This file will be created when you first start the program.
- dweet_listener.py: The core program code.
The core of our dweet service is found in the dweet_listener.py file. If you inspect this file, you will notice that it is almost identical to the dweet_led.py file covered in both Chapter 2, Getting Started with Python and IoT, and Chapter 13, IoT Visualization and Automation Platforms (except it's now wrapped as a...