garethcheyne / HomeAssistant

3 stars 7 forks source link

Error in Home assistant #6

Open rojoricardo opened 2 years ago

rojoricardo commented 2 years ago

Hello, i installed your add-on, and it is working partially, i wanted to see if this can be fixed, i'm pasting the log from the add-on:


[09:07:14] INFO: Starting UCTronics OLED App...
[09:07:14] INFO: Disable Auto Start = false
/dev/i2c-1
[09:07:14] INFO: Got i2c access! WoHOo!
[09:07:14] INFO: Display Info to OLED
Traceback (most recent call last):
  File "/UCTronics_OLED/display.py", line 261, in <module>
    start()
  File "/UCTronics_OLED/display.py", line 77, in start
    if (SHOW_NETWORK) : show_network()
  File "/UCTronics_OLED/display.py", line 163, in show_network
    ipv4 = network_info['data']['interfaces'][0]['ipv4']['address'][0].split("/")[0]
IndexError: list index out of range```

I have assigned Ipv6 also so i dont know if thats causing the error.

Also... seeing that this is working, i am using it for a raspberry pi HAT that i bought that has a Fan, RGB leds and this OLED display, I wanted to see, how did you managed to get this OLED working??? I would like to have the fan and leds working, they also use I2C... but i dont know how to do anything, I installed AppDaemon for Homeassistant, but so far i cant do anything because i can't import libraries...
dstewen commented 2 years ago

I am getting the same error.

[00:26:35] INFO: Starting UCTronics OLED App... [00:26:35] INFO: Disable Auto Start = false /dev/i2c-1 [00:26:35] INFO: Got i2c access! WoHOo! [00:26:35] INFO: Display Info to OLED Traceback (most recent call last): File "/UCTronics_OLED/display.py", line 261, in start() File "/UCTronics_OLED/display.py", line 77, in start if (SHOW_NETWORK) : show_network() File "/UCTronics_OLED/display.py", line 163, in show_network ipv4 = network_info['data']['interfaces'][0]['ipv4']['address'][0].split("/")[0] IndexError: list index out of range