Device Settings
set_power
Set the power state of the device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
on
|
bool
|
True to turn on, False to turn off. |
True
|
Source code in src/pypixelcolor/commands/set_power.py
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
Examples:
# Turn on the display
client.set_power(True)
# Turn off the display
client.set_power(False)
# Turn on the display
pypixelcolor -a <MAC_ADDRESS> -c set_power true
# Turn off the display
pypixelcolor -a <MAC_ADDRESS> -c set_power false
set_brightness
Set the brightness of the device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level
|
int
|
Brightness level (0-100). |
required |
Source code in src/pypixelcolor/commands/set_brightness.py
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | |
Examples:
# Set brightness to 50%
client.set_brightness(50)
# Set maximum brightness (100%)
client.set_brightness(100)
pypixelcolor -a <MAC_ADDRESS> -c set_brightness 50
set_orientation
Set the orientation of the device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
orientation
|
int
|
The orientation value to set (0-3). |
0
|
Source code in src/pypixelcolor/commands/set_orientation.py
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
Examples:
# Set default orientation (0: 0°)
client.set_orientation(0)
# Rotate display (0: 0°, 1: 90°, 2: 180°, 3: 270°)
client.set_orientation(2)
pypixelcolor -a <MAC_ADDRESS> -c set_orientation 2
set_schedule
Set an automated on/off schedule by time and day of week.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hour
|
int
|
Hour (0-23). Defaults to 12. |
required |
minute
|
int
|
Minute (0-59). Defaults to 0. |
required |
on
|
bool
|
True to turn display ON, False to turn OFF. Defaults to True. |
required |
days
|
Union[ScheduleDay, int, str, list[str], None]
|
Active days ('mon,sat' or ['mon', 'sat']). Defaults to all days. |
None
|
slot
|
int
|
Schedule slot index (0, 1, 2, ...). Defaults to 0. |
0
|
Returns:
| Name | Type | Description |
|---|---|---|
SendPlan |
SendPlan
|
The single window send plan for this command. |
Source code in src/pypixelcolor/commands/set_schedule.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |
Examples:
from pypixelcolor import ScheduleDay
# Turn ON at 08:00 every day (slot 0)
client.set_schedule(hour=8, minute=0, on=True, slot=0)
# Turn OFF at 23:00 on weekdays using ScheduleDay bitmask (slot 1)
client.set_schedule(
hour=23,
minute=0,
on=False,
days=ScheduleDay.MON | ScheduleDay.TUE | ScheduleDay.WED | ScheduleDay.THU | ScheduleDay.FRI,
slot=1,
)
# Turn ON at 10:00 on weekends using string list (slot 2)
client.set_schedule(hour=10, minute=0, on=True, days=["sat", "sun"], slot=2)
# Turn ON at 08:00 every day
pypixelcolor -a <MAC_ADDRESS> -c set_schedule hour=8 minute=0 on=true slot=0
# Turn OFF at 23:00 on weekends
pypixelcolor -a <MAC_ADDRESS> -c set_schedule hour=23 minute=0 on=false days=sat,sun slot=1
pypixelcolor.commands.set_schedule.ScheduleDay
Bases: IntFlag
Days of the week bitmask for schedule.
Source code in src/pypixelcolor/commands/set_schedule.py
10 11 12 13 14 15 16 17 18 | |