Posts by Da Flex

    I've been installed a power button and a status LED on my RPi3B+. This works for RPi4B, too. After SSH login, you can use the nano editor to create or edit all necessary files.

    Power Button Hardware Part

    Use GPIO03 (Pin #05) and the opposite Ground (Pin #06) to connect a push button for power on / off.

    Power Button Scripting Part

    Add dtoverlay=gpio-shutdown to config.txt.

    Switching off will let the shutdown menu appear.

    To shutdown instantly instead, create this /storage/.kodi/userdata/keymaps/keyboard.xml:

    Code
    <keymap>
        <global>
            <keyboard>
                <power>shutdown</power>
            </keyboard>
        </global>
    </keymap>

    Status LED Hardware Part

    Use GPIO13 (Pin #33) and the opposite Ground (Pin #34) to connect an LED. Also use a resistor with 330 Ohms or more.

    Status LED Add-On Part

    Install the Raspberry Pi Tools add-on to use the GPIO programming library in Python.

    Status LED Scripting Part

    The status LED will be triggered from autostart.sh, which calls the Python script status_led.py . It will switch off automatically at shutdown, no script action required for this part.

    Create this /storage/.config/autostart.sh :

    Bash
    #!/bin/sh
    
    (
        python /storage/scripts/status_led.py
    ) &

    Create this /storage/scripts/status_led.py :

    Reboot.

    Thank you but I am not sure if that can be the case either as libreelec is perfectly working fine on the same tv with rpi2 andd 3's.

    I think it's possible, because CEC data is merged into A/V data. RPi4B uses a different graphics driver to deal with higher resolutions and two HDMI outs. CEC signals have to be filtered out of the HDMI stream, before CEC adapter can handle it.

    Thank you - I've tried that already but it doesnt work - changed 5 different cables but no luck :(

    OK, then it's probably not the HDMI cable.

    My final idea is that your TV uses special CEC codes, which are not yet implemented for RPi4B.

    You could write a bug report, and become a part of the solution.

    Write the full TV model name, and give a link to this thread, so devs can know about what you already did.

    HDMI is a standard, and the only parameter that could really change between devices is data transmission speed.

    My advice is to take the HDMI cable from the working TV, and plug it into the not working one. Just to be sure it's not the cable. As you know, some HDMI cables are ready for high speed, and others are not, so CEC data could get lost.

    I had the safe mode bug today at LE 9.1.002 (RPi3B+).

    It happened after I've been added the Kodi Nerds repo, and installed / uninstalled "Amazon Prime Music" from there.

    After shutdown and power on I went into safe mode.

    I did a reboot from SSH, and normal mode worked again. Maybe it helps to find the bug.

    I do something similar, but just to reboot Kodi. Since I use another programs in background and If I not reboot Kodi will be slowly with the past of days. What I wished is do this, automatically, based on tv power on/off, and just Kodi, not LibreELEC.

    But I think this is impossible.

    I think it could work. Use the RPi always-on for CRON, and switch Kodi / tvservice (HDMI) on / off with a button connected to GPIO.

    I found this, but how I can do this automatically for when I turn tv on?

    The major problem is that you disable CEC when you switch HDMI off.

    If you're familiar with electronics, you could install an infrared receiver element on your RPi. So you can turn HDMI on by IR code.

    An easier solution is to install a push button, and listen to it by an autostart script (similar to the well known power button on RPi).

    Take into account that an RPi Zero is cheap, and you can even run LE on it just for CRON jobs.

    To run LE headless, switch HDMI off from autostart.sh. As I already mentioned, switching off works.

    In theory you can switch HDMI off and on by using the "tvservice" command with the appropriate options. That would save energy. I was playing around with that command a couple of month ago, but I was not successful to switch HDMI on after switching it off. Maybe it's working with the current LE version.

    Or you could buy another RPi, and run one of them headless (Raspbian) for your CRON services. Install a power button on the other one, where you run LE.

    I had a safe mode issue, too, shortly with LE 9.1.002. I think it was triggered by a settings change I made.

    I have been changed "Settings -> Services -> General -> Device name". My advice is to keep this setting untouched at "Kodi".

    It just shows bad forum sw or at least spam protection. I don't see as much spam on other forums I visit. There is zero spam on a most of them actually.

    Yes, I've never seen that much spam in other forums, too. Maybe LE is a threat for Chinese settop box companies.