sfan
This is the python library to control the Smart Fan Card for Raspberry Pi.
Install
For Raspberry Pi 5 only, run the folowing:
sudo pip install SMsfan[rpi5]
or
sudo pip install SMsfan
or
sudo pip3 install SMsfan
Update
sudo pip install SMsfan -U
or
sudo pip3 install SMsfan -U
Now you can import the sfan library and use its functions. To test, read processor temperature from the Smart Fan with stack level 0:
~$ python
Python 2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sfan
>>> sfan.getProcTemp(0)
31
>>>
Functions
setPower(stack, power)
Set the Smart Fan power
stack - stack level, set with jumper [0/1]
power - Fan power [0..100]
getPower(stack)
Return the fan power [0..100]
stack - stack level, set with jumper [0/1]
setSafetyTemp(stack, temp):
Set the Smart Fan safety temperature. If fan processor temperature exceeds this value fan will run 100%
stack - stack level, set with jumper [0/1]
tenp - Safety temperature in degree Celsius [30..80]
getSafetyTemp(stack)
Return the fan safety temperature in degree Celsius [30..80]
stack - stack level, set with jumper [0/1]
getProcTemp(stack)
Return the fan processor temperature in degree Celsius
stack - stack level, set with jumper [0/1]
setLedBlink(stack, blink):
Turn the Smart Fan led blink on or off
stack - stack level, set with jumper [0/1]
blink - Led blinking enable [0/1]
getLedBlink(stack)
Return the fan led blinking [0/1]
stack - stack level, set with jumper [0/1]
setStopInt(stack, seconds)
Set the stop interval in seconds. The fan will run 100% specified seconds then stop.
stack - stack level, set with jumper [0/1]
seconds - how long fan will run [1..65000]
getStopInt(stack)
Return remaining time until fan will stop
stack - stack level, set with jumper [0/1]
Metadata
Release files for smsfan 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| smsfan-1.2.0.tar.gz | 4.0 kB | Without provenance | Details for smsfan-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| smsfan-1.2.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for smsfan-1.2.0-py2.py3-none-any.whl |
Total release size: 8.1 kB
Release files / smsfan-1.2.0.tar.gz
| Download URL | smsfan-1.2.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2dd271c87c29991dafebfb4eaf2eae2dfa1049e315232dfdeafb7cad0e739988
|
|
BLAKE2b-256 checksum How to use checksums |
86f84e9284f14d66d1ef3379aac57547b8f5e21ace7078dc5c29afb4c3f86f88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.2
|
Release files / smsfan-1.2.0-py2.py3-none-any.whl
| Download URL | smsfan-1.2.0-py2.py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
3a9c57c7e2bf74e2c8c62fb0a731ba73c44efd11c8a62d41c98f79b9d7617e8b
|
|
BLAKE2b-256 checksum How to use checksums |
26f80bd1523336013794460e969caac5e13660226d6786c802ee69fb17ec728b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.2
|
Security for smsfan 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.