-
Notifications
You must be signed in to change notification settings - Fork 836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
custom mqtt parameters. #669
Comments
I'm assuming you are trying to add this to the IRMQTTServer example code. It just uses the standard Have you tried looking at the example code for WifiManager on how to do this? |
I added WIFIMANGER library code accordingly and the json file is not opening to write and save the parameters for the future usage. MQTT connects for the first time with the autoconnectFSparameters, and once when the nodemcu is reset the MQTT parameters are not assigned but the SSID and PASSWORD is read and the mcu gets connected to the wifi. |
I'm not sure. Perhaps ask on the WifiManager issues page(s)? As their example code uses SPIFFS, did you add a partition for it in the build/target options in the Arduino IDE? |
Ok @crankyoldgit will ask WifiManager page. Ya I added 1M SPIFFS. And I am clearing the memory every time I upload the code. |
Did you try the example code I linked earlier? i.e. Just to test you've got all the correct build settings. Sadly, I don't personally have experience with saving stuff to the eeprom/flash on the ESP8266. But, please let me know what you find out, as I'm keen to add that functionality at some point. |
I have tried the wifimanger code alone and it works fine when it comes to the integration part the json file is not opening to write the parameters in it. TEXT ON SERIAL SCREEN: *WM: Handle root |
Do you have a link to the code you are using? |
no @crankyoldgit I dont have a link for my code. |
Without code to test/debug, I can't really help you. |
this is my code. |
I figured out where I was wrong. |
* Add mqtt server, port, username & password to WifiManager settings. * Save a `/config.json` file into the SPIFFS to store these over reboots. * Bucketloads of debugging added. Testing seems to show it works. Fixes #669
- Use WifiManager to do the one-time setup for the program. e.g. Set MQTT parameters, HTTP passwords, hostnames etc. This should allow a fairly standard build (except for GPIOs) for most people. - Move hardcoded examples to their own page. - Lots of hacks to try to reduce heap fragmentation/memory use. - Move user config settings to IRMQTTServer.h file. - General code cleanup and grouping. - Bump version. Almost ready for release. NOTE: Previous users may need to fully wipe/reset the SPIFFS/WifiManager settings by visiting `http://<your_esp8266's_ip_address>/reset` Fixes #669
…ngs. (#680) This should allow a fairly standard build (except for GPIOs) for most people. - Add mqtt server, port, username & password for mqtt/http and hostname, prefix to WifiManager settings. * Saves a `/config.json` file into the SPIFFS to store these over reboots. - Move hard-coded examples to their own page. - Lots of hacks to try to reduce heap fragmentation/memory use. - Move user config settings to `IRMQTTServer.h` file. - General code cleanup and grouping. - Bump version. Almost ready for release. - Bucket loads of debugging added. Testing seems to show it works (running on my main device) **WARNING**: Previous users may need to fully wipe/reset the SPIFFS/WifiManager settings by visiting `http://<your_esp8266's_ip_address>/reset` prior to or after update. Fixes #669
Hi,
I am working with the custom parameters for mqtt credentials like the WiFi manger.
I need help in adding the MQTT SERVER, PORT, USER NAME AND PASSWORD as a autoconnect custom FS Parameters.
I have used the same code as given and the libraries too..
The text was updated successfully, but these errors were encountered: