this is for learning purpose only.
A farmer wants to monitor the temperature in the plantation environment (up to the real time) You are required to:
- Create an MQTT System to receive data from sensors (sensor simulation using an application on a local computer)
- Received data is stored in DynamicDB
- The final data will be served in JSON form and visualized in HTML that can be accessed from a specific URL
- Amazon DynamoDB
- Amazon IoT Core
- Amazon EC2
- nginx
- php-fpm
- pip/pip3
- python/python3
- paho-mqtt
- boto3
- python3/python venv
- composer
git clone https://github.com/fauzymadani/aws-mqtt.git
cd aws-mqtt
composer require aws/aws-sdk-php
sudo mv mqtt_listener.service /etc/systemd/system/
sudo systemctl daemon-reexec
sudo systemctl daemon-reload
sudo systemctl enable mqtt_listener.service
sudo systemctl start mqtt_listener.servicemove to /var/www/html/:
sudo mv index.html /var/www/html/
sudo mv data.php /var/www/html/and don't forget to start and configure nginx first.