I’ve been doing a great deal of testing of this since posting the question, and some very kind people have taken an interest, too.
However, we still can’t tell why it works on their setup (using ESP32’s) but not mine (using ESP8266).
Best we can tell, it’s got to do with timing. I’m ordering an ESP32 to see if I have better luck.
Meanwhile, if you have a running ESPhome config with this model of display on a ESP8266, please, please chime in, perhaps share your config yaml file.
There was a bug in the driver code in ESPHome that only affected ESP8266, which has been corrected.
A very kind person worked through this with me, discovered the bug, submitted a patch for it, and it’s been working great on the ESP8266 under ESPHome ever since.
Hi, I managed to fire up the OLED display on the ESP32; however, it only shows static text. I don’t have any sensors connected, and I have no idea why it’s like that.
The only thing I managed to get working is the clock, but it doesn’t update. If it displays right after startup, it stays like that
In your ‘display’ definition, you’ve successfully placed items on the display, but you may not have any code that updates them. The ‘display’ section is for defining the display, and there are other calls needed over time to change what’s displayed.
I suggest you read the rest of the ESPHome doc on both the SSD1325, and its ‘parent’ page for 'Display’s in general. There you’ll find suggestions on how to refresh/replace what’s shown on the display.
As an example, I use an ‘Interval’ (a little hard to find in the docs, look under ‘Automations’ in the front page) to periodically refresh the contents of the display, and to change pages on it at appropriate times.
Yes. Remember that the sensor’s state, and the text on the display, are independent things.
If you want the displayed text to change when the sensor’s state changes, you need to intercept that event (e.g. within an ‘…on_change’ handler), and then create the necessary code to change the display.
ESPHome isn’t a ‘declarative’ model, where you can say “put this sensor’s state on the display” and it will then get updated in the background automatically. You have to provide that logic yourself.
Hello again, everything is now working without the refresh automation. The display shows values in real-time. The issue was caused by two SPI devices connected to the same pins on ESP32.
Pins 18 and 23 share the same SPI, and I suspect this is the issue. I am using the ESP32 D1 mini, and I’m wondering if it’s possible to connect them to different pins on the board.
Glad you found it.
I had failed to notice the ‘refresh interval’ in your display’s definition. That would do the same thing as an interval timer, without extra coding.