Closed hackthis02 closed 4 months ago
On the face of it, I would say this would be relatively straight forward, but a little time consuming. As this leverages a butchered version of the Adafruit Python SSD1306 library, you can restore the abstraction to include this screen size. The bin/SSD1306.py would need to be replaced with the original Adafruit Python SSD1306 library, and the init.py may also require some updating to accommodate the new import path. Beyond that, it should just... work [hopefully] :).
I would also love to see this happening, just to be able to use this printable case for my pi: https://www.thingiverse.com/thing:4740975
Yeah, I haven't had a chance to look into this yet. But it's on my list.
@mediocaballero I spend about an hour this morning getting it working. It's still using crismc's screens. I might rework those for the lager screen size. If you want to try it out, https://github.com/hackthis02/homeassistant_addons
Hey! Thanks for your update! I downloaded the repo to test, but it seems it's not working for me. This is what I get in the logs (similar than what I had with the original repo):
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[23:53:47] INFO: Starting I2C OLED App...
/dev/i2c-1
[23:53:47] INFO: /dev/i2c-1 enabled
[23:53:47] INFO: I2C access enabled. Proceeding!
[23:53:47] INFO: Display Info to OLED
[23:53:47] INFO: Running 'python3 display.py -c /data/options.json'
Traceback (most recent call last):
File "/I2C_OLED/display.py", line 5, in <module>
from bin.Config import Config
File "/I2C_OLED/bin/Config.py", line 5, in <module>
from bin.Screens import *
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/I2C_OLED/bin/Screens.py", line 55, in <module>
class BaseScreen:
File "/I2C_OLED/bin/Screens.py", line 60, in BaseScreen
def __init__(self, duration, display = Display(), utils = Utils(), config = None):
^^^^^^^^^
File "/I2C_OLED/bin/Screens.py", line 19, in __init__
self.clear()
File "/I2C_OLED/bin/Screens.py", line 29, in clear
self.display.begin()
File "/I2C_OLED/bin/SSD1306.py", line 97, in begin
self._initialize()
File "/I2C_OLED/bin/SSD1306.py", line 154, in _initialize
self.command(SSD1306_DISPLAYOFF) # 0xAE
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/I2C_OLED/bin/SSD1306.py", line 89, in command
self._bus.write_byte_data(self._address, control, value)
OSError: [Errno 5] I/O error
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
I'll look into this. But I don't want to bug crismc, since this isn't related to his repo, go start an issue on my repo.
Thanks! Will do (once you enable them @hackthis02 (-: )
Is your feature request related to a problem?
how hard would it be to add support for SSD1306_128_64? I was debating on branching this and give it a go.
Describe the solution you'd like
Be able to use a 128x64 screen
Describe alternatives you've considered
No response
Additional context
Here is the screen I currently using and would like to add support for. https://www.amazon.com/gp/product/B07VDXYDVY