ESP8266MOD Factory Reset

  1. My goal is: to get the 7 step quick start tutorial working
  2. My actions are:

At first I created a new app in monogooes os
then built app firmware
then flashed the firmware
then configured the wifi
Added the device to mdash
configured the token from mdash
All of this worked up until this point

What I did next was add these lines to the current init.js file

load('api_timer.js');
load('api_mqtt.js');

Timer.set(1000, Timer.REPEAT, function() {
    let ok = MQTT.pub('test/topic', 'hello from an updated firmware');
    print('mqtt message sent?', ok);
}, null);

Then I ran mos build
Then I updated the firmware over the air using the download button in mDash, it loads for 10 minutes or so, looks complete, but I get no logs in mongoose os, showing this based on the new code I added above.

That night I unplugged the device

  1. The result I see is:

The next morning when I plug it in, it wont connect to wifi, I run sysconfig and debug sysconfig says wifi is connecting but it never connects. I reconfigure the wifi still no connection.

I decide to try and factory reset. Hold down the rst button for at least 30’s and nothing changes, the app is still setup that I flashed.

Another thing to note is the led is just flashing blue, so not sure why that may be

  1. My expectation & question is:

I am hoping someone can help me reset to factory so I can start the process over.

Thanks

I can’t reproduce your issue.
In order for the provisioning library to do the factory reset, you need to connect a button on GPIO0

mgos_provision_btn.c:87 Factory reset button: pin 0, pull up, hold_ms 0 (hold on boot).

After OTA update, you need to call OTA.Commit from the dash RPC section:
44

[Nov  5 20:00:26.808] mg_rpc.c:292            OTA.Commit via WSS_out 148.251.54.236:443
[Nov  5 20:00:26.813] esp_ota_backend.c:599   Committing ROM 1
[Nov  5 20:00:26.816] esp_ota_backend.c:590   cur 1 prev 0 fwu 0

The log after OTA update:

[Nov  5 20:08:53.252] online: true {"ram_free":28708,"uptime":545.858317,"btnCount":0,"on":false} 
[Nov  5 20:08:53.316] mqtt message sent? 0 

Sorry I am going to be super slow with this, not really a hardware guy.

Ok First what is this line

mgos_provision_btn.c:87 Factory reset button: pin 0, pull up, hold_ms 0 (hold on boot).

is it instructions, or is it something I type somewhere, a little lost.

As for adding a button, I have a basic button. How do I hook it up to GPI00, i have a breadboard and a bunch of wires but dont know where to hook them up. Im looking at this here https://www.instructables.com/Control-LED-Using-PushButton-With-NodeMCU/ and would I just remove everything but the black wire and the button?

Here is my setup, not sure if it’s right. I am using a 10K Ohms resistor

What does OTA update mean? and I only have access to mongoose os throught the serial prot right now so how would I do a RPC Request? I am running on linux

Oh I think it means over the air, so once I am able to reset to factory and recconect to wifi and re add the device in mdash I run the rpc request