Okay. It appears to be a power problem. Put the 4.3" TFT code back on the display and it came right up using the power only USB connection (that combo wasn’t working at all before).
Now, just need to get the PCBs in and built. I think those provide more power than I am getting with the power adaptors (which is strange since they are rated at 2.5A).
Allright, so next step is to try and figure out why this doesn’t want to talk to your MQTT broker. The good news is that, because it’s up and running on WiFi, you shouldn’t have to break it open and start screwing around inside. If you connect to the web page (IP address shown on the device screen), you should see an admin configuration page. At the bottom of that screen is a bunch of status information. Can you post a screenshot of what you see there?
What’s weird here is that rc=0 means it successfully attached
If you watch MQTT explorer while the device boots up, do you see any traffic? Does the device seem to do anything on boot? I suspect that, by your username, you might have purchased this from me recently. Are you OK with opening this fella up? You can get a lot more debug information with the USB serial interface located inside, but it requires removing the 4 screws in back (philips #1) and then two socket head screws inside (1.5mm) to get the PCB out. If you do so, don’t have it connected to AC power while also connected to USB.
Alternately, you can try enabling telnet debug and try to catch the debug messages during power on. That’s harder, because you can’t attach until WiFi starts up which makes the timing tricky.
If you plug in the USB interface to a computer, it should create a COM port (Windows terminology). Then using something like PuTTY, connect a terminal session to that COM port with settings 115200 bps, 8N1.
Here is a random guide I just googled on the topic, looks like it should cover you if you’re a Windows user.
[+156.343s] HMI OUT: 'p[0].b[1].txt="WiFi Connected!\rë Hall 2.4G_2GEXT\rIP: 192.168.1.178\r\rMQTT Connecting:\r mqtt://192.168.1.173"'
[+156.357s] MQTT: Attempting connection to broker mqtt://192.168.1.173 on port 1883 with TLS disabled as clientID plate_1-40f52069c29
[+161.468s] MQTT connection attempt 15 failed with rc 0. Trying again in 5 seconds.
[+161.489s] HMI OUT: 'p[0].b[1].txt="WiFi Connected:\rë Hall 2.4G_2GEXT\rIP: 192.168.1.178\r\rMQTT Connect to:\r mqtt://192.168.1.173\rFAILED rc=0\r\rRetry in 5 sec"'
That got it working, but whenever it restarts (for whatever reason: bumped the wire, restarted via web page) it loses the mqtt settings, and bottom of the web page says:
MQTT Status: Disconnected, return code: 0
MQTT ClientID:
HASP Version: 0.41
LCD Model: NX3224T024_011R
LCD Version: 3
LCD Active Page: 0
LCD Serial Speed: 115200
CPU Frequency: 160MHz
Sketch Size: 638560 bytes
Free Sketch Space: 2506752 bytes
Heap Free: 21480
Heap Fragmentation: 9
ESP core version: 2_7_4
IP Address: 192.168.20.228
Signal Strength: -50
Uptime: 16
Last reset: External System
Also, when it was working, I deployed the media blueprint to page 8. It works, but the << || >> buttons show no icon. They work when touched, but no icon shows.
When you say “scratch that”, are MQTT settings still needing to be set every boot?
Both you and @Edhall1044 are seeing that “Disconnected” with return code 0 which is a really weird situation. RC=0 is connection accepted, and after wading through the library source files, that return code is what my connection loop is testing. So, the program logic is: is return code 0? If not, display an error with the return code, which, in these cases, is… 0.
I’ll try and wrap some code around this and see if we can’t either resolve it, or get some better information logged so we can figure out why the heck this is happening.
Hoping someone can help me troubleshoot one of my switch plate. It’s been working great for over a year and recently I’ve been messing around with it, pulling it in and out of the wall trying out different buzzers and vibration motors and at some point I’ve messed something up.
Anyway long story short, I put it back in the wall, fire the breaker back up and it works fine for about 10-15 minutes and then just goes dark. HA says it’s still connected and I can toggle the switch on and off for the backlight but nothing happens.
As I’m trying to troubleshoot I decided to pull it apart and plug in the D1 mini directly to power to see if i have a bad power supply or connection. The light on the D1 mini just barely flickers like it’s not getting much power and eventually fades away. None of this makes sense. I’m stumped.
I have the parts to replace everything except the mean well not sure which one to start with. Maybe the D1 mini?
I’ve made some changes to how the MQTT connection loop happens which should hopefully handle the initial connection a little better, fix all of your problems, prevent global warming, and create world peace.
Alternately, it’ll dump out some more useful debug messages.
One of those two things is bound to happen. Let me know how it goes!