Updated to support both LibreELEC 9 and 10
any clue if you will be updating this addon to work with LE11 and LE12?
Thanks
Updated to support both LibreELEC 9 and 10
any clue if you will be updating this addon to work with LE11 and LE12?
Thanks
Display MoreHi,
Pretty new to LibreElec, moved to a Raspberry Pi 5 recently to solve a very specific audio issue and it's working wonderfully.
On previous hardware/kodi installs the device would power on & off with the TV via CEC.
From my reading here that's not possible(to power on at least) with the Pi, it needs to remain on? Which is fine, but as I run a shared network database between multiple devices locally - what I'd like to happen is when the tv powers up, to run the ReloadSkin() function so that any database updates & recently added files are reflected, which would usually happen when a deviced boots up along with the TV.
Does anyone know is such a thing possible?
Appreciate any info/pointers, before looking to external automation solutions.
Thanks
You will have to create some script yourself listening for power status and running skin refresh...it's possible but you probably won't find anything ready..
To give you some ideas about how you check for cec power status
cec-ctl --device 0 -S | grep 'Power Status'
and to refresh skin
kodi-send --action="ReloadSkin()"
That looks complicated. Maybe I'll just stick to the cheap remote for now. Reading that thread it says kodi does not recognise the OK key and expects the enter key. That would seem like an odd omission in kodi not to responding to the OK key on a remote, rather than just treat it as the enter key by default.
The OK button works if I turn on the Air Mouse Function via a button on said remote, and stops when I turn Air mouse off via the same button. Therefore I am not fully convinced the remote is actually sending anything when I turn the Air Mouse off which would explain why I could not get the keymap editor to remap it.
Can anyone recommend a high quality 2.4G remote with dongle, with a keyboard on the rear ?
All you need to do is in post #9..shouldn't take more then 15 minutes...you have a good explanation there..
First thing I tried was the keymap editor but I still could not get it to respond to the OK button and map it to the Enter key. I will try again when I have a bit more time and hook up a regular mouse to give me mouse control as I am wrestling with the remote and the air mouse function.
Here
and here is how you do it post #9
Good catch..well done and I could never think of that..tryed lots of options which didn't work.
In the meantime I got myself a little xmas present a RPi 5 4gb which happens to have a fan pwm output and button builtin which where the 2 items I was using gpio pins for but nevertheless I will test your workoround and hopefully this post will help others till a fix comes out.
Hard to say as you didn't post your addon/script but it could be that you may be experiencing this issue https://github.com/LibreELEC/LibreELEC.tv/issues/8447 (which isn't directly related to rpi-tools/gpiozero)
so long,
Hias
Well here is one of the gpiozero scripts I m running perfectly on LE 11.0.4 It might not be perfect and I m not a coder by anyway but it just works..
https://paste.libreelec.tv/deep-rhino.log
Not a debug log but shows lots of gpio errors....fan script is in this instance ran from a script addon but same errors if ran from system.d or autostart
Look at my experience here: RE: LE 12 Nightly - RPI tools add-on issue
Looks like exactly same issue I'm having...I just got some gpiozero scripts running...fan,leds,buttons etc..any idea what's the way forward...I'm back on LE11 for now till I get a better understanding of what s going on...you don't seem you found any solutions on that thread either?
Thanks for your reply..
Now that you replyed I m testing further and it looks like the issue is something else...
Both my scripts are working on latest LE12 and rpitools 11.80.3.1..issue is they r not starting anymore neither from their system.d service I always used and even from autostart..They do start from ssh and work normally..
Is there any known issue with Raspberry Pi Tools on LE12 and gpiozero libraries...
Last working version of Raspberry Pi Tools is 11.80.3.0 and only works until LibreELEC-RPi2.arm-12.0-nightly-20231116-19d37e2.img.gz (sha256)
If you update LE to following LE12 versions it won't work...tryed all of the 7 following nightlies till today..
Following version 11.80.3.1 won't start any of my gpiozero scripts..system.d service keeps restarting.
I have a Bluethood remote control left over from a Firetv stick.
How do I integrate it with Libreelec?
Is there tool for file search like "whereis", "locate" or similar from Linux
If you'r just looking for a file you will need to do that from SSH..
Otherwise if you mean search for items in Kodi library you have the search option in the Kodi library menu..
Make your own script...do you know which gpio is this fan using for control?
Ok I see looks like the board is controlling the speed and is a 2 wired fan..sorry not sure then...if it was mine I would just disconnect fan from argon board and add a transistor and connect directly to gpios
This is much to deep water for me, if there is a typo, i won't regognize that and drowning would be likely. For instance: They are counting the GPIO headers in my option the wrong way arround. i would say that there button is connected on pin 13 and 14.
But I am so in experienced, that my pin 5 and 6 probably are 35 and 36
I changed that as your wiring if you look on my post above
use_button=3
as Da Flex pointed out Pin 5 is GPIO 03 as gpiozero uses gpio numbering..
So you keep using pin 5 (+) and 6 (-)
Mario77 : downloaded the zip and tried to install it, but unable to.
Which zip?
I didn't mean you just download that zip and install it...
but on previous post I made you a small modified script that will work..
You ll need to create a system.d service that start the script or use autostart.sh to start it..
This you can play around how you want ex changing the when released function to something like
def rls():
global held_for
if (held_for > 3.0):
check_call(['/sbin/poweroff'])
else:
check_call(['/sbin/reboot'])
this will exec shutdown if held more then 3 seconds or reboot if less...
You got plenty of options to playwith...ex my switch has an led built into it and it can blink or fade or whatever you want it to do but for that you ll need an npn transistor.
input settings-peripherals
Mario77 : How do I do that, where do i find an exact discription to do that?
Will look something like this
Taken from here just changed few bits to work with LE..
You ll need to install Rpi Tools addon for this to work..
#!/usr/bin/python3
import sys
sys.path.append('/storage/.kodi/addons/virtual.rpi-tools/lib')
from gpiozero import Button
from signal import pause
from subprocess import check_call
use_button=3
held_for=0.0
def rls():
global held_for
if (held_for > 5.0):
check_call(['/sbin/poweroff'])
elif (held_for > 2.0):
check_call(['/sbin/reboot'])
else:
held_for = 0.0
def hld():
# callback for when button is held
# is called every hold_time seconds
global held_for
# need to use max() as held_time resets to zero on last callback
held_for = max(held_for, button.held_time + button.hold_time)
button=Button(use_button, hold_time=1.0, hold_repeat=True)
button.when_held = hld
button.when_released = rls
pause() # wait forever
Display More
Hello #Mario77... It seems that you are good at Linux coding. I am not that good at Linux/LE, and i have make few changes through SSH, so i know what it is ans so. Today i have Generic AMD/Intel/NVIDIA (x86_64) installed on a PC, and it is connected to a UPS that support it at a power break. My idea was to make a script or so like: "if LAN/ethernet goes down start shutdown.sh" or something like that. Thought there was an "power manager addon" that has a function for my idea, but can not find any. Best regards from Thore in Sweden
Hi,sorry can't help you much with that..I mostly play with my Rpi but have no idea about Generic AMD/Intel/NVIDIA (x86_64)