it works fine. But once I add some sensors, it verifies OK, it flashes OK (tried both OTA and with USB), but it never show up on the network. The “new” config just added one sensor and two binary sensors:
Perhaps D3 gpio0 is being pulled low at start-up so device stays in flash mode. Pick a different pin or just try it first without that sensor on D3. Not sure if you can do an INPUT_PULLUP on gpio0.
I second that. I’ve had exactly same problems. If you observe logger output with UART sniffer you’ll see that device “locks-up” when GPIO0 is configured as input. Do you have anything connected on GPIO0?
Try with different GPIO port, or try with internal pullup.
Beware of GPIO0 and 2 - they must be high on bootup, while GPIO15 must be GND.
Different pinouts in different boards can sometimes cause problems. There is work around for some things.
Try adding mode: INPUT_PULLUP to the line just below pin: D1
Thanks for the pointers. It’s definitely something about that binary_sensor. Unfortunately mode_: INPUT_PULLUP didn’t work, so I dismantled it, and switched to a different PIN. But weirdly, moving it from D3 to either D2 or D7 didn’t work either. Same result, it never shows up on network after flashing.
Currently, I have the below config (ended up leaving the PIR plugged into PIN D2). Obviously the PIR doesn’t work, but the other sensors do. If I uncomment the PIR binary_sensor, it never shows up.
Are you sure that your board have pull-up resistors on needed GPIO pins? Try to measure resistance between GPIO and +3.3V - it should be around 10kohm. If not, add external resistors. For basic guide look for ESP201 in google - search for images and you’ll get wiring diagram with all needed resistors.
If resistor is missing board can sometimes even boot if you’re lucky. If pin is “in the air” it can have +3.3V or GND level.
Did you try to connect UART programmer to Rx-Tx pins and observe output at boot with terminal program?
Can you post the serial logs when you try flashing it through USB with the broken configuration? I want to know if it doesn’t boot at all, or whether it only fails to connect to WiFi.
Not really sure what to say here. I tried a few times (was struggling with how to get logs, since I could only do that through HASS UI if I could connect by wireless, wouldn’t accept the USB connection).
After a few attempts just like last time (working if I removed the D2 part of the config), I tried with the Ardiuno app, and connecting to serial monitor se see.
The first time I connected the Arduino serial monitor (immediately after flashing the config with the D2enabled) I did notice a line in the Ardiuno serial monitor saying handshake failed. The next time, I tried the serial monitor just when I started the flash, but then the flash failed (can’t do both at once?). Then I flashed without D2, and again with D2, and it came online.
So not sure what to say… At least it’s working, but it still bugs me a bit. Also that I didn’t save the logs the first time it said handshake failed, sorry about that, I thought I could just reproduce.
I recently updated a RobotDyn NodeM (running as nodemcuv2) at it will not find network. On the very odd occasion it sees the network and then fails to connect. If I remove the switch component using D7 (GPIO12) then the unit works flawlessly. Add a switch component with another port say D8 and it still does not connect to wifi. Remove the binary sensor on D6 and add the switch gpio on D7 and it connects to wifi. Why in the latest update can I not have the sensor and switch platform running simultaneously?