crismc / homeassistant_addons

Add-ons for Home Assistant, allow you to extend the functionality around your Home Assistant setup.
MIT License
14 stars 6 forks source link

[Bug]: OLED Screen crashes during Start #6

Closed ColinTravis closed 1 year ago

ColinTravis commented 1 year ago

Requirements

Current Behavior

Currently, this addon crashes at start, looks like an issue with the DISPLAYOFF

Expected Behavior

No response

Steps To Reproduce

  1. Plug in OLED per instructions.
  2. Enable i2c
  3. Install, configure this addon
  4. Start

Context

Tried starting up the first time

Environment

- HA Version: 2023.8.1
- I2C_OLED: 1.0.4

Anything else?

Copy of log: 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 [17:44:04] INFO: Starting I2C OLED App... [17:44:06] INFO: Debug mode set to true /dev/i2c-1 [17:44:06] INFO: /dev/i2c-1 enabled [17:44:06] INFO: I2C access enabled. Proceeding! [17:44:06] INFO: Display Info to OLED [17:44:06] INFO: Running 'python3 display.py -d -c /data/options.json' Traceback (most recent call last): File "/I2C_OLED/display.py", line 5, in from bin.Config import Config File "/I2C_OLED/bin/Config.py", line 5, in from bin.Screens import *
^^^^^^^^^^^^^^^^^^^^^^^^^ File "/I2C_OLED/bin/Screens.py", line 53, in class BaseScreen: File "/I2C_OLED/bin/Screens.py", line 58, in BaseScreen def init(self, duration, display = Display(), utils = Utils(), config = None): ^^^^^^^^^ File "/I2C_OLED/bin/Screens.py", line 17, in init self.clear() File "/I2C_OLED/bin/Screens.py", line 27, 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 121] Remote 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

ColinTravis commented 1 year ago

My mistake, I'm using a POE adapter for the Pi, and the pinouts for the GPIO pins are mislabeled. Once connected to the proper pins, it works great.