I created two new addons for Orange Pi (Allwinner) boards.
Both are for Kodi 19 (Matrix) only.
The first is "Orange Pi Tools". This is actually the OrangePi.GPIO library (binary) for controlling GPIO using Python3.
The second is the "Orange Pi Cooling Fan". It uses the above library and controls the fan based on the CPU temperature.
The Source_addon_virtual.opi-tools-001.zip file is the source. Most people won't need that. Just in case you want to make some adjustments and compile yourself. After unpacking, two new folders will be created. The "opi-tools-depends" folder must be placed in the ".../http://LibreELEC.tv/packages/addons/addon-depends/" folder and the "opi-tools" folder should be placed in the ".../http://LibreELEC.tv/packages/addons/tools/".
Then you can compile by entering the command (for example): "PROJECT=Allwinner ARCH=arm DEVICE=H6 scripts/create_addon opi-tools".
Addon is ready in the Compiled_addon_virtual.opi-tools-001.zip file (separately for H6 boards and separately for others).
The service.fan.orangepi-0.0.1.zip file is the addon "Orange Pi Cooling Fan".
I hope someone will be interested in it.
EDIT 2021-07-09:
I found that there is an bug in the OPi.GPIO library. There does not work properly calling of callbacks when mode == GPIO.BOARD. The bug is fixed in release 0.6.4.0.
Subsequently, I also created a corresponding new version of the virtual.opi-tools add-on. It is here:
Source_addon_virtual.opi-tools-002.zip
Compiled_addon_virtual.opi-tools-002.zip
EDIT 2021-08-23:
I found some bugs in the original library Jeremie-C/OrangePi.GPIO:
1) The control of pins belonging to the PL bank and higher does not work at all.
2) Pin status reading GPIO.input(channel) does not work properly, when edge detection GPIO.add_event_detect() is activated on the same channel (this problem only occurs with H3).
I fixed both bugs in my fork Pako2/OrangePi.GPIO.
Subsequently, I also updated the Orange Pi Tools add-on, which uses the library.
I also made a minor fix in the Orange Pi Cooling Fan add-on.
All new versions of add-ons are here:
Source_addon_virtual.opi-tools-003.zip