Skip to content
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

configuration when wifi config is invalid #7

Open
stevescot opened this issue Nov 14, 2017 · 2 comments
Open

configuration when wifi config is invalid #7

stevescot opened this issue Nov 14, 2017 · 2 comments

Comments

@stevescot
Copy link

if you setup a node with a mistake in the SSID or password,

the node will repeatedly attempt to connect (10 times) - then it will reset and do this again.

however during that process, there is no loop for the dns or web server, so it is impossible to re-configure the node to be able to use the correct credentials (save for wiping it and starting again).

@coogle
Copy link
Collaborator

coogle commented Nov 15, 2017

Thanks for letting me know, please feel free to either submit a PR to fix the issue or I will try to find some time to correct it myself (but you'll have to be patient with me!)

@snappy46
Copy link
Contributor

Same issue when connection to the MQTT server cannot be established. Simply deleting the restartDevice() within CoogleIOT.cpp loop function where the failure conditions are being checked (wifiFailuresCount & mqqtFailuresCount) fix that issue but I am not familiar enough with the code to see if doing that might not create some unwanted side effect. Quick and dirty fix but probably something better could be created??? With those 2 restartDevice() code line removed; the device could still be restarted using the web interface which is available even without a connection to the router or mqtt server.

mikeofqyn added a commit to mikeofqyn/CoogleIOT that referenced this issue Oct 31, 2021
…ouse#19

Issue ThisSmartHouse#21  (issues with newer esp8266 Arduino cores 3.0.x)

Changed the ESP8266 core CoogleIOT::checkForFirmwareUpdate() to replace the call to the deprecated and removed (since version 3.0) ESPhttpUpdate::update() with the currently supported function ESP8266HTTPUpdate::update().

The meber function bool CoogleIOT::verifyFlashConfiguration() lacks a 'return <value> statement causing the code to crash on return.  Added the The ESP exception decoder does not help too much, by the way, as it locates the fault elsewhere.

Issue ThisSmartHouse#7 (configuration when wifi config is invalid)

The problem lies in CoogleIOT::loop() trying to reconnect and resetting over and over again rendering the library unable to process configuration portal requests.

A new member function has been added, CoogleIOT::loopWebServer() to be used in a loop when connection cannot be established. Its use is demonstrated in the DHTSensor.ino sketch in the examples folder.

Issue ThisSmartHouse#19  (Custom items)

Two application specific fields, up to 25 character long have been added to the configuration portal interfacew (MQTT tab).  They can set and retrived via new API calls. Their names (used as labels in the configuration portal) can also be set. Usage is shown in the DHTSensor.ino example.

--- Other ---

* Changed version number to 1.3.2.
* Added an example sowing the new features
* Merged pull request ThisSmartHouse#20 (depends=PubSubClient in library.properties).
* Update README.md and keywords.txt with the changes.

Changes:
 -	modified:   .gitignore
 	modified:   README.md
 	new file:   examples/DHT11Sensor/DHT11Sensor.ino
 	new file:   examples/DHT11Sensor/README.md
 	modified:   keywords.txt
 	modified:   library.properties
 	modified:   screenshots/mqtt-screen.png
 	modified:   screenshots/status-screen.png
 	modified:   screenshots/wifi-screen.png
 	modified:   src/ArduinoJson.h
 	modified:   src/CoogleIOT.cpp
 	modified:   src/CoogleIOT.h
 	modified:   src/CoogleIOTConfig.h
 	modified:   src/CoogleIOTWebserver.cpp
 	modified:   src/EEPROM_map.h
 	modified:   src/webpages/home.h
 	modified:   src/webpages/home.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants