Author Topic: ESP32 Classic MQTT Publisher & Home Assistant  (Read 9190 times)

ForeverHomestead

  • Newby
  • *
  • Posts: 26
Re: ESP32 Classic MQTT Publisher & Home Assistant
« Reply #90 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.

Is it supposed to have the blue light flashing showing it is in AP Mode?
« Last Edit: January 12, 2021, 12:06:40 PM by ForeverHomestead »

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 2783
Re: ESP32 Classic MQTT Publisher & Home Assistant
« Reply #91 on: January 12, 2021, 11:11:20 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 one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

ForeverHomestead

  • Newby
  • *
  • Posts: 26
Re: ESP32 Classic MQTT Publisher & Home Assistant
« Reply #92 on: January 12, 2021, 12:07:39 PM »
The board is the ESP32 Dev Kit.

Is there a certain board that works better than others?
« Last Edit: January 12, 2021, 12:31:36 PM by ForeverHomestead »

Graham

  • Sr. Member
  • ****
  • Posts: 278
    • ClassicDiy
Re: ESP32 Classic MQTT Publisher & Home Assistant
« Reply #93 on: January 12, 2021, 01:03:37 PM »
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

  • Newby
  • *
  • Posts: 26
Re: ESP32 Classic MQTT Publisher & Home Assistant
« Reply #94 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?

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 2783
Re: ESP32 Classic MQTT Publisher & Home Assistant
« Reply #95 on: January 12, 2021, 01:23:30 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 one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

Graham

  • Sr. Member
  • ****
  • Posts: 278
    • ClassicDiy
Re: ESP32 Classic MQTT Publisher & Home Assistant
« Reply #96 on: January 12, 2021, 01:24:44 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

  • Newby
  • *
  • Posts: 26
Re: ESP32 Classic MQTT Publisher & Home Assistant
« Reply #97 on: January 12, 2021, 02:53:18 PM »
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

  • Newby
  • *
  • Posts: 26
Re: ESP32 Classic MQTT Publisher & Home Assistant
« Reply #98 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?

Graham

  • Sr. Member
  • ****
  • Posts: 278
    • ClassicDiy
Re: ESP32 Classic MQTT Publisher & Home Assistant
« Reply #99 on: January 12, 2021, 03:03:37 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

  • Newby
  • *
  • Posts: 26
Re: ESP32 Classic MQTT Publisher & Home Assistant
« Reply #100 on: January 12, 2021, 05:12:04 PM »
hmmmm.  That does not seem to do anything.

Graham

  • Sr. Member
  • ****
  • Posts: 278
    • ClassicDiy
Re: ESP32 Classic MQTT Publisher & Home Assistant
« Reply #101 on: January 13, 2021, 09:02:36 AM »
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

  • Hero Member
  • *****
  • Posts: 2783
Re: ESP32 Classic MQTT Publisher & Home Assistant
« Reply #102 on: January 13, 2021, 01:39:37 PM »
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 one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

ForeverHomestead

  • Newby
  • *
  • Posts: 26
Re: ESP32 Classic MQTT Publisher & Home Assistant
« Reply #103 on: January 13, 2021, 04:28:07 PM »
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

  • Newby
  • *
  • Posts: 26
Re: ESP32 Classic MQTT Publisher & Home Assistant
« Reply #104 on: January 13, 2021, 04:46:21 PM »
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..
 
« Last Edit: January 13, 2021, 06:41:59 PM by ForeverHomestead »