Is anyone successfully using a SSD1325?

I have one and it works great under Auduino code but when I convert to ESPHome, it’s dark.

That suggests it’s not a hardware problem.
I’ve cross-checked that I’m using the same GPIOs in both the ESPHome config as in the Atduino sketch.

Curious to know if anyone’s got this module working, and if you’d be willing to share a code snippet.

excerpt from my config:

font:
  - file: "fonts/FreeMono.ttf"
    id: my_font
    size: 7

spi:
  clk_pin: GPIO14
  mosi_pin: GPIO13

display:
  - platform: ssd1325_spi
    model: "SSD1325 128x64"
    reset_pin: GPIO16
    cs_pin: GPIO15
    dc_pin: GPIO12
    # auto_clear_enabled: false
    lambda: |-
      // Draw a line from [0,0] to [100,50]
      it.line(0, 0, 100, 50);

Try adding to the code
contrast: 50%

Not a valid option for this display, according to the compiler.

I guess I can see that already. You need to define colors.

No luck with that approach, either.

I give up. I use SSD1306 and ILI9384 and it works for them.

Different devices altogether - not surprised that one works and this one … well, still waiting to hear if anyone has it running ok.

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.

Hi, did you manage to get this working on ESP8266? And does it work properly on ESP32?

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 :frowning:

spi:
  clk_pin: GPIO18
  mosi_pin: GPIO 23
display:
  - platform: ssd1325_spi
    model: "SSD1325 128x64"
    reset_pin: GPIO12
    cs_pin: GPIO4
    dc_pin: GPIO32
    update_interval: 2s
    # auto_clear_enabled: true
    lambda: |-
      it.printf(64,10, id(my_font_10), TextAlign::BASELINE_CENTER, "Test");
      }
      if (id(temp).has_state()) {
        it.printf(4, 80, id(my_font_8), TextAlign::BASELINE_RIGHT , "%.1f°C", id(temp).state);
      }
      it.strftime(4, 30, id(my_font_8), TextAlign::BASELINE_LEFT, "%H:%M", id(esptime).now());

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.

Thanks for the response. So, even though there’s a command to change the state from the sensor, it still doesn’t affect the display of the result?

 if (id(temp).has_state())

I’m going to seek help on ESPHome. Thanks.

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.

This issue only applies to OLED SPI displays. I have a different OLED display connected via I2C, and it refreshes in real-time.

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.

spi:
  clk_pin: GPIO18      <-----
  mosi_pin: GPIO23     <-----

wmbus:
   cs_pin:   GPIO5
   gdo0_pin: GPIO21
   gdo2_pin: GPIO22
   miso_pin: GPIO19
   clk_pin:  GPIO18    <-----
   mosi_pin: GPIO23    <-----

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.

1 Like

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.