argon40 case & python script for fan control - problem with LE 10 beta

  • Hi, I'm a new user of LE (but not Linux) and I am trying to get a python script to have the fan work.

    Can't say it worked before, it's all new to me. Latest LE 10 beta. I used their version of the script for LibreElec at

    https://www.argon40.com/learn/index.ph…e-for-libreelec

    I suppose it works on the stable version.

    I can execute the script thought SSH without any problem (so probably not an issue with python3), but systemd cannot run it correctly.

    Even restarting the service doesn't work.

    The error though systemd execution is :

    Apr 30 21:51:57 LibreELEC python[1963]: ImportError: libi2c.so.0: cannot open shared object file: No such file or directory

    Apr 30 21:51:57 LibreELEC python[1963]: import smbus

    Apr 30 21:51:57 LibreELEC python[1963]: File "/storage/.config/argononed.py", line 4, in <module>

    But the file is there in /storage/.kodi/addons/virtual.system-tools/lib/

    It looks like the python script can't import smbus as python can't find the file (only under systemd), and I have no idea why.

    Anyone has any idea ? Is there something special at play here with LE 10 ?

    Edit:

    I was able to use the autostart.sh trick mentioned in another thread, so at least I should have the fan working when it gets hot.

    But that problem with the library is still unsolved.

    Edited once, last by martinm1000 (May 1, 2021 at 6:04 AM).

  • The environment is not set in service, Change to:

    Code
    ExecStart=/bin/sh -c ". /etc/profile; exec /usr/bin/python /storage/.config/argononed.py"