Micro Wave USB Fan
This library is a pure Python reimplementation of the protocol used by various RGB USB fans based on the fan UF-211-06RGB that was designed by 刘保根 (Liu Baogen) and that is produced by 深圳市瑞声达电子有限公司 (Shenzhen Ruishengda Electronics Co.) as an OEM and also sold by themselves under the USTAR brand.
Communication occurs using USB HID reports as a transport. This library uses
hidapi to do this across Linux, macOS,
FreeBSD and Windows.
Installation
pip install microwave-usbfan
Example Implementation
Two Text Messages
from usbfan import Device, Program, TextMessage
# A program is made up of a list of Messages
# A "TextMessage" is a subclass of the generic Message class
p = Program((TextMessage("Hello, World!"),
TextMessage("How is everyone going?"),))
# Open the device and program
d = Device()
d.program(p)
Single Red Dot
from usbfan import Colour, Column, Device, Message, Program
# A generic "Message" is made up of 1 to 144 "Column" object
# A "Column" has 11 boolean pixels and a "Colour"
columns = [Column([True] + [False] * 10, Colour.red)]
for _ in range(7):
columns.append(Column([False] * 11, Colour.red))
p = Program((Message(columns),))
# Open the device and program
d = Device()
d.program(p)
Rainbow Message
from usbfan import Colour, Column, Device, Message, Program, TextMessage
# We can cycle the rainbow here and fill all 144 columns
rainbow_colours = [Colour.red, Colour.yellow, Colour.green,
Colour.cyan, Colour.blue, Colour.magenta]
rainbow = [Column([True] * 11,
rainbow_colours[i % len(rainbow_colours)])
for i in range(Message.MAX_COLUMNS)]
p = Program((
TextMessage("Here comes the rainbow!"),
Message(rainbow),
))
# Open the device and program
d = Device()
d.program(p)
Mode Controls
For each message, you can define how it opens, what it does once displayed, and what it does when closing.
from usbfan import Colour, Column, Device, Message, Program, TextMessage, \
MessageStyle, OpenTransition, CloseTransition
# We can cycle the rainbow here and fill all 144 columns
rainbow_colours = [Colour.red, Colour.yellow, Colour.green,
Colour.cyan, Colour.blue, Colour.magenta]
rainbow = [Column([True] * 11,
rainbow_colours[i % len(rainbow_colours)])
for i in range(Message.MAX_COLUMNS)]
p = Program((
TextMessage("Here comes the rainbow!",
message_style=MessageStyle.Flash,
open_transition=OpenTransition.DownUp,
close_transition=CloseTransition.DownUp),
Message(rainbow,
message_style=MessageStyle.Clockwise,
open_transition=OpenTransition.FromMiddle,
close_transition=CloseTransition.ToMiddle),
))
# Open the device and program
d = Device()
d.program(p)
UF-211-06RGB details
Official Alibaba shop entries: 1,2,3,4,5,6
Power: USB
Color: Silver
Size: 40 x 0.7 cm; 8.8 cm fan diameter
Fan Material: PVC blade & metal neck
Certificates: CE/ROHS/EMC/FCC
Known rebrands
Jaycar GJ1031
Saytay USB LED Fan Message Fan
Metadata
Release files for microwave-usb-fan-fork 0.0.1
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 |
|---|---|---|---|---|
| microwave_usb_fan_fork-0.0.1.tar.gz | 11.5 MB | Without provenance | Details for microwave_usb_fan_fork-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| microwave_usb_fan_fork-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for microwave_usb_fan_fork-0.0.1-py3-none-any.whl |
Total release size: 11.7 MB
Release files / microwave_usb_fan_fork-0.0.1.tar.gz
| Download URL | microwave_usb_fan_fork-0.0.1.tar.gz |
|---|---|
| Size | 11.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7cb2ae9dc81e9bb2865c6b6dd23289e806860f9a8bad89e14c10481aafa09dc
|
|
BLAKE2b-256 checksum How to use checksums |
b4357bcf7e9ae912350a36dfeb77991ea41c83909b93f7a3c3eb5c9ed9b864d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / microwave_usb_fan_fork-0.0.1-py3-none-any.whl
| Download URL | microwave_usb_fan_fork-0.0.1-py3-none-any.whl |
|---|---|
| Size | 158.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f423a78858522e41880b551ca9c6b99e3bb591ee0d451c5e332e85f86ae85d9a
|
|
BLAKE2b-256 checksum How to use checksums |
a0669369aa1eacc39ff0f50b66705789585a0088154e1bcd537d4c6b4a52b0e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for microwave-usb-fan-fork 0.0.1
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.