Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noopkat/azure-iothub-pubsub-esp8266
Using Arduino PubSub library with Azure IoT Hub on an ESP8266
https://github.com/noopkat/azure-iothub-pubsub-esp8266
arduino arduino-sketch azure esp8266 iothub pubsub pubsubclient
Last synced: 8 days ago
JSON representation
Using Arduino PubSub library with Azure IoT Hub on an ESP8266
- Host: GitHub
- URL: https://github.com/noopkat/azure-iothub-pubsub-esp8266
- Owner: noopkat
- License: mit
- Created: 2017-03-08T14:58:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-04-04T21:43:42.000Z (over 7 years ago)
- Last Synced: 2024-10-20T01:14:08.097Z (16 days ago)
- Topics: arduino, arduino-sketch, azure, esp8266, iothub, pubsub, pubsubclient
- Language: Arduino
- Size: 3.91 KB
- Stars: 18
- Watchers: 3
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# azure-iothub-pubsub-esp8266
Using the Arduino PubSub library with Azure IoT Hub on an ESP8266.
This sample demonstrates:
+ how to subscribe to a devicebound topic endpoint in Azure IoT Hub
+ how to publish to a cloudbound topic endpoint in Azure IoT Hub## Instructions
Ensure you have installed the necessary board dependencies for the ESP8266:
1. Open the Arduino IDE preferences
2. Add the following ESP8266 board configuration URL to the Additional Board Manager URLs field: `http://arduino.esp8266.com/stable/package_esp8266com_index.json`
3. Open the Boards Manager in the Arduino IDE, search for 'ESP8266', and click install on the appropriate result.Libraries needed (install via the Arduino IDE Library Manager):
1. ESP8266WiFi
2. PubSubClient
3. ArduinoJson**Important:** Before starting, follow the steps below to increase the message size allowed within the PubSubClientLibrary. This is necessary as the IoT Hub SAS token length exceeds the default allowable message size.
1. Open the file `PubSubClient.h` for editing, located where you installed the PubSubClient library
2. Change the value of `MQTT_MAX_PACKET_SIZE` variable from `128` to `256`
3. Save and close the fileYou may now add your own Wifi and Azure Iot Hub credentials to this sketch before compiling + uploading.
---
Find a bug? Report it as an issue, or even better - send me a pull request!