Skip to main content

Rebranded UF-211-06RGB USB fans by USTAR (Ruishengda) protocol implementation

Project description

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

More info

Known rebrands

Jaycar GJ1031
Saytay USB LED Fan Message Fan

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

microwave_usb_fan_fork-0.0.1.tar.gz (11.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

microwave_usb_fan_fork-0.0.1-py3-none-any.whl (158.0 kB view details)

Uploaded Python 3

File details

Details for the file microwave_usb_fan_fork-0.0.1.tar.gz.

File metadata

  • Download URL: microwave_usb_fan_fork-0.0.1.tar.gz
  • Upload date:
  • Size: 11.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for microwave_usb_fan_fork-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e7cb2ae9dc81e9bb2865c6b6dd23289e806860f9a8bad89e14c10481aafa09dc
MD5 ebe88cbf01714cbaadd5d18837c48f59
BLAKE2b-256 b4357bcf7e9ae912350a36dfeb77991ea41c83909b93f7a3c3eb5c9ed9b864d5

See more details on using hashes here.

File details

Details for the file microwave_usb_fan_fork-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for microwave_usb_fan_fork-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f423a78858522e41880b551ca9c6b99e3bb591ee0d451c5e332e85f86ae85d9a
MD5 464e2a4912a2a7d4ccd72345bfd89c03
BLAKE2b-256 a0669369aa1eacc39ff0f50b66705789585a0088154e1bcd537d4c6b4a52b0e9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page