-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Add support for fan status monitoring #625
Comments
The problem might be that there is no generic API to read the fan status, similar like there is no generic sysfs API to adjust fan settings, trip points and all that. There might be one which works with the particular RPi fan device tree overlay, but it wouldn't work on any other platform. We started to develop a So it is unlikely that we will have the time and mood to maintain an own list/set of APIs per SBC to even just read the current fan status. But there might be a Rust crate which does this, which would then be an option for the dashboard. |
Just did a little bit of research, there doesn't seem to be a standard crate for reading fan speeds, probably for the reasons that were mentioned. One possibility to get this to work is to allow running custom commands to get data on the dashboard. In that case, you could put in whatever command gets your fan speed, and it would be shown in the dashboard. This is unlikely to happen right now, but it's something I might consider implementing in the future. |
Good idea. Instead of having this hardcoded as custom fan speed readout, I would then suggest to have it as custom numeric value readout. We could start to just have and use two additional TOML config keys, like Or not as graph, but just as additional value at the right side of the page. In this case it does not even need to be numeric, but the command could return any value or text. |
I see. Do you know if there's any command that can report if the fan is on or off? I usually don't need the fan speed but it's probably a valuable data for other users to monitor. Thanks in advance! |
Does |
I got it working using WiringPi... Maybe DietPi Dashboard could use this data if it detects WiringPi is installed. Although it's limited, as it just tells if the fan is active or not but for me that's all I wanted. Others would probably want the fan speed as well but I don't think mine (Argon40 Mini Fan) supports dynamic speeds. |
Hmm, I think this is way too specific to add this to the dashboard. I mean a fan could be attached to any GPIO pin, could be only on/off or an actual PWM value, and even the pin numbers are absolutely not consistent across SBCs. Also WiringPi is available only for RPi and Odroids and can be seen as obsolete/superseded by libgpio, which again does not yet work on all SBCs (depending on kernel). If there is a sysfs node which contains the value which actually controls the fan, then okay, but I would avoid reading from the GPIO interface. To me this sounds like a perfect example for a custom command idea 🙂. |
Yes, that's makes more sense in this use case. |
It'd be helpful if DietPi Dashboard would also report the fan status. Since, everyone wouldn’t have a fan installed, so this feature could be made optional that we can manually turn on and customizable (as the fan may be attached to different GPIO pins). I have an Argon40 Mini Fan HAT on my Raspberry Pi 4 Model B, and the fan works in PWM mode by adding the line
dtoverlay=gpio-fan,gpiopin=18,temp=55000
to the/boot/config.txt
file. There's no way to know if my fan is running or not without physically looking at the Pi 4.The text was updated successfully, but these errors were encountered: