I'm sorry, but I didn't understand what you need. Could you please be more specific about your request?
Did something work before and now it doesn't?
In any case, I need a lot more information to help.
OLEDproc Add-on
-
LuRu -
April 25, 2022 at 5:02 PM -
Thread is Resolved
-
-
Is it possible to run this script using your addon?
I need to see the remaining HDD space on OLED
Python
Display More#!/usr/bin/env python import re import time import busio import subprocess from threading import Timer from board import SCL, SDA from PIL import Image, ImageDraw, ImageFont import adafruit_ssd1306 i2c = busio.I2C(SCL, SDA) disp = adafruit_ssd1306.SSD1306_I2C(128, 32, i2c) disp.fill(0) disp.show() width = disp.width height = disp.height image = Image.new("1", (width, height)) draw = ImageDraw.Draw(image) draw.rectangle((0,0,width,height), outline=0, fill=0) #draw.rectangle((0, 0, width, height), outline=0, fill=0) padding = -5 top = padding bottom = height - padding x = 0 # Load default font. font = ImageFont.truetype('/usr/local/bin/pistatus/icon/Ubuntu-R.ttf', 18) # Variables cpu_temp = 0 date_text = "01.01.1970" time_text = "00.00.00" hdd1_free = 0 hdd1_percent = 0 hdd2_free = 0 hdd2_percent = 0 screen_no = -1 def get_date_time(): global date_text global time_text cmd = "date +%H:%M" time_text = subprocess.check_output(cmd, shell = True).decode("utf-8") cmd = "date +%d-%m-%Y" date_text = subprocess.check_output(cmd, shell = True).decode("utf-8") t = Timer(10, get_date_time) t.start() get_date_time() def get_hdd(): global hdd1_free global hdd1_percent global hdd2_free global hdd2_percent cmd = "df -h | awk '$NF==\"/mnt/hdd\"{printf \"HDD1: %s\", $5}'" hdd1_percent = subprocess.check_output(cmd, shell = True).decode("utf-8") cmd = "df -h | awk '$NF==\"/mnt/hdd\"{printf \"FREE: %sB\", $4}'" hdd1_free = subprocess.check_output(cmd, shell = True).decode("utf-8") cmd = "df -h | awk '$NF==\"/mnt/hdd2\"{printf \"HDD2: %s\", $5}'" hdd2_percent = subprocess.check_output(cmd, shell = True).decode("utf-8") cmd = "df -h | awk '$NF==\"/mnt/hdd2\"{printf \"FREE: %sB\", $4}'" hdd2_free = subprocess.check_output(cmd, shell = True).decode("utf-8") t = Timer(2, get_hdd) t.start() get_hdd() def get_cpu_temp(): global cpu_temp cmd = "vcgencmd measure_temp" cpu_temp = subprocess.check_output(cmd, shell=True).decode("utf8") #return float(re.findall(r'\d+\.\d+', cpu_temp)[0]) t = Timer(5, get_cpu_temp) t.start() get_cpu_temp() def raise_screen_no(): global screen_no screen_no += 1 if screen_no > 5: screen_no = 0 t = Timer(4, raise_screen_no) t.start() raise_screen_no() while True: draw.rectangle((0,0,width,height), outline=0, fill=0) if screen_no == 1: #cpu°C image = Image.open("/usr/local/bin/pistatus/icon/temperature.bmp").convert("1") draw = ImageDraw.Draw(image) font = ImageFont.truetype('/usr/local/bin/pistatus/icon/Ubuntu-R.ttf', 30) draw.text((x, top+5), str(cpu_temp[5:9]+'°C'), font=font, fill=255) elif screen_no == 2: #hdd1 /dev/sda image = Image.open("/usr/local/bin/pistatus/icon/disk.bmp").convert("1") draw = ImageDraw.Draw(image) font = ImageFont.truetype('/usr/local/bin/pistatus/icon/Ubuntu-R.ttf', 18) draw.text((x, top), str(hdd1_percent), font=font, fill=255) draw.text((x, top+20), str(hdd1_free), font=font, fill=255) elif screen_no == 3: #hdd2 /dev/sdb image = Image.open("/usr/local/bin/pistatus/icon/disk.bmp").convert("1") draw = ImageDraw.Draw(image) font = ImageFont.truetype('/usr/local/bin/pistatus/icon//Ubuntu-R.ttf', 18) draw.text((x, top), str(hdd2_percent), font=font, fill=255) draw.text((x, top+20), str(hdd2_free), font=font, fill=255) else: #time font = ImageFont.truetype('/usr/local/bin/pistatus/icon/Ubuntu-R.ttf', 39) draw.text((x, top), str(time_text), font=font, fill=255) # Display image. disp.image(image) disp.show() time.sleep(1) -
Is it possible to run this script using your addon?
Unfortunately, I don't know of such a possibility (unless quite extensive modifications are made). The OLEDproc add-on can only display the information it receives from the XBMC LCDproc add-on.
-
I was asked to update the OLEDproc add-on for Orange Pi H3 and LE12.
Here it is and I have also added all the dependencies.script.module.cbor2-12.0.0.101.zip
script.module.luma-12.0.0.101.zip
script.module.smbus2-12.0.0.101.zip
script.module.spidev-12.0.0.101.zip
virtual.opi-tools-12.0.0.003.zip
The modified XBMC LCDproc add-on you can download here.
-
This is amazing! Can't wait to try it with my OLED

