1technophile / OpenMQTTGateway

MQTT gateway for ESP8266 or ESP32 with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility & LoRa.
https://docs.openmqttgateway.com
GNU General Public License v3.0
3.63k stars 799 forks source link

Full reset doesn't work, if there is no config.json #1872

Closed g-regor closed 3 months ago

g-regor commented 10 months ago

Holding down the TRIGGER_GPIO button down, doesn't erase the config (WiFi credentials and the filesystem) and then run the WiFi manager, if config.json doesn't exits. Since the WiFi credentials are still present, WiFi manager doesn't run and is impossible to configure the gateway which would create config.json.

Steps to reproduce the behavior:

  1. Upload firmware (V1.7.0) with TRIGGER_GPIO feature enabled and invalid MQTT_SERVER set.
  2. Setup the gateway through WiFi manager
  3. Wipe gateway's filesystem
  4. Now it fails to connect to MQTT broker, but connects to WiFi
  5. Hold down the TRIGGER_GPIO
  6. WiFi manager's AP is never started

WiFi credentials should be erased, even if config.json doesn't exist.

Additional context I uploaded newer firmware on a NodeMCU-32s module, that was previously running an older version (v0.9.6), so it already had WiFi credentials stored, but config.json wasn't present (new partitioning probably wiped it).

The same problem probably shows up, if you flash it on a board that was previously used for a different project and still has valid WiFi credentials.

github-actions[bot] commented 7 months ago

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] commented 7 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] commented 4 months ago

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] commented 3 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.