AWS IOT MQTT Bridge Client example for Arduino Uno / Mega with Ethernet Shield
Arduino Example connection to AWS IOT Mosquitto Broker
Tested on:
Library 1: PubSubClient Library 2: ArduinoJson Library 3: SoftReset
mosquitto_pub -h localhost -p 1883 -q 1 -d -t localgateway_to_awsiot -i clientid1 -m "{\"key\": \"helloFromLocalGateway\"}"
Setup intructions here
const char* mqttserver = "192.168.0.14"; // Local Broker
const int mqttport = 1883; // MQTT port
String subscriptionTopic = "awsiot_to_localgateway"; // Get messages from AWS
String publishTopic = "localgateway_to_awsiot"; // Send messages to AWS
You should see mesages in your AWS IOT Console, Docker Logs and Arduino Serial Console