[RPi4] Argon One Case Shutdown

  • In case of the Argon40 addon it is used to observe the shutdown pin GPIO4 for an incoming pulse. This pulse will be generated by the MCU at the pcb of the Argon ONE if:

    - Remote control power off command signal has been detected
    - The power button at the back side of the case has been double tapped
    - The power button at the back side of the case has been hold for 3 seconds at least, but shorter than 5 seconds

    The pulse time for double tap is 20-30ms, for the other ones is 40-50ms. If one of these is detected by the addon, KODI and therefore the operating system will be informed by the addon immediately to initiate a reboot or a shutdown, depending of the mapped event to the pulse time. The shutdown signal is the more critical moment and cannot be skipped, as the MCU starts an internal timeout of approx. 10 seconds until it switches off the power - regardless of whether KODI/the operating system is ready or not. Additionally, KODI has an internal timeout until it tries to kill running threads after 5 seconds during process stopping. But this seems counterproductive in the case of the default Python modules lgpio and gpiozero (due to some bugs) and leads to a fixed timeout of 30 seconds for the KODI process.

    That is the reason to have a library which is able to fast release the resources (below the KODI 5 seconds limit) to have mostly a properly shutdown.

    EDIT:
    Okay, after reading again. If you're thinking in terms of extending functionality using the GPIOs, it's up to you to find some real-world applications. Like rolling or unrolling canvases, triggering an actuator for a fire extinguisher above the housing or something like that. ;)

    Edited once, last by HarryH (January 11, 2025 at 4:50 PM).

  • Not sure if this is the place to get help with this plugin.

    I'm running LE12 on a raspberry pi 5 using an argon one v3 case with an nvme installed.

    my config.txt


    The I2C isn't detected.


    The link to my log
    https://paste.libreelec.tv/literate-snapper.log

    I was previously trying the argon one libreelec script with some modifications
    https://download.argon40.com/argonone-setup-libreelec.sh

    all argonone services should be stopped and removed

    still no fan control

  • I can see some possible culprits in your config.txt. But it could be, that you have a general issue with I2C currently.

    It's a typo in the documentation of Argon40. If you want to force the PCIe speed to Gen 3, the line should show like this.

    Code
    dtparam=pciex1_gen=3

    For the troubleshooting purposes, please comment out the last 3 lines via a hashtag in your config.txt first:

    Code
    #dtparam=i2c_arm=on
    #dtparam=i2c_vc=on
    #dtoverlay=i2c-bcm2708

    Please don't forget to reboot after that changes, connect to LE via SSH and try the following:

    • Stop KODI service
      systemctl stop kodi
    • Check the current I2C state.
      i2cdetect -y 1

    Please post the output of the i2cdetect command. If the address 0x1a isn't populated, make the case some seconds powerless (unplug the power supply) and try again afterwards.

    EDIT: Your log looks like, that you have installed some banned components which are in conflict with the forum rules. Please do not expect any further support until you come back with a fresh install without such things.

    Edited 2 times, last by HarryH (January 19, 2025 at 4:22 PM).