-
Hi LuRu , I am new around here and I was redirected to this thread for getting around my issue. I am running LE 2 on a Pi 5, and trying to program my OLED based on chip SSD1306. Could you please kindly share what changes should I make in order to make the add-on work in my case as well? I really appreciate your work and contribution to LE community and I thank you in advance! Cheers!

-
Hi @kato !
I'm glad you're interested in my add-on.
Unfortunately, I don't own an RPi5, so I can't test it.
But I do own an RPi4 and it still works without any problems there.
So you have no choice but to try it out for yourself.
However, I'm afraid that some of the dependencies will need to be compiled specifically for the RPi5.
In addition to the included add-ons, you will also need to have the Raspberry Pi Tools add-on (from the LibreELEC repository) and the MODIFIED XBMC LCDproc add-on installed.I recommend reading this entire thread.
script.module.spidev-12.0.0.101.zip
script.module.smbus2-12.0.0.101.zip
script.module.luma-12.0.0.101.zip
-
Hello,
I have a PI5 NVME 256GB ARGONE ONE V3 case
and wanted to run an OLED display on it!
The small 1.3-inch ones all work,
Now I wanted to upgrade to an SSD1363 256x128 i2c OLED display, but oledproc doesn't offer any drivers or settings.
WHAT CAN I DO
to control it?!?
THANKS in advance for the answers
-
Unfortunately, I can't help much. My add-on is based on the luma.oled library. If this library doesn't contain the SSD1363 driver, then of course the OLEDproc add-on can't work with it either.
But you can try to see if it works with some other driver. Maybe the SSD1322 could use similar commands. But I don't give it much chance...I'm sorry, but I can't really help more. First of all, I'm very busy at the moment and secondly, to be able to experiment with it, I would have to own the same display. Unfortunately, that's not the case.
-
Unfortunately, I can't help much. My add-on is based on the luma.oled library. If this library doesn't contain the SSD1363 driver, then of course the OLEDproc add-on can't work with it either.
But you can try to see if it works with some other driver. Maybe the SSD1322 could use similar commands. But I don't give it much chance...I'm sorry, but I can't really help more. First of all, I'm very busy at the moment and secondly, to be able to experiment with it, I would have to own the same display. Unfortunately, that's not the case.
Hello, thanks for answering.
Thanks anyway -
Thanks for the info. I already thought about the SSD1309.
Since my Raspberry Pi 2, PI 3, PI 4, etc., I've been using Kodi projects as a media center, so I'm still experimenting with the displays (formerly HD44780) with the acrylic case. Thank you very much, greetings from Germany. -
Hello,
SSD1309 works great.
I just ordered SSD1322.
I like it because it's wider!
Is there an entry for this in oledproc?!?
Regards
Harald
-
Hi !
I'm not sure if I understand the question. After all, if the add-on works with the SSD1309 type for you, then you had to go through the add-on settings. And there you had to see what types (and also what resolution combinations) are on offer.
But yes, the SSD1322 type is in the set of supported display types. But you have to realize that it was not in my power to test all types. And the SSD1322 type is not among those that I have tested. -
Hi, thanks for the info. It's enough for me to know that the SSD1322 is supported. THANK YOU & have a nice weekend.
-
Hello everybody,
I know, this thread is quite old. But I still hope to find help.
I wanted to install an OLED display for Kodi under latest libreelec on RPI3B+The OLED is a 2.4" waveshare with SSD1309 driver.
I've started from zero. Flashed Libreelec + Kodi.
SSH access for putty.
Changed config.txt with dtparam_i2c1=on and dtaparam_i2c_arm=onInstalled the complete package with version 12.0.0.101 in the order:
script.module.cbor2script.module.smbus2
script.module.spidev
script.module.luma
virtual.opi-tools
service.oled
But when the OLED addon seems to be installed, it shows an error message instead of starting.
Where can I check the log file for more information ?I installed also the XMBC.LCD addon.
I could do the changes in the OLED addon (like driver chip, resolution, etc.)
I could do the changes in the XMBC addon for UTF-8 character set.And please appologize if I ask stupid questions. I'm completely new to any raspberry programming.
Any suggestions.
Best Regards
Tobias
-
Hi again,
I tried to find out more details.
I'm wondering, why i2cdetect results in all adresses, instead of only one adress.
LibreELEC:~ # i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 08 09 0a 0b 0c 0d 0e 0f
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f
70: 70 71 72 73 74 75 76 77 -
Sorry, that I have to answer myself. Cannot edit the post above.
After some google, I found out the i2c behaviour seem to have any issue with a pulled down SDA signal.
Or a flipped SDA / SCLK. In case I flip, all adresses are zero. So this was not the rootcause
Unfortunately, I am now at my parents house and cannot access a scope to see the signal on Pin3.
In worst case I just got delivered a faulty OLED display by amaz*n.
In the past, I had connected a normal LCD, where at least the i2c detect worked well and served a single adress.
So I would assume, the RPI board is not the rootcause.Maybe I give it a try with a SPI connection.
However, it doesn't explain, the issue when I try to install the OLED addon script resulting an error. -
Thanks to LuRu for this addon.
But when the OLED addon seems to be installed, it shows an error message instead of starting.
Where can I check the log file for more information ?Access LibreELEC via SSH to view kodi.log. To make the info easier to find, restart the OLED service first. Go to Settings > Add-ons > My add-ons > Services > Oledproc, then toggle the service off and on again.
SSH to check the log:
ssh root@libreelec
root@libreelec's password:
##############################################
# LibreELEC #
# https://libreelec.tv #
##############################################LibreELEC (community): devel-20251228021942-6f3e0a1 (RK356X.aarch64)
LibreELEC:~ # cat .kodi/temp/kodi.log
From kodi.log when i2C is not activated:
2025-12-28 07:29:48.813 T:984 error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'Exception'>
Error Contents: Cannot connect to OLED display at address 0x3c
Traceback (most recent call last):
File "/storage/.kodi/addons/service.oled/service.py", line 509, in <module>
monitor = BackgroundService()
File "/storage/.kodi/addons/service.oled/service.py", line 460, in __init__
self.oled = Oled(*args)
~~~~^^^^^^^
File "/storage/.kodi/addons/service.oled/service.py", line 108, in __init__
raise Exception(f"Cannot connect to OLED display at address {hex(i2caddress)}")
Exception: Cannot connect to OLED display at address 0x3c
-->End of Python script error report<-- -