2023-03-05, 15:47
2023-05-29, 19:11
Hello,
This is the functionality that I've been looking for some time!
My KODI runs on LibreELEC 9.2.8 and RPi 3B which is connected to a Samsung TV.
Now, I cannot make this add-on work. In the Screensaver session I tried all the available setting, but Preview didn't react.
KODI is mostly controlled by the TV's remote (via CEC), so at least that was supposed to work.
Is there anything more I can try?
Thank you!
This is the functionality that I've been looking for some time!
My KODI runs on LibreELEC 9.2.8 and RPi 3B which is connected to a Samsung TV.
Now, I cannot make this add-on work. In the Screensaver session I tried all the available setting, but Preview didn't react.
KODI is mostly controlled by the TV's remote (via CEC), so at least that was supposed to work.
Is there anything more I can try?
Thank you!
2023-05-30, 01:11
(2023-05-29, 19:11)tinca Wrote: Hello,
This is the functionality that I've been looking for some time!
My KODI runs on LibreELEC 9.2.8 and RPi 3B which is connected to a Samsung TV.
Now, I cannot make this add-on work. In the Screensaver session I tried all the available setting, but Preview didn't react.
KODI is mostly controlled by the TV's remote (via CEC), so at least that was supposed to work.
Is there anything more I can try?
Thank you!
Did you go to settings - interface - screensaver and set screensavermode to Turn Off?
2023-05-30, 13:57
2023-05-30, 14:06
Strange it works fine for me also on Libreelec Rpi but LE11 not LE9 altough it was always working since 9..I just use the cec option..
2023-05-30, 17:49
Code:
LibreELEC:~ # kodi-send --action="CECStandby"
Sending: {'content': 'CECStandby', 'type': 'action'}
2023-05-30, 19:27
Iff that works...addon should be working...you might need to post a log...
Are you using an official LE built?
Are you using an official LE built?
2023-05-30, 19:39
Yes it is the official 9.2.8 created by the LibreELEC image creator.
Before creating a log a sanity check: I want it to use for switching off the TV during music playback to save energy. Until a year ago I used this LELEC version 9, and as far as I remember I could switch off the TV (with the remote using CIC) and the play went on. Then used version 10 for a while, but had some problem with it, so reinstalled 9. But now I cannot do the same setup, switching off the TV turns off the music as well. That's why I am trying this add-on.
Before creating a log a sanity check: I want it to use for switching off the TV during music playback to save energy. Until a year ago I used this LELEC version 9, and as far as I remember I could switch off the TV (with the remote using CIC) and the play went on. Then used version 10 for a while, but had some problem with it, so reinstalled 9. But now I cannot do the same setup, switching off the TV turns off the music as well. That's why I am trying this add-on.
2023-05-30, 19:41
One more thing: when I execute your command line during playback, it switches off the TV, but stops the playback as well, although I unticked the related option.
2023-05-31, 02:12
Ok now I m understanding better what you need it for..but I think you cannot do that as CEC standby puts the TV on standby and that means also the speakers...
Your solution is this:
1) You output your sound to something else rather then the TV speakers and that has to be directly from Raspberry pi...You either use a bluetooth speaker or a sound system that connects to the raspberry pi via hdmi passtrough then from sound system to TV...another option is to connect audio from the headphone jack...
2) you go to Settings->System->Input->Peripherals->CEC Adapter->Action when switching to another source-> Ignore or None (whatever is available)
Then switch OFF your TV normally from remote and sound is still coming out of your speakers..
Your solution is this:
1) You output your sound to something else rather then the TV speakers and that has to be directly from Raspberry pi...You either use a bluetooth speaker or a sound system that connects to the raspberry pi via hdmi passtrough then from sound system to TV...another option is to connect audio from the headphone jack...
2) you go to Settings->System->Input->Peripherals->CEC Adapter->Action when switching to another source-> Ignore or None (whatever is available)
Then switch OFF your TV normally from remote and sound is still coming out of your speakers..
2023-05-31, 08:51
Thank you for helping me way beyond the scope of this thread :-)
And my apologies that I did not make it clear up front what I am up to. Still, there is the other half of this story: I have a DAC on my RPi and the sound is outputted into an external amp. I do not know if it has any relevance, but with this reinstalled LELEC version there came another change I do not recall to have earlier: the sound device of the DAC (smth like snd_hifiberry_rpi_dac) is supposed to work, but it does not, instead it works with Pi:HDMI (of course I configured the card as it was prescribed). It seems to be a strange thing.
And my apologies that I did not make it clear up front what I am up to. Still, there is the other half of this story: I have a DAC on my RPi and the sound is outputted into an external amp. I do not know if it has any relevance, but with this reinstalled LELEC version there came another change I do not recall to have earlier: the sound device of the DAC (smth like snd_hifiberry_rpi_dac) is supposed to work, but it does not, instead it works with Pi:HDMI (of course I configured the card as it was prescribed). It seems to be a strange thing.
2023-05-31, 18:58
(2023-05-31, 08:51)tinca Wrote: Thank you for helping me way beyond the scope of this thread :-)That seems a good setup if you need sound output while TV is on standby..
And my apologies that I did not make it clear up front what I am up to. Still, there is the other half of this story: I have a DAC on my RPi and the sound is outputted into an external amp. I do not know if it has any relevance, but with this reinstalled LELEC version there came another change I do not recall to have earlier: the sound device of the DAC (smth like snd_hifiberry_rpi_dac) is supposed to work, but it does not, instead it works with Pi:HDMI (of course I configured the card as it was prescribed). It seems to be a strange thing
About your hifiberry issue I suggest you ask on the Libreelec forum..
2023-07-11, 03:51
I had a more specific need for such a screen saver due to my dumb Philips monitor that always auto-switches between video signal inputs. Therefore I started to hack a little bit the source code of this add-on, considering to share my experience here.
I have a setup where I'm using Kodi (Matrix) mainly for playing audio streams (internet radio) in the background during the day and sharing a single monitor for both Kodi, running itself on a Linux thin client connected on DP and my workstation connected on HDMI.
Now, if my workstation puts the screen in standby, the dumb Philips monitor auto-switches (cannot disable the function - stupid OSD - made in China) to the next available video input - an that'll be Kodi on DP.
First, the only reliable way to suspend the monitor on Linux (x86) looks to be using xrandr and the code from this add-on is broken (simple Python syntax and xrandr arguments, both are wrong).
I used this package and unzipped it:
https://github.com/add-ons/screensaver.t...trix.1.zip
Edited the file screensaver.py - see here the source online:
https://github.com/add-ons/screensaver.t...ensaver.py
Not a Python coder myself, quite the contrary - a total noob, but learned from here the proper syntax for executing command line programs with arguments (need to split all arguments):
https://docs.python.org/2/library/subpro...onstructor
So, in screensaver.py I commented the nonfunctional CRT-0 related lines and substituted with mine:
Note that to enable the display with xrandr you have to use auto and not on. Then, to learn which video output (in my case Display Port 1) you're using - run on the console:
Packed back the Addon zip file and side loaded it (Add-ons - install from ZIP file) into Kodi. Tested it and all worked fine (had to disable mute audio in the Addon config).
All worked fine except that it didn't execute while I was playing audio streams because for a reason I don't fully understand, the developer considered to add a conditional checking at the end of screensaver.py.
It checks the state of the player and if it's in use (playing) with some media, then it doesn't start the screensaver
But all this logic and conditional checking is already available inside Kodi. And, Kodi itself doesn't start the whatever screensaver is installed if video media is played, it does only for audio playback if no visualization is active (which makes perfect sense).
Now, before further butchering screensaver.py, I tried to just substitute the checking for Player.HasMedia with Player.HasVideo and failed - see the reference:
https://xbmc.github.io/docs.kodi.tv/mast...tions.html
Finally I did the "right thing" and commented the whole useless conditional checking at the end of screensaver.py
See:
https://github.com/add-ons/screensaver.t...ensaver.py
Now I have a functional ScreenSaver that activates on idle and when playing audio without visualizations.
I have a setup where I'm using Kodi (Matrix) mainly for playing audio streams (internet radio) in the background during the day and sharing a single monitor for both Kodi, running itself on a Linux thin client connected on DP and my workstation connected on HDMI.
Now, if my workstation puts the screen in standby, the dumb Philips monitor auto-switches (cannot disable the function - stupid OSD - made in China) to the next available video input - an that'll be Kodi on DP.
First, the only reliable way to suspend the monitor on Linux (x86) looks to be using xrandr and the code from this add-on is broken (simple Python syntax and xrandr arguments, both are wrong).
I used this package and unzipped it:
https://github.com/add-ons/screensaver.t...trix.1.zip
Edited the file screensaver.py - see here the source online:
https://github.com/add-ons/screensaver.t...ensaver.py
Not a Python coder myself, quite the contrary - a total noob, but learned from here the proper syntax for executing command line programs with arguments (need to split all arguments):
https://docs.python.org/2/library/subpro...onstructor
So, in screensaver.py I commented the nonfunctional CRT-0 related lines and substituted with mine:
Code:
dict(name='dpms-xrandr', title='DPMS (using xrandr)',
function='run_command',
# args_off=['xrandr', '--output CRT-0', 'off'],
# args_on=['xrandr', '--output CRT-0', 'on']),
args_off=['xrandr', '--display', ':0.0', '--output', 'DP-1', '--off'],
args_on=['xrandr', '--display', ':0.0', '--output', 'DP-1', '--auto']),
Code:
xrandr -display :0.0 -q
Packed back the Addon zip file and side loaded it (Add-ons - install from ZIP file) into Kodi. Tested it and all worked fine (had to disable mute audio in the Addon config).
All worked fine except that it didn't execute while I was playing audio streams because for a reason I don't fully understand, the developer considered to add a conditional checking at the end of screensaver.py.
It checks the state of the player and if it's in use (playing) with some media, then it doesn't start the screensaver
But all this logic and conditional checking is already available inside Kodi. And, Kodi itself doesn't start the whatever screensaver is installed if video media is played, it does only for audio playback if no visualization is active (which makes perfect sense).
Now, before further butchering screensaver.py, I tried to just substitute the checking for Player.HasMedia with Player.HasVideo and failed - see the reference:
https://xbmc.github.io/docs.kodi.tv/mast...tions.html
Finally I did the "right thing" and commented the whole useless conditional checking at the end of screensaver.py
See:
https://github.com/add-ons/screensaver.t...ensaver.py
Code:
def run():
''' Runs the screensaver '''
# from xbmc import getCondVisibility
# If player has media, avoid running
# if getCondVisibility("Player.HasMedia"):
# log(1, 'Screensaver not started because player has media.')
# return
TurnOffDialog('gui.xml', addon_path(), 'default').doModal()
Now I have a functional ScreenSaver that activates on idle and when playing audio without visualizations.