Posts by Mario77

    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..

    Code
    find / -name looking_for_this.log

    Otherwise if you mean search for items in Kodi library you have the search option in the Kodi library menu..

    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

    Code
    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.

    Mario77 : How do I do that, where do i find an exact discription to do that?

    easy enough


    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..

    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)

    Just create a small script and run this

    You can probably also set the calbacks addon to "on playback started" and on "playback stopped"


    You need something like Callbacks addon..

    You have many options in addon to choose from...you just need to run a small script on play media..

    Assuming your songs are in a folder called Music or Songs and you know how to connect relay etc this is all you need to run..

    something like this...

    I think LE11 nightlies are already on 20.2..have a look

    Code
    2023-07-06 10:20:19.904 T:837      info <general>: Starting Kodi (20.2 (20.2.0)                                                                                                                                    Git:20.2-Nexus). Platform: Linux ARM 32-bit
    2023-07-06 10:20:19.904 T:837      info <general>: Using Release Kodi x32
    2023-07-06 10:20:19.904 T:837      info <general>: Kodi compiled 2023-07-02 by G                                                                                                                                   CC 12.2.0 for Linux ARM 32-bit version 6.1.36 (393508)