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

  • Hi, saw new release, but the installer .zip file is missing. just source.zip in the git... is it possible to get the addon installing zip ?

    And on le 12 cant find the addon...

  • Looking at Github: it seems to be a huge update, even a namechange and the need to deinstall the old plugin. I guess we should wait until the plugin is available under the LE Repo and then install after removing the old plugin. I guess configs will get lost too when moving to the "new" plugin?

  • Looking at Github: it seems to be a huge update, even a namechange and the need to deinstall the old plugin. I guess we should wait until the plugin is available under the LE Repo and then install after removing the old plugin. I guess configs will get lost too when moving to the "new" plugin?

    Yes, you will loose config as wrote in GitHub , so brand new install and new config is needed, but you can choice if you want to install the addon from LE repo or the GitHub manual installation , but in the GitHub ( untill today ) there's only the source code only and not the zip install. Surly we will see the LE addon and the installer from github in a few days. Will need time , even on other assets the source came before and later the installer ,so ..guess will have to wait.. must say thanks he did a good job making this addon and setup directly on LE repo !

    Edited once, last by firefox (March 24, 2025 at 10:10 AM).

  • All changes will be done in next LE release. it's at reviewing point on LE master github.

    So for the moment will just have to use 1.1.5 waiting until the changes are pushed up. Just a matter of time....

  • Version 1.1.7 released:

    • add-on id has changed, as a prerequisite for the upcoming integration into the LibreELEC add-ons repository
    • because the id change was required, also the name has changed to distinguish better from the outdated official add-on variations 0.0.1 from Argon40
    • icon changed

      New name: Argon ONE Control

      For more details please read the documentation at GitHub entirely.

      The add-on has been under review for approx. 2 months because, among other things, the ID had to be changed. One consequence of this is that an existing older version must be removed before a newer version than 1.1.5 is installed. However, the current customised settings are lost in the process. This is only necessary once.

      The release process is not yet complete. Only then will it become available in the LE add-ons repo. I hope that no further adjustments are necessary so that it can be included.

  • It should be updated automatically when a newer version is available in the repo. But without a version of the add-on available via the repo, I could not verify this yet. Normally this works if the last digit is increased by at least 1. But currently the count of digits in the version string differs 1.1.7 (GitHub) vs. 1.1.7.0 (Repo). So the final answer is outstanding, or the behaviour must simulated with another installed plugin.

  • Just install from the repo over the top of the existing add-on and then future updates from the repo will auto-update things.

    The LE13 addon is now merged. Let's see if all is okay and then we'll merge to LE12 too.

  • HarryH

    i had to activate a "hidden" feature in your plugin to deactivate the IR Reciever in the Argon case. I had double inputs cause of a existing USB Receiver (which i want to keep) I guess i will run into the same problem again when i completely deinstall the plugin and install the new one. Would you to build in a switch in the GUI to deactivate the IR Receiver in the Argon case?

    found it: after "touch /storage/.config/argon40_rc.lock" the IR Receiver in the argon case is ignored. Does this still work with >1.1.8 after the name change of the plugin or does the lock file need to be adapted? (name)