Using Fanshim software on KodI libreElec

I was hoping to install the Fanshim Daemon on my pi4 to control the fan. How ever libreElec is locked down. Does anyone know if it’s possible to get the Daemon on with out using git.

2 Likes

I can’t answer that question directly but just FYI. The fan on the fan shim will just run continuous if you install the shim and skip installing the software.
The LED doesn’t work but the button does. Its how mine is currently setup. My temps even when my Pi 4 is working hard are right around 40c.

Thanks alphanumeric , I do have it working OK, I would have liked to have controlled it based on temperature. I suspect the best way to integrate it would be to write a Kodi Add in which included the code, but I am not sure my Python skills are good enough. Although I have been a developer for 35 years I mostly code on php and iSeries systems and am getting too old to learn new stuff.

1 Like

I’ve been learning as I go, Python wise. I learn a little more with each new gismo I buy.
What happens if you run, sudo pip install fanshim? Or a better question, can you run pip?

No I can’t run Pip or Sudo or Git or apt-get on LibreElec

1 Like

I think your out of luck then, You need to install the python library for the fan shim to do anything with it in python.

Me too , i’ve been looking for quite a while. You would think Pimoroni would have written a tutorial? Libreelec is a very common distro for Rpi.

There are people that have resolved this but their instructions are only usable if you’re tech savvy. Someone at Pimoroni should write an idiots guide otherwise it’s only a raspbian fan. Below are links to what I’ve found.

Ephumeris on the Libreelec forum has it working and has offered help when he has time. If he sends me a guide I’ll repost it on this thread.

http://www.philrandal.co.uk/blog/archives/2019/07/entry_214.html

Hope this helps and you are able to get the fanshim working, and then hopefully you’ll be able to help me with the idiots guide to the PIMORONI FANSHIM that this forum needs

Another possible issue is that Libreelec 9 for Rpi 4 is still only beta testing ,so until rc any updates are likely to need the fanshim parameters to reset each update. if the fanshim is to be useful, libreelec users will need to learn how to do this, possibly quite regularly.

In answer to your reply re: SSH and samba I’ve had to reply as an edit as new users are limited to 3 posts…so…Cool, thanks and good luck, I also have them set up (SSH and samba) I just don’t know how to use em, Lol . i’ve linked this thread to Pimoroni support hopefully they’ll be able to help if you can’t crack it. I could live with it running constantly but even with libreelec shutdown it’s running. I’m having to reboot to Raspbian to shut down libreelec just to keep the fan under control. Working great in raspbian. Should’ve bought the Flirc case LOL

1 Like

You have to use a virtual machine or SSH into libreelec as root user. Neither of which I know how to do. The fanshim is easy to set up in Raspbian using the PIMORONI guide and a great help cooling on Raspbian , but I dual boot Raspbian and Libreelec and as far as libreelec is concerned I wish I’d bought the flirc case instead .I don’t have time to learn Python to make a fan work.

Libreelec has no lxterminal, ie: nowhere to insert the commands. There is a pitools add-on built in, within the Libre elec repository but it must be accessed by SSH . There are Youtube tutorials on how to SSH into pi but despite trying I haven’t been able to get it to work with pitools add-on.

Thanks for the pointers. I’ll give it a go when I have a couple of hours to spare.

I already have SSH installed and samba active.

2 Likes

The fan should just run continuously as long as the Pi is powered up, regardless of what OS is running on the Pi. So there shouldn’t be any worries about overheating if your running Libre Elec etc. As near as I can tell the fan control pin has to be pulled low to turn the fan off. Thats what the daemon does.
When you boot up the Pi the fan starts running right away, then stops once the Daemon loads. Then turns off and on based on temperature. Do a shutdown and it starts up again and keeps running until you remove power to the Pi.
I’m not making excuses for Pimoroni. Just posting what I have observed. I have my Fan Shim running without installing any software. My temps are a pretty consistent 40c or there about.

Alphanumerical. I also think the fanshim should be made to be able work correctly on libreelec. I have to disagree with your assumption that the fan should spin continuously. A cheap £1 Chinese fan on eBay will do what you are suggesting. You are just using the power and earth connections. The purpose of the shim part is to access the gpio pins to make it programmable to control the fan, as and when needed , to cool the cpu. Much like the thermostat on your cars fan kicks the fan in and out to keep your engine cool as and when needed. It will not do that on libreelec without the insertion of code to make it work and adding that code is complicated without an appropriate tutorial. The fans motor will burn out quickly. I had assumed the code would be added to the Pis bootloader code. Not so , therefore it is only useful if you are running Raspbian Buster. This fanshim needs further development to be fit for purpose.

