https://github.com/limitium/mqttwifi
robust mqtt client over wifi for ESP8266 and ESP32
https://github.com/limitium/mqttwifi
esp32 esp32-library esp8266 esp8266-library mqtt mqtt-client pubsub wifi
Last synced: 4 months ago
JSON representation
robust mqtt client over wifi for ESP8266 and ESP32
- Host: GitHub
- URL: https://github.com/limitium/mqttwifi
- Owner: limitium
- Created: 2020-05-06T18:09:35.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-22T21:46:21.000Z (almost 5 years ago)
- Last Synced: 2025-01-11T06:33:34.674Z (6 months ago)
- Topics: esp32, esp32-library, esp8266, esp8266-library, mqtt, mqtt-client, pubsub, wifi
- Language: C++
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MQTTWIFI - robust mqtt client over wifi for ESP8266 and ESP32
build on top of arduino mqtt client library [pubsubclient](http://pubsubclient.knolleary.net/)[](https://travis-ci.org/limitium/MQTTWIFI)
[](http://doge.mit-license.org)## Features
- Simplest usage and api ever
- Aggressive wifi and mqtt connection sustenance## Quick start
```c++
MQTTWIFI::MQTTWIFI mqttwifi = MQTTWIFI::MQTTWIFI("wifiname", "password", "broker.mqttdashboard.com", 1883, "ConnectionID");
void setup()
{
mqttwifi.init();
mqttwifi.subscribe("topic1", [](const char *payload) {
Serial.printf("Rcv from topic1, %s", payload);
});
}void loop()
{
mqttwifi.loop();
mqttwifi.publish("topic1", "msg!");
}
```
## Exmaple
- [Basic](https://github.com/limitium/mqttwifi/tree/master/examples/basic) - basic=full usage example## Dependencies
* (pubsubclient)[https://github.com/knolleary/pubsubclient]
* (log4esp)[https://github.com/hunsalz/log4Esp]## Limitations
* all from underlying library (pubsubclient)[https://github.com/knolleary/pubsubclient#limitations]## License
MQTTWIFI is open-source software licensed under the [MIT license](http://opensource.org/licenses/MIT)