So, with upgraded dependencies it works as it should.
Thanks.
So, with upgraded dependencies it works as it should.
Thanks.
No, I have CM4. It should work, but it does not.
I tested the add-on on libreelec 12.0.1 and it does not work.
In the logs I find the following errors:
Error Type: <class 'lgpio.error'>
Error Contents: 'GPIO not allocated'
Traceback (most recent call last):
File "/storage/.kodi/addons/service.oled.cm4/service.py", line 475, in <module>
monitor = BackgroundService()
^^^^^^^^^^^^^^^^^^^
File "/storage/.kodi/addons/service.oled.cm4/service.py", line 429, in __init__
self.oled = Oled(*args)
^^^^^^^^^^^
File "/storage/.kodi/addons/service.oled.cm4/service.py", line 77, in __init__
serial = spi(gpio_DC=dc, gpio_RST=rst,device=spidevice, port=spiport)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/storage/.kodi/addons/script.module.luma/lib/luma/core/interface/serial.py", line 305, in __init__
bitbang.__init__(self, gpio, transfer_size, reset_hold_time, reset_release_time, DC=gpio_DC, RST=gpio_RST)
File "/storage/.kodi/addons/script.module.luma/lib/luma/core/interface/serial.py", line 193, in __init__
self._DC = self._configure(kwargs.get("DC"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/storage/.kodi/addons/script.module.luma/lib/luma/core/interface/serial.py", line 206, in _configure
self._gpio.setup(pin, self._gpio.OUT)
File "/storage/.kodi/addons/virtual.rpi-tools/lib/RPi/GPIO/__init__.py", line 704, in setup
initial = _check(lgpio.gpio_read(_chip, gpio))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/storage/.kodi/addons/virtual.rpi-tools/lib/lgpio.py", line 903, in gpio_read
return _u2i(_lgpio._gpio_read(handle&0xffff, gpio))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/storage/.kodi/addons/virtual.rpi-tools/lib/lgpio.py", line 458, in _u2i
raise error(error_text(v))
lgpio.error: 'GPIO not allocated'
Sorry for wrong information, my oled was connected by i2c and the driver was compiled for this. I don,t remember from where I had it.
Your oled use WS0010 controller, which is different than hd44780.
I use to have a similar display, you could try attached driver.
Change the extension to .so
To respond to myself, the issue with scrolling speed was because I had 3 lines in LCD.xml, should be 4.
Oledproc could be in 3 line configuration, and in this case the display will not show last line. Which is fine.
Hi LuRu,
I put aside the project for a while waiting for a green oled. Now it comes and installed.
I am still looking for the right font to be displayed in a 3 line configuration.
I have some issues with scrolling, as the speed can not be configured, any value selected is the same speed.
What can I do?
To add information, I update to LE 11 and it works fine.
I tested myself with an Technisat CableStar with CI and no way to work. My understanding is the tuner have CI and DIGI cam is CI+.
It works, I can select fonts (and I did) from root filesystem.
Thank you.
Changing the fonts was a tentative to improve how a particular oled will show information and how much is visible from some distance.
I did't think about copyrights, as I download the fonts free from internet.
I understand your concern so to avoid any problem I will keep for myself any changes which may involve copyright issues.
As Libreelec use fonts under public license, maybe a connection (symlink?) with the font folder is usefull.
I did change the font with arial bold, it is better now.
Another picture with progress bar which follows the player.
So it is only LCD.xml that could be changed?
It works with additional edit of lines.
Thank you.
As everything is concentrate on left side of the display, maybe some changes are required to extend the texts to all the space available.
Maybe change the fonts?
I will look about, but here I have none experience.
Attached is the file I have now and working on Pi3.
I want to go back to CM4, should I use your CM4 file as reference?
I think the issue for ssd1322 is solved.
I added a new parameter and oled starts to work.
1322 required mode = '1' as per
luma.oled.device.greyscale.greyscale_device
I will come back to your last version for testing.
This is what I have now:
2022-07-30 15:14:26.350 T:630 ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'ValueError'>
Error Contents: images do not match
Traceback (most recent call last):
File "/storage/.kodi/addons/service.oled/service.py", line 479, in <module>
monitor = BackgroundService()
File "/storage/.kodi/addons/service.oled/service.py", line 432, in __init__
self.oled = Oled(*args)
File "/storage/.kodi/addons/service.oled/service.py", line 127, in __init__
self.device.display(self.image)
File "/storage/.kodi/addons/script.module.luma/lib/luma/oled/device/greyscale.py", line 126, in display
for _, bounding_box in self.framebuffer.redraw(image):
File "/storage/.kodi/addons/script.module.luma/lib/luma/core/framebuffer.py", line 76, in redraw
segment_bounding_box = ImageChops.difference(prev_segment, curr_segment).getbbox()
File "/usr/lib/python3.8/site-packages/PIL/ImageChops.py", line 102, in difference
ValueError: images do not match
-->End of Python script error report<--
2022-07-30 15:14:26.352 T:630 INFO <general>: CPythonInvoker(4, /storage/.kodi/addons/service.oled/service.py): waiting on thread 1464832640
2022-07-30 15:14:26.582 T:627 INFO <general>: SETTINGS: set_keyboard_layout # us
2022-07-30 15:14:26.583 T:627 INFO <general>: SETTINGS: set_keyboard_layout # loadkmap < `ls -1 /usr/lib/keymaps/*/us.bmap`
2022-07-30 15:14:28.075 T:627 INFO <general>: ## LibreELEC Addon ## updates::updateThread ## Started
2022-07-30 15:14:28.077 T:627 INFO <general>: ## LibreELEC Addon ## updates::set_auto_update ## auto
2022-07-30 15:14:28.223 T:669 INFO <general>: SETTINGS: run # Waiting
2022-07-30 15:14:29.150 T:625 INFO <general>: ### [XBMC LCDproc] - Connected to LCDd at 127.0.0.1:13666, Protocol version 0.4 - Geometry 32x4 characters (256x64 pixels, 8x16 pixels per character)
2022-07-30 15:14:29.152 T:625 INFO <general>: ### [XBMC LCDproc] - Driver information reply: OLEDproc
2022-07-30 15:14:29.242 T:646 ERROR <general>: Exception in thread
2022-07-30 15:14:29.243 T:646 ERROR <general>: Thread-6
2022-07-30 15:14:29.243 T:646 ERROR <general>: :
2022-07-30 15:14:29.243 T:646 ERROR <general>: Traceback (most recent call last):
2022-07-30 15:14:29.243 T:646 ERROR <general>: File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
2022-07-30 15:14:29.248 T:646 ERROR <general>: File "/usr/lib/python3.8/threading.py", line 870, in run
2022-07-30 15:14:29.252 T:646 ERROR <general>: File "/storage/.kodi/addons/service.oled/service.py", line 166, in runqueue
2022-07-30 15:14:29.253 T:625 INFO <general>: ### [XBMC LCDproc] - Loading settings from /storage/.kodi/addons/script.xbmc.lcdproc/resources/LCD.xml.defaults
2022-07-30 15:14:29.254 T:646 ERROR <general>:
2022-07-30 15:14:29.254 T:646 ERROR <general>: self.processdata(task)
2022-07-30 15:14:29.254 T:646 ERROR <general>:
2022-07-30 15:14:29.255 T:646 ERROR <general>: File "/storage/.kodi/addons/service.oled/service.py", line 245, in processdata
2022-07-30 15:14:29.255 T:646 ERROR <general>:
2022-07-30 15:14:29.256 T:646 ERROR <general>: self.device.display(self.image)
2022-07-30 15:14:29.256 T:646 ERROR <general>:
2022-07-30 15:14:29.256 T:646 ERROR <general>: File "/storage/.kodi/addons/script.module.luma/lib/luma/oled/device/greyscale.py", line 126, in display
2022-07-30 15:14:29.256 T:646 ERROR <general>:
2022-07-30 15:14:29.256 T:646 ERROR <general>: for _, bounding_box in self.framebuffer.redraw(image):
2022-07-30 15:14:29.256 T:646 ERROR <general>:
2022-07-30 15:14:29.256 T:646 ERROR <general>: File "/storage/.kodi/addons/script.module.luma/lib/luma/core/framebuffer.py", line 76, in redraw
2022-07-30 15:14:29.257 T:646 ERROR <general>:
2022-07-30 15:14:29.257 T:646 ERROR <general>: segment_bounding_box = ImageChops.difference(prev_segment, curr_segment).getbbox()
2022-07-30 15:14:29.257 T:646 ERROR <general>:
2022-07-30 15:14:29.257 T:646 ERROR <general>: File "/usr/lib/python3.8/site-packages/PIL/ImageChops.py", line 102, in difference
2022-07-30 15:14:29.257 T:646 ERROR <general>: ValueError
2022-07-30 15:14:29.257 T:646 ERROR <general>: :
2022-07-30 15:14:29.257 T:646 ERROR <general>: images do not match
2022-07-30 15:14:29.257 T:646 ERROR <general>:
2022-07-30 15:14:29.271 T:625 INFO <general>: ### [XBMC LCDproc] - Loading settings from /storage/.kodi/userdata/LCD.xml
2022-07-30 15:14:29.313 T:630 INFO <general>: CPythonInvoker(4, /storage/.kodi/addons/service.oled/service.py): waiting on thread 1473225344
Display More
Hi,
I will add here some results about tests to be available after vacation, if you prefer we can discuss in private.
I have a spare Pi3+ and make an install.
First, normal error like CM4:
2022-07-30 06:59:15.997 T:871 ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'IndexError'>
Error Contents: tuple index out of range
Traceback (most recent call last):
File "/storage/.kodi/addons/service.oled/service.py", line 477, in <module>
monitor = BackgroundService()
File "/storage/.kodi/addons/service.oled/service.py", line 428, in __init__
args = self.GetSettings()
File "/storage/.kodi/addons/service.oled/service.py", line 450, in GetSettings
rotate =int (addon().getSetting(('rotation4','rotation2','rotation2','rotation3' )[resol]))
IndexError: tuple index out of range
-->End of Python script error report<--
Display More
Try to solve rotate error and declare value 0, as it should be. This error removed.
Next I have server.bind(server_address) error, I resolved by remove server_address and replaced with LOCALHOST, PORT declared as it should be.
After this XBMC LCDproc connect to Oledproc, but there are errors
2022-07-30 10:41:44.867 T:638 ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'ValueError'>
Error Contents: images do not match
Traceback (most recent call last):
File "/storage/.kodi/addons/service.oled/service.py", line 479, in <module>
monitor = BackgroundService()
File "/storage/.kodi/addons/service.oled/service.py", line 432, in __init__
self.oled = Oled(*args)
File "/storage/.kodi/addons/service.oled/service.py", line 128, in __init__
self.device.display(self.image)
File "/storage/.kodi/addons/script.module.luma/lib/luma/oled/device/greyscale.py", line 126, in display
for _, bounding_box in self.framebuffer.redraw(image):
File "/storage/.kodi/addons/script.module.luma/lib/luma/core/framebuffer.py", line 76, in redraw
segment_bounding_box = ImageChops.difference(prev_segment, curr_segment).getbbox()
File "/usr/lib/python3.8/site-packages/PIL/ImageChops.py", line 102, in difference
ValueError: images do not match
-->End of Python script error report<--
2022-07-30 10:41:44.868 T:638 INFO <general>: CPythonInvoker(4, /storage/.kodi/addons/service.oled/service.py): waiting on thread 1464853120
2022-07-30 10:41:45.101 T:633 INFO <general>: SETTINGS: set_keyboard_layout # us
2022-07-30 10:41:45.101 T:633 INFO <general>: SETTINGS: set_keyboard_layout # loadkmap < `ls -1 /usr/lib/keymaps/*/us.bmap`
2022-07-30 10:41:46.588 T:633 INFO <general>: ## LibreELEC Addon ## updates::updateThread ## Started
2022-07-30 10:41:46.590 T:633 INFO <general>: ## LibreELEC Addon ## updates::set_auto_update ## auto
2022-07-30 10:41:46.750 T:676 INFO <general>: SETTINGS: run # Waiting
2022-07-30 10:41:52.163 T:631 INFO <general>: ### [XBMC LCDproc] - Connected to LCDd at 127.0.0.1:13666, Protocol version 0.4 - Geometry 16x4 characters (256x128 pixels, 16x32 pixels per character)
2022-07-30 10:41:52.164 T:631 INFO <general>: ### [XBMC LCDproc] - Driver information reply: OLEDproc
2022-07-30 10:41:52.199 T:653 ERROR <general>: Exception in thread
2022-07-30 10:41:52.199 T:653 ERROR <general>: Thread-6
2022-07-30 10:41:52.199 T:653 ERROR <general>: :
2022-07-30 10:41:52.199 T:653 ERROR <general>: Traceback (most recent call last):
2022-07-30 10:41:52.199 T:653 ERROR <general>: File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
2022-07-30 10:41:52.207 T:631 INFO <general>: ### [XBMC LCDproc] - Loading settings from /storage/.kodi/addons/script.xbmc.lcdproc/resources/LCD.xml.defaults
2022-07-30 10:41:52.220 T:631 INFO <general>: ### [XBMC LCDproc] - Loading settings from /storage/.kodi/userdata/LCD.xml
2022-07-30 10:41:52.222 T:653 ERROR <general>: File "/usr/lib/python3.8/threading.py", line 870, in run
2022-07-30 10:41:52.223 T:653 ERROR <general>: File "/storage/.kodi/addons/service.oled/service.py", line 167, in runqueue
2022-07-30 10:41:52.224 T:653 ERROR <general>:
2022-07-30 10:41:52.224 T:653 ERROR <general>: self.processdata(task)
2022-07-30 10:41:52.224 T:653 ERROR <general>:
2022-07-30 10:41:52.224 T:653 ERROR <general>: File "/storage/.kodi/addons/service.oled/service.py", line 246, in processdata
2022-07-30 10:41:52.233 T:653 ERROR <general>:
2022-07-30 10:41:52.234 T:653 ERROR <general>: self.device.display(self.image)
2022-07-30 10:41:52.234 T:653 ERROR <general>:
2022-07-30 10:41:52.234 T:653 ERROR <general>: File "/storage/.kodi/addons/script.module.luma/lib/luma/oled/device/greyscale.py", line 126, in display
2022-07-30 10:41:52.234 T:653 ERROR <general>:
2022-07-30 10:41:52.234 T:653 ERROR <general>: for _, bounding_box in self.framebuffer.redraw(image):
2022-07-30 10:41:52.234 T:653 ERROR <general>:
2022-07-30 10:41:52.234 T:653 ERROR <general>: File "/storage/.kodi/addons/script.module.luma/lib/luma/core/framebuffer.py", line 76, in redraw
2022-07-30 10:41:52.235 T:653 ERROR <general>:
2022-07-30 10:41:52.235 T:653 ERROR <general>: segment_bounding_box = ImageChops.difference(prev_segment, curr_segment).getbbox()
2022-07-30 10:41:52.235 T:653 ERROR <general>:
2022-07-30 10:41:52.235 T:653 ERROR <general>: File "/usr/lib/python3.8/site-packages/PIL/ImageChops.py", line 102, in difference
2022-07-30 10:41:52.236 T:653 ERROR <general>: ValueError
2022-07-30 10:41:52.236 T:653 ERROR <general>: :
2022-07-30 10:41:52.236 T:653 ERROR <general>: images do not match
2022-07-30 10:41:52.236 T:653 ERROR <general>:
2022-07-30 10:41:52.332 T:638 INFO <general>: CPythonInvoker(4, /storage/.kodi/addons/service.oled/service.py): waiting on thread 1473245824
Display More
I have no idea about what means these.
For example,
### [XBMC LCDproc] - Connected to LCDd at 127.0.0.1:13666, Protocol version 0.4 - Geometry 16x4 characters (256x128 pixels, 16x32 pixels per character)
256x128 should be 256x64?
What else I did, I add to cmdline.txt this:
I attach the service file that i have now.
Hi,
Thank you, I will test it and give feedback.
Please enjoy your vacation, forget this problem, it is not a hurry.
Regards