1 Like

Thank you. Would be fantastic if you could write up a usable instructable to help Libreelec users.

1 Like

I agree, it would be nice to have all the features available and usable. I was just pointing out that it was still usable and will keep your Pi 4 cool even without all the fancy extra’s. There is some redundancy built in. I should have did a cliffs notes post or something, lol. I did drag it out a bit.

Does the fan spin in Libre Elec with no software installed? I ask because I have my fan shim mounted on my Pi 4 running Buster. I did not run the Pimoroni installer and my fan starts up and continuously runs as long as my Pi has power feeding it. I have to unplug my power supply to get it to stop after shutting down Raspbian. Also, the button on the fan shim will turn my Pi on and off if I press it. The LED doesn’t work, but that a given.

I’m not speaking for Pimoroni, but the way I see it is that Raspbian is the officially supported OS by the Pi Foundation. So thus, they do up all thier installers for that OS. Should they do installers for other operating systems, I don’t know, thats for them to decide.
Plus, if the originators lock said OS down, there’s even less incentive to try. Just my humble opinion.

Yes it runs continuously even when Libreelec has shut down! I have to unplug the Pi to shut it off. It will burn out in no time. Contrastingly when raspbian is running if with the fanshim once the cpu isn’t under stress because of inactivity the cpu cools the fanshim cuts out and won’t be needed until the pi wakes up again and the cpu hots up again to the set temp. Much better! Many Libreelec users have their Pi’s on all the time, I certainly used to when I was using the 3b+ Cannot do that with the 4 without the fan on (unless I want to cook an omelette on the cpu) so in that respect it does help but will have no longevity, I still maintain it is not working as it should be. It is sold as a raspberry pi fan, not a raspbian fan.

1 Like

Even running Raspbian, with the fan shim software installed, the fan will run continuous on shut down. “If you have the latest eeprom code”.
The factory shipped eeprom code puts the Pi in a deep sleep mode and the +5V turns off, and the fan with it. problem is in that state grounding GPIO 3 won’t boot the Pi up. You have to ground the global enable pin.
The newer eeprom boot code will let the Pi boot up like other Pi’s by momentarily grounding GPIO 3. A side effect is the +5V isn’t turned off so the fan doesn’t shut off.
Even if you command it off, via the Daemon, once the OS shuts down its going ti just turn on again, regardless of the OS.

Alphanumeric…Libreelec is an “official” distro sanctioned by the raspberry pi foundation. They worked on the system with raspberry pi prior to release of the pi 4, and Rpi include it in noobs, regardless of this side issue. the original posters question is not how to justify and live with the failings of the fanshim, but how to use the fanshim, as intended as a temperature sensitive smart cooling system for the Pi 4 with Libreelec. Without support it is just a fan.

1 Like

First let me say I’m not trying to argumentative etc. I’m just voicing my opinion on how I see this discussion panning out.
Being included in NOOBS doesn’t by itself make it sectioned by the Pi Foundation or "official’. I’ll eat those words if you post a link stating that as fact though. I haven’t seen any thing to that effect and I do hang out on the Pi foundation forum.
Even so, IMHO Pimoroni has absolutely no obligation to support every OS that runs on the Pi. I don’t think it is at all fair to criticize them for not offering support for Liber Elec. Just my 2 cents. No harm in asking though so carry on.

As I said your comments are a side issue and are quite frankly distracting.

The question in the post is concerning trying to get the fanshim to work properly on Libreelec (a distribution in which developers worked with the pi foundation development team since Christmas 2018.)
Not, how it runs in raspbian ,with or without software, how a plug socket works or how it is ok to run the fanshim in libreelec manually controlling it by unplugging it. Not whether Pimoroni have an obligation to develop software for their products. Or whether libreelec is official or unofficial.deserving of software development, whether Sanctioned or not by Rpi foundation. We use it , and have bought fanshims to use with it and are simply looking for help with that.

We simply want a solution to the problem at hand. Ie: How to make the fanshim useable as intended with control automatically set by temperature.

https://libreelec.tv/2019/06/libreelec-9-2-alpha1-rpi4b/

Any fries with that?
I am surprised you have the time to frequent the pi foundation forum you seem busy highjacking every thread in this forum.

Ok, now that you have decide to make personal attacks on me I’ll just bow out of “this” thread. I don’t highjack anything, I offer help when I can and any insight I might have. I’ve had no complaints until now. And to be honest don’t take yours seriously.