Hi, not an expert at these things so bare with me.
a generic 8266 board from Ebay and a ssd1306 screen. Using the code on the esp website I have managed to get it working. However, when I use 3.3v from the 8266 to the screen the screen doesn’t work, logs find device at 0x3c but wont communicate to it.
Power the screen with 5v then the screen works as expected but the 8266 wont connect to HA or the network. the wifi stops working.
Tried a different usb cable and power source and manual ip.
Could anyone help please? If you need any further info (logs etc) then let me know which ones.
Well, your display should work with 3,3V according to the adapfriut datasheet and the ESPHome website, so you might perhaps have some wirering issues.
My ESP’s sometimes show the “I’m not connecting to HA” issue when tinkering and having a value that is polled very frequent. It seems that some quickly updated sensors/information can disturb the WLan connection. This is a very rough observation and not a scientifically prooven fact
I have used the generic code on the Esphome webpage so it looks for time and two entities which dont exists for me.
So From your reply I shall Change this and get it to print hello world or something and go from there.
OK thanks… the code is what’s running at the moment and the picture attached shows the results and wiring.
Its not talking to HA and red on the ESPHome integration page. the logs show no connection, and no connection on network. If I add time back into yaml it just runs from 00:00.
commented out the, manual ip, all the display lines and the text lines.
Power still set to 3.3v and its connected to network and HA - which didn’t previously.
The logs have now lost the “can’t communicate device error”
Switched power to 5v and I get the same, (ie connected to ha and wifi).
So its the yaml code, I wonder of the device type is correct. Have tried ssh1306 and sh1106. This is the Ebay item number for the display. 392911521357 (Ebay uk).
To my understanding, SSD1306 should work just fine. Please try the following:
unpower the ESP
go to ESPHome and your configuration, it should have a “show log” button. Press it
power the ESP
after some time you should see the logs rushing trough. We are searching for the I2C debug outputs. Here it should show something like “I found one i2c client with adress xxx”
Check if the adress corrosponds to your adress in your code.
Also please comment the “reset_pin” line. This is optional and since you are not having one of those, this might confuse the code or the user
There is currently a post on Reddit about knockoff/clone Wemos D1 Mini boards, and many of them have a lower-current power regulator installed. If yours has this, it may be the power supplied is not sufficient to power both the display and the wifi simultaneously.
I will look at making the suggestion tomorrow now.
The post on Reddit… thanks. I appear not to have that one. from that site there is link in Lolin. I appear to have that one but no logo. Incidentally I have tried this board with a Dallas thermometer and a ph sensor with limited luck on the temp and no luck on the ph.
After spending MANY hours with exactly the same problem (WiFi + SSD1306 display = No WiFi connection), I found this solution from XCray.
With the setup_priority option included (as the above XCray suggestion), everything works just fine ( WiFi + SSD1306 display = No WiFi connect problems !!)…
Thank you XCray for sharing this information !!!
I just started out to tinkering around with the ESP Home stuff. I didn’t have expericend any connections issues with the ArduinoIDE way of things. As switched to ESP Home the WIFI connection issues immediately started if a SSD1306 display was connected. Eventuelly wifi started to work after 5 to 15 min. But totally unreliable. When disconnecting vcc from the display connection, wifi immediately started to work as it should.
Spending hours finding a solution, sadly this post didn’t come up earlier in my search results as it should. setup_priority: -100 fixed it for me too, so also many thanks to Xray for sharing this information !!!
AWESOME catch @XCray. Have been struggling with this for a while. Was seeing the i2C initializing before WIFI and was figuring this was the issue but could not find how to prioritize loading of modules. Interesting that this was not needed in previous instances of ESPHome as this happened a year after this code had been working when I made some changes.
Amazing. Thanks @XCray. I have been banging my head against the wall trying to figure this out. I believe there is some kind of a bug as I found this while searching for the fix.