Python CLI rewrite of the "iPixel Color" application for LED Matrix displays manufactured by Taizhou Yumo Lighting Co., Ltd. Tested only on a 96x16 display, but should work on other sizes (if not please open an issue).
- 🔗 Connect to the device
- 🔆 Set brightness
- 🟥 Set pixels on screen
- ⏲️ Set clock mode
- 🎉 Set the display mode to fun mode (do not save display)
- ✏️ Write text on the screen (with custom font support)
- 💥 Clear memory
- 🎢 Send animations
- 🖼️ Write frames to EEPROM
- ✅ Maintain connection to the device (WebSocket server)
- 🔧 Change orientation
- 🔧 Set the date
- 🔧 Set the clock
- 🔈 Rhythm mode
- 🔒 Set password
Clone the repository and install the required packages.
git clone https://github.com/lucagoc/iPixel-CLI
cd iPixel-CLIThen use the package manager pip to install the required packages.
pip install -r requirements.txtInvalid data sent to the device can lead to BOOTLOOPS
While it is possible to recover from a bootloop by sending a clear command before the device tries to read the EEPROM, it is a little bit tricky and the timing is very short. This tool is still experimental, use at your own risk.
Commands are executed using the following format:
Find the MAC address of your device using the --scan option:
python ipixelcli.py --scanThen, use the -a option to specify the MAC address of your device, and the -c option to specify the command to execute:
python ipixelcli.py -a <DEVICE_MAC_ADDRESS> -c <COMMAND> [PARAMETERS]-c can be used multiple times to send multiple commands in a single request.
Example:
python ipixelcli.py -a 4B:1E:2E:35:73:A3 -c set_brightness value=20 -c send_text "Hello World" rainbow_mode=9 speed=50 animation=1Description: Set the clock mode of the device.
Parameters:
style(int): Clock style (0-8). Default: 1date(str): Date inDD/MM/YYYYformat. Default: current dateshow_date(bool): Show date (true/false). Default: trueformat_24(bool): 24-hour format (true/false). Default: true
Description: Set the rhythm mode of the device (Frequency).
Parameters:
style(int): Style (0-4). Default: 0l1tol11(int): Levels for each channel (0-15). Default: 0 for all channels
Description: Set the rhythm mode of the device (Simple animation).
Parameters:
style(int): Style (0-1). Default: 0t(int): Frame time of the animation (0-7). Default: 0
Description: Set the time of the device.
Parameters:
hour(int): Hour (0-23). Default: current hourminute(int): Minute (0-59). Default: current minutesecond(int): Second (0-59). Default: current second
If one or more parameter is missing, the current time will be used.
Description: Set the DIY Fun Mode (Drawing Mode).
Parameters:
value(bool): Enable or disable the mode (true/false). Default: false
Description: Set the orientation of the device.
Parameters:
orientation(int): Orientation value (0-3). Default: 0
Description: Clear the EEPROM.
Parameters: None
Description: Set the brightness of the device.
Parameters:
value(int): Brightness level (0-100).
Description: Set the color of a specific pixel. (EXPERIMENTAL)
Parameters:
x(int): X-coordinate of the pixel.y(int): Y-coordinate of the pixel.color(str): Hexadecimal color value (e.g.,ff0000for red).
Description: Send a text to the device with configurable parameters.
Parameters:
text(str): The text to display.rainbow_mode(int): Rainbow effect mode (0-9). Default: 0animation(int): Animation style (0-7). Default: 0save_slot(int): Save slot for the text (1-10). Default: 1speed(int): Speed of the text animation (0-100). Default: 80color(str): Hexadecimal color value. Default:fffffffont(str): Font name (without extension) located in thefontsfolder. Default:defaultmatrix_height(int):⚠️ Height of the LED matrix (16, 20, 24). Default: 16font_size(int): font size (.ttfonly)font_offset_x(int): Horizontal offset for the font (.ttfonly). Default: 0font_offset_y(int): Vertical offset for the font (.ttfonly). Default: 0
⚠️ Thematrix_heightparameter might be required for proper text rendering. If not specified, it defaults to 16. Please set it according to your LED matrix height (16, 20, 24, 32). Default font only provides proper rendering for 16 height matrices, usefont=VCR_OSD_MONOfor 24 height matrices.
⚠️ There is a known issue for matrix with 20px or 32px height, please try to change the valueHEADER_GAP(line 245) incommands.pyand report if it works.
Description: Set the screen to display an image.
Parameters:
path_or_hex(str): Path to the image PNG file or its hexadecimal representation.
Description: Send a GIF animation to the device, size must be 96x16 pixels and small.
Parameters:
path_or_hex(str): Path to the GIF file or its hexadecimal representation.
Description: Delete a screen from the EEPROM.
Parameters:
n(int): Index of the screen to delete.
Description: Turn the LED on.
Parameters: None
Description: Turn the LED off.
Parameters: None
You can also start a basic WebSocket server using the following command :
python ipixelcli.py -a <bt_address> --server -p <port>Then, send a request to the server with the following content:
{
"command": "<command>",
"params": ["<param1>", "<param2>", "<param3>"]
}For example :
{
"command": "send_text",
"params": ["Hello World", "rainbow_mode=1", "speed=50"]
}You can use a custom font by adding it to the fonts directory. This can be either:
- a
.ttffont file, or - a folder containing individual letter PNG files (see the
fonts/defaultfolder for reference). Files must be named using the Unicode code point of the character in hexadecimal (e.g.,0041.pngfor 'A').
Then, specify the font name (without the file extension) with the font argument in the send_text command.
For .ttf files, adjust the font size and offset with font_size, font_offset_x, font_offset_y if necessary.
For best results, it is recommended to use a monospace font.
⚠️ Thefonts/cachefolder must be deleted if you change font offset or size.
💡 You can use the generated
fonts/cachefolder as a starting point for creating your own custom fonts from an existing font.
- iPixel-CFW: CFW experimentation
- iPixel-ESPHome: ESPHome integration
Check also these cool projects made by other developers:
- iPixel-ESP32 (ToBiDi0410): ESP32 port of this project
- iPixel-CLI-ESP32 (Cino2424): Another ESP32 port of this project
- go-ipxl (yyewolf): Go library implementation
💡 If your terminal doesn't support emojis, you can disable them with the
--noemojisflag.
Contributions are welcome! If you find a bug or have a feature request, please open an issue or submit a pull request. To get started on how to dump BLE logs from an Android device, refer to the How to get BLE logs guide.
Check also the new repository iPixel-CFW to help us build a custom firmware for the iPixel device with more features !