ESP32 Classic MQTT Publisher & Home Assistant

Started by Graham, February 13, 2020, 05:58:57 PM

Previous topic - Next topic

ForeverHomestead

#90
I do not see it on the list.  It looks like the flash works, I get a prompt tp reboot, then I hit Wifi and it allows me to type it in and displays it on the screen, it just does not ever connect or give any indication that it is.

I tried holding the flash button down but it does not change the way it performs.

Is it supposed to have the blue light flashing showing it is in AP Mode?

ClassicCrazy

Quote from: ForeverHomestead on January 12, 2021, 07:32:41 AM
I do not see it on the list.  It looks like the flash works, I get a prompt tp reboot, then I hit Wifi and it allows me to type it in and displays it on the screen, it just does not ever connect or give any indication that it is.

I tried holding the flash button down but it does not change the way it performs.

Which Esp32 board are you using ?

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

ForeverHomestead

#92
The board is the ESP32 Dev Kit.

Is there a certain board that works better than others?

Graham

If you're having trouble setting the wifi credentials using the flasher tool you can set it using a phone by connecting to the ESP's access point

I made a youtube video showing the procedure

https://youtu.be/ya6lDb4gbmk

hope this helps

Graham.
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

ForeverHomestead

Hello Graham,

I watched your video yesterday.  I do not see a way to get the board into AP mode.  I do not see my board in my wifi connections on my phone.  Is there something special I need to do to get it into AP mode?

ClassicCrazy

Quote from: ForeverHomestead on January 12, 2021, 01:17:38 PM
Hello Graham,

I watched your video yesterday.  I do not see a way to get the board into AP mode.  I do not see my board in my wifi connections on my phone.  Is there something special I need to do to get it into AP mode?

Maybe it didn't get flashed properly .
Try flashing it again - don't bother with trying to put in the wifi credentials .
Then when done  you should see the LED flashing like Graham said .
Remember that just before you flash the Esp32 you have to hold in the Boot Button on it . I forget if you just need to hold this in when all the time it is flashing or just as you start flashing it.
The reason I asked about which board because there are probably different variations of them - some might not need the boot button held in when flashing it.

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

Graham

Quote from: ForeverHomestead on January 12, 2021, 01:17:38 PM
Hello Graham,

I watched your video yesterday.  I do not see a way to get the board into AP mode.  I do not see my board in my wifi connections on my phone.  Is there something special I need to do to get it into AP mode?

If you hold GPIO15 to ground while powering the ESP up it will default to AP mode (blue led should flash)

if you do the same with GPIO4, this will clear all the data in nvram

Graham.
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

ForeverHomestead

I get a pop up that says it is done.  The status bar on the flasher went to 100%  also the dos command screen shows

Has of data verified

Leaving.....
Hard Resetting via RTS pin



ForeverHomestead

I see a pin labeled gnd and one labeled D15.  If I short those two it should go into ap mode?

Graham

Quote from: ForeverHomestead on January 12, 2021, 02:55:05 PM
I see a pin labeled gnd and one labeled D15.  If I short those two it should go into ap mode?

yes, disconnect USB, connect D15 to ground, connect USB, should boot up in AP mode, remove jumper...
see attached picture
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

ForeverHomestead

hmmmm.  That does not seem to do anything.

Graham

Quote from: ForeverHomestead on January 12, 2021, 05:12:04 PM
hmmmm.  That does not seem to do anything.

It's likely your esp didn't get flashed correctly for some reason. I have had issues with USB cables, you might want to try another one...

I just tried it on one of my ESP dev boards that has ClassicMQTT flashed on it, with the GPIO15 (D15) connected to ground the blue led was flashing several times a second indicating it's in AP mode.
If there is data stored in the ESP for the Wifi credentials, the code will attempt to connect for 60 seconds, the led will blink slowly until it connects then will remain on if successful otherwise it will default to AP mode with the led flashing quickly.

You could also try flashing the ESP using the development IDE.
I have a video on how to flash the ESP with the VSCode development environment, I made it for another one of my projects but it's the same for ClassicMQTT , just get the code from https://github.com/ClassicDIY/ClassicMQTT instead of the one in the video. I made this video for someone in Poland so there is no audio.
https://youtu.be/GVixF3zlV1c
Once you build the project, use the Upload icon (->) to flash the esp, press and hold the 'boot' button on the esp for a few seconds to initiate the upload.

Once it connects to wifi (blue LED is on), I use Advanced IP Scanner https://www.advanced-ip-scanner.com/ to find the ESP's ip address on the local network

Graham
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

ClassicCrazy

I was also going to suggest trying different usb cable and  different usb port .
Also maybe try a different esp32 example project that is supported on Arduino ( you have to add espboards to arduino ide  first though I believe) . That would be just to make sure the esp32 works.
And if on Windows use Device manager to make sure the Esp32 is showing up - this will also let you know for sure which port it is on. It won't say esp32 but whatever chip it uses for the serial port. I just unplug my esp32 from windows computer  while Device manager is open to see which one goes away .

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

ForeverHomestead

I am closer. lol

So I tried a new USB and port but that did not help. I downloaded the file and used Platformio to flash is and the blue light flashes.  I can see the classicmttp as an available connection, but unlike the video, when I click on it, it does not display setting, it asks for a password.  Whatever I put in says invalid.  Any ideas what the password would be?

ForeverHomestead

#104
Oh so I used ClassicMQTT and it worked.  It did not open a page, but opeing a browser and going to 192.168.4.1 worked.

It does not like my wifi info though.  Strange because it works elsewhere.

Is there an issue connecting to a mesh network on this? I cannot choose 2.4 or 5 G, the Unifi router does it for me.  I think I had a problem with another device like this.

Oh, the plot thickens....

So I tried to use the other flasher again and entered the same wifi info on the flasher tool.  It seamed as though it did not work... then the blue LED went solid and a browser window opened with an ip address on it.  Nothing ever loaded and after about a minute the blue LED started flashing again....

Every once and awhilke it flashes faster, but then stops..