How to modify jane_t fanshim add-on to work with Kodi 19 Milhouse builds

  • Download jane_t fanshim LE addon here GitHub - jane-t/rpi-fanshim: Add on for Kodi on Raspberry Pi to control the Pimoroni Fanshim allowing the CPU temperature to be used to turn the Fan on and off.

    Extract the zip and modify the following 3 lines in the addon.xml file so they look like below (lines 7, 8, and 9 in the addon.xml file)

    Code
            <import addon="xbmc.addon" version="14.0.1"/>
            <import addon="xbmc.python" version="3.0.0"/>
            <import addon="virtual.rpi-tools" version="9.80.3.107"/>

    Modify the service.py file and modify the following 2 lines so they look like below (lines 37 and 38 in the service.py file)

    Code
    datapath = xbmc.translatePath(selfAddon.getAddonInfo('profile'))
    addonfolder = xbmc.translatePath(selfAddon.getAddonInfo('path'))

    re-compress the folder rpi-fanshim-master to a zip file. The rpi-fanshim-master.zip when you browse into it must show a folder called rpi-fanshim-master and inside that folder will be the 5 files and 1 folder called resources.

    Upload the zip into your Kodi 19 Millhouse Alpha add-ons.

    I mainly use the basic music and movie/tv-show features in the Kodi from my own original media and I find the current build I am on works better with the RPi4 and wanted fanshim to work.

    This is the current milhouse build I am using - LibreELEC-RPi4.arm-9.80-Milhouse-20200427235841-#0427-gdfae527.tar

    Once again a huge thanks to jane_t for the fanshim script. and a huge thanks to milhouse for the work he does.

    Greg

  • I moved to Kodi20 and I see the fanshim py file is not updated.

    Modify the service.py file and modify the following 2 lines so they look like below (lines 37 and 38 in the service.py file)

    Code

    Code
    datapath = xbmcvfs.translatePath(selfAddon.getAddonInfo('profile'))
    addonfolder = xbmcvfs.translatePath(selfAddon.getAddonInfo('path'))

    You basically need to add vfs to xbmc otherwise the plugin will exit with an error.

    Luca

  • I moved to Kodi20 and I see the fanshim py file is not updated.

    Modify the service.py file and modify the following 2 lines so they look like below (lines 37 and 38 in the service.py file)

    Code

    Code
    datapath = xbmcvfs.translatePath(selfAddon.getAddonInfo('profile'))
    addonfolder = xbmcvfs.translatePath(selfAddon.getAddonInfo('path'))

    You basically need to add vfs to xbmc otherwise the plugin will exit with an error.

    Luca

    I did that and at least the error is not showing anymore but I will have to see if it still works as intended. Where did you set the trigger temperatures?