OLED 'Crashes' occasionally how to reset?

Hi,

I've got an Wemos D1 with an OLED Shield setup in I2C mode, together with a BME280 sensor also I2C mode (thus same pins) D1 and D2 on the Wemos D1 Min.

This all works!

However after a couple of hours (not sure as I've not seen it happen) the screen is black. The only way I get it back on is by resetting the Wemos. Im also monitoring the Wemos online and even though the screen is black, its working good!

Preferably I find a solution to this issue, does anyone have experiencing this with OLED screens?

some additional info. To run the screen I use full screen buffer method from U8G2 and I use the following constructor:
U8G2_SSD1306_64X48_ER_F_HW_I2C u8g2(U8G2_R0);

If no one knows solution to this issue the the next less preferable method is resetting the OLED itself (e.g. every hours or so). However I have no clue how to do this. That is: how do you reset an OLED screen while in I2C mode?

thank you.

To eliminate possible causes of the problem maybe you could replace the U8G2 library with either the SparkFun or Adafruit libraries and see if the problem persists.

Another option that is worth testing is to periodically initialize (.begin) the display as this should initialize all the registers to known values. This is just in case the display has inadvertently been turned off with a command.

I don't think the OLED has a reset that can be activated over I2C/SPI and it looks like the displays reset pin is tied to the D1 reset pin. You could maybe hack the OLED shield so the reset signal goes to one of the spare digital pins instead so you can reset it from code without having to reset the entire D1.

I don't use an OLED & BME280 on the same system but I do use D1/BME280 and for some reason the BME280 plays up and stops sending temperature (all other values are fine) or sends stupid values for everything. Reset does not always work and the safe way to cure the fault is to remove/wait/replace power. I initially though this was a D1 problem but I have once had the same problem with a LoRa32U4 board and a BME280 so now I suspect the BME280 may have intermittent problems and maybe this is causing the display problems you have.
The one device that runs continually with a similar display (Lora 32) that I use as a Lora to WiFi bridge has the display still working fine after about a month of use.