Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 3.85 KB

README.md

File metadata and controls

58 lines (42 loc) · 3.85 KB

WiFiMQTTManager

Note: For a great codeless method for flashing your ESP devices try the fantastic ESPHome project-> https://esphome.io/

ESP32/ESP8266 library that extends the WiFiManager and PubSub Client Libraries and adds the ability to save SSID, WiFi password, and MQTT connection settings so that they don't have to be hard-coded in your sketches. Also allows for user friendly naming of your IoT devices and publishes device registration data back to a Node Red Dashboard where you can initiate service actions on your devices (e.g. restart, or bring up it's access point to reconfigure/rename device, etc)

It's assumed that you already know how to setup an Arduino development environment, including how to install libraries, and that you already have MQTT and Node Red/Dashboard installed.

First cut at a library. Contributions are welcome.

Requirements

Quick Start

  1. Install the required libraries (see above)
  2. Download WiFiMQTTManager and unzip it in your Arduino libraries folder. Make sure the folder name is "WiFiMQTTManager".
  3. Edit the PubSubClient.h header file and change MQTT_MAX_PACKET_SIZE to 512
  4. Import (then Deploy) into Node Red the Dashboard json found in /nodered/services-export.json file (make sure you enter your MQTT server address in the two MQTT nodes in the flow)
  5. Open Arduino IDE and attach your ESP32 or ESP8266 controller board to your computer (select the correct board and port)
  6. In Arduino IDE open File->Examples->WiFiMQTTManager->Basic sketch
  7. Change the AP_PASSWORD in secrets.h file to a suitable password for your device Access Points
  8. Upload the sketch to your device (you may need to uncomment the wm.formatFS = true; line in the basic sketch but if you do make sure you comment it back out and re-load your sketch after the device file system is formatted) (the serial monitor window will show helpful information)
  9. After a few seconds you should see a new SSID in your available WiFi Access Points in the formap of ESP_xxxxxxxx. Select this SSID and a new configuration popup window will appear.
  10. Enter your SSID and password, your MQTT server address and port and give your device a user friendly name
  11. A few seconds after your device is configured you should see the new device show up in the Service Dashboard dropdown widgets.

Dashboard

dashboard

Access Point Configuration

AP Menu

AP Config

Support

For issues, feature requests, comments or questions, use the Github issues tracker.

Contributing

  1. Fork the project.
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request.

History

Dec 10, 2018 - Version 1.0.0-beta released

Credits

License

GNU GPL, see License.txt