HowTo: pxlBlck – Commands for configuring the pxlBlck

The pxlBlck plugin and the functions of your pxlBlck can be configured in two different ways.

One option is to configure most of the functions via the plugin's web menu. You can find a lot of information about this in the article pxlBlck - Install and configure the pxlBlck plugin

In addition to this option, you can also set your pxBlck using commands during operation. This has the great advantage that you can also change settings automatically or based on rules. For example, you can automatically adjust the display brightness to the ambient brightness, switch off the display at night or when you are away (to save power) or change settings at the touch of a button.


General principles

In this article, I will mainly describe the various commands. These can be executed as usual for the ESPEasy framework. The various ways in which you can execute commands in the ESPEasy framework and send them to it are described in the article ESPEasy - Execute commands and actions via HTTP, MQTT, UDP and directly described.

The commands described in the following paragraph can be used to configure the pxlBlck plug-in by command and change its appearance/behavior during operation.

The structure of the commands is usually similar. After the actual command name, the parameters are passed, each separated by a comma. The form looks something like this:

commandname,parameter1,parameter2,…,parameterX,

Attention: It is important that the last parameter also ends with a comma. Without this comma, the last parameter is ignored.

The following commands are written in such a way that you can get a quick overview of the command and its attached parameters. The parameters are separated from each other and summarized in square brackets. In addition, the permitted value range of the respective parameter is also given in the square brackets.

Example:

Command Name,[Parameter1 0-1],[Parameter2 0-15],[ParameterX 0-255],

In this example, Parameter1 has a permitted value range of 0-1, Parameter2 a permitted value range of 0-15 and ParameterX a permitted value range of 0-255.

It is also important to note that values outside this permitted value range result in this parameter being ignored.

If you want to configure ParameterX in the example above, but leave the rest unchanged, you can send the following command.

commandname,2,16,133,

This specification causes the first two values entered to be ignored because they are outside the permitted value range. Only the last value "133" is accepted because it is within the permitted value range for "ParameterX".


Command list

Command: General Settings

You can use the "pb" command to make general settings. This can be used to configure the general behavior and the simple options for displaying your pxlBlck.

Command name

p.b

Command overview

pb,[display_enabled 0-1],[brightness 0-15],[rc_mark_brightness 0-15],[matrix_rotation 0-3],[selected_dial 0-15],[wc_it_is_enabled 0-1],[wc_o_clock_enabled 0-1] ,[rc_dir_inversed 0-1],[wc_language_id 0-15],[minimal_brightness 0-255],

Parameter description

Parameter nameDescriptionPermitted value range
display_enabledActivates(1) or deactivates(0) the display output. This can be used, for example, to save power when nobody is present. See also pxlBlck - Turn off the display when you're away0-1
brightnessBrightness of the display in 16 steps from 0-15, whereby the display is not completely deactivated at the value 0. In this case, the (absolute) value specified in minimal_brightness is set as the brightness.0-15
rc_mark_brightnessBrightness of the hour markers in ring clock mode in 16 steps from 0-15.
matrix_rotation: display orientation of the displayed matrix from 0-3. Increasing this value causes a clockwise rotation of 90°.
0-15
matrix_rotationDisplay orientation of the displayed matrix from 0-3. Increasing this value causes a clockwise rotation of 90°.0-3
selected_dialSelected clock face. Here you can select which clock face is shown regularly on the display. This can be a simple animation or a time display.
wc_it_is_enabledActivates(1) or deactivates(0) the display of the letters "It is" in word clock mode.0-1
wc_o_clock_enabledActivates(1) or deactivates(0) the display of the letters "clock" in word clock mode.0-1
rc_dir_inversedInverts(1) or does not invert(0) the direction of movement of the hands in ringclock mode. This setting basically mirrors the ring clock dial on the vertical axis.0-1
wc_language_idSelect the desired language in Wordclock mode. This allows you to display the time on the word clock in different languages.
minimal_brightnessThe value specified with minimal_brightness is the value that is set as the brightness value when the normal display brightness is set to zero. The difference is that the minimum_brightness specification has a larger setting range. Here you can set the brightness not only in the range 0-15 but in the range 0-255. The big advantage of this is that much darker brightness levels can be set. You can also find more information on this in the article pxlBlck - Automatic adjustment of the display brightness via LDR0-255

Example

  • Sets the brightness to 10 and leaves the activation/deactivation of the display unchanged: pb,2,10,

Command: Set colors

The assignment of colors changes depending on the dial selected. However, there is always a maximum of four possible colors that can be configured as follows.

Command name

pbclr

Command overview

pbclr,[color_id 0-4],[color_red 0-255],[color_green 0-255],[color_blue 0-255],

Parameter description

Parameter nameDescriptionPermitted value range
color_idThis parameter is used to specify which color is to be set. An overview of the possible colors and the corresponding IDs can be found in the following table.0-4
color_redRed color portion of the paint0-255
color_greenGreen color portion of the paint0-255
color_blueBlue color portion of the paint0-255
ColorID
All colors0
first color1
second color2
third color3
fourth color4

Example

  • Set the first color to white: pbclr,1,255,255,255,
  • Set the second color to white: pbclr,2,255,255,255,
  • Sets all colors to white: pbclr,0,255,255,255,

Command: Set truth values

This option can be used to configure all options that are set using truth values. These can be set absolutely (On or Off) or "toggled" (i.e. changed to the opposite state).

Command name

pbbo

Command overview

pbbo,[value_id 1-6], [value 0-2]

Parameter description

Parameter nameDescriptionPermitted value range
value_idThis specifies the ID of the value you want to configure. Which values have which IDs can be seen in the next table.0-6
ValueThis parameter specifies the value that I ultimately want to set. Zero sets the selected truth value to "false", one sets it to "true" and two toggles the value in question. "Toggling" here means that the value is changed to the opposite. So zero becomes one and vice versa.0-2

Here is a short list of the variables (and their corresponding IDs) which you can use as the value for the Value_id parameter.

Surname DescriptionAssociated ID
displayEnabledActivates or deactivates the display output1
wordclockShowOClockEnabledActivates or deactivates the display of "Clock" in word clock mode.2
wordclockShowItIsEnabledActivates or deactivates the display of "It is" in word clock mode.3
ringclockThick12markEnabledActivates or deactivates the display of a thicker hour marker in RingClock mode.4
ringclockClockDirInversedInverts or does not invert the pointer direction in RingClock mode.5
diallLeadingZerosEnabledActivates or deactivates the display of leading zeros in dials that display the time using numbers.6

Example

  • activates the wide hour marker: pbbo,4,1,
  • deactivates the wide hour marker: pbbo,4,0,
  • changes the status of the wide hour marker to the opposite: pbbo,4,2,
  • changes the status of the display of the leading zeros to the opposite: pbbo,6,2,

Command: Set brightness

The various brightness levels can be configured using the command described here. The brightness can be set to a fixed absolute value, but can also be increased or decreased relative to the currently set brightness.

Command name

pbr

Command overview

pbbr,[brightnessId 0-2], [brightness 1-15], [absolute 0-1], [bottom border 1-15], [topBorder 1-15],

Parameter description

Parameter nameDescriptionPermitted value range
brightnessIdSpecifies the ID of the brightness you want to set. You can find out which brightness is assigned to which ID in the table below.0-2
brightnessSpecifies the desired target brightness. The line brightness is also influenced by the value of the "absolute" parameter.1-15
absoluteThis parameter specifies whether the desired brightness is to be set absolutely or relative to the current brightness.0-1
bottom borderYou can use this parameter to limit the brightness setting. For example, you can prevent a desired maximum brightness from being exceeded with a relative increase in brightness.1-15
topBorderYou can use this parameter to limit the brightness setting. For example, you can prevent the brightness from falling below a desired minimum brightness when the relative brightness is reduced.1-15

The brightnesses in the following list can be set using this command.

Brightness nameID
All brightnesses are configured simultaneously0
Display brightness1
Brightness of the hour markers2

Example

The command

pbbr,0,5,1,1,15,

Sets all brightnesses (first parameter) to the value five (second parameter). The value is set absolutely (third parameter) and the lower limit is set to one (fourth parameter) and the upper limit to 15 (fifth parameter).

In the article pxlBlck - Automatic adjustment of the display brightness via LDR this command is used to automatically adjust the brightness to the ambient brightness.


Command: Set colors using the color wheel

This command can be used to set the colors based on the angle of a color wheel. For example, color changes can be implemented at the touch of a button by controlling all colors. Information on the color wheel can be found here, for example: https://de.wikipedia.org/wiki/Farbkreis

The Color wheel (also Color wheel, Color circle, Colored tone circle, Color wheel, English color circle, color wheel) is an ordering system in which the colors (chromatic, most intense colors, saturated colors, pure colors, solid colors) are arranged in a circle.

Similar colors lie next to each other (in a circle) and complementary colors (complementary colors, opposite colors, compensating colors) are (often) opposite each other.[2] Six, twelve or 24 colors are usually arranged next to each other in a circle. Color circles draw a Color theory or are based on considerations of such relationships.

https://de.wikipedia.org/wiki/Farbkreis

The advantage of this command is that you can change through the various possible colors with one command. This is helpful, for example, if you want to select the next possible color by pressing a button.

Command name

pbclrwhl

Command overview

pbclrwhl,[colorId 0-4], [degree -360-360], [absolute 0-1],

Parameter description

Parameter nameDescriptionPermitted value range
colorIdThis parameter specifies which color is to be set. There is a maximum of four different colors. The following table contains colors and the corresponding IDs.0-4
degreeThis parameter determines the (absolute) angle in the color wheel to which the desired color should be set.-360-360
absoluteThis parameter determines whether the desired color angle should be set as absolute or relative.0-1

The following table contains the colors and their associated IDs that can be set with this command.

SurnameDescriptionID
All colors All colors are configured simultaneously.0
First colorThis corresponds to the first color in the Webanischt color list.1
second colorThis corresponds to the second color in the Webanischt color list.2
third colorThis corresponds to the third color in the Webanischt color list.3
fourth colorThis corresponds to the fourth color in the Webanischt color list.4

Example

  • Set all colors to the color in the color wheel five degrees forward starting from the current color: pbclrwhl,0,5,0,
  • Set all colors to the color in the color wheel five degrees backwards starting from the current color: pbclrwhl,0,-5,0,
  • Set the first color to the color in the color wheel five degrees forward from the current color: pbclrwhl,1,5,0,
  • Set the third color to the color in the color wheel five degrees forward from the current color: pbclrwhl,3,5,0,

Command: Display scrolling text

This command can be used to display scrolling texts that run from right to left across the display. This only works if an LED matrix is configured that has a height of eight or more.

Command name

pbrntxt

Command overview

pbrntxt,[txt_color_red 0-255],[txt_color_green 0-255],[txt_color_blue 0-255],[bg_color_red 0-255],[bg_color_green 0-255],[bg_color_blue 0-255],[delay_time 0-1000] ,[start_pos 0-MATRIX_WIDTH],[text]

Parameter description

Parameter nameDescriptionPermitted value range
txt_color_redRed color portion of the text color0-255
txt_color_greenGreen color portion of the text color0-255
txt_color_blueBlue color portion of the text color0-255
bg_color_redRed color portion of the background color0-255
bg_color_greenGreen color portion of the background color0-255
bg_color_blueBlue color portion of the background color0-255
delay_timeThe time it takes for the text to scroll through the display. This allows the speed of the scrolling text to be defined. The duration corresponds to the waiting time until the text is moved one pixel to the left.0-1000
start_posThe horizontal starting position on the display in pixels. This is counted from left to right. A one therefore corresponds to the first pixel column from the left.0-"Width of the LED matrix"
textThe scrolling text to be displayed.text

Example

  • Scrolling text: Message "TestMessage" in green color: pbrntxt,0,255,0,0,0,0,50,8,TestMessage,
  • Scrolling text: Message "TestMessage" in red color: pbrntxt,255,0,0,0,0,0,50,8,TestMessage,
  • Scrolling text: Message "TestMessage" in blue color: pbrntxt,0,0,255,0,0,0,50,8,TestMessage,
  • Scrolling text: Message "TestMessage" in blue color, directly visible: pbrntxt,0,0,255,0,0,0,50,0,TestMessage,


Command: Show icon

You can use the icon display to show icons you have created yourself on the display of your pxlBlck.

This means you can define the color of each individual pixel in a file, transfer this file to the pxlBlck and display it on the display using this command.

Various fade-in and fade-out options are available to you. You can also define a text that is displayed together with the icon. More detailed information on how to design your own icons, transfer them to your pxlBlck and display them there can be found in the following article

Command name

pbicon

Command overview

pbicon,[incoming animation 0-255], [outgoing animation 0-255], [in delay 0-255], [show delay 0-255], [out delay 0-255], [brightness 0-255], [running text 0-255],[icon name],[repetition 0-10],

Parameter description

Parameter nameDescriptionPermitted value range
incoming animationThe ID of the input animation1-3
outgoing animationThe ID of the output animation1-3
in delayThis parameter sets the duration used for the input animation. It is specified in milliseconds.0-2000
show delayYou can use this parameter to set the display duration of the icon and any text. It is specified in milliseconds.0-10000
out delayThis parameter sets the duration used for the output animation. It is specified in milliseconds.0-2000
brightnessYou can use this parameter to set the maximum brightness for your icon and any text. Please note that a high brightness also requires more power and the connected LED matrix must be designed accordingly.0-100
runningtextYou can use this parameter to specify a text that will be displayed together with the icon. If no text is required, you can simply leave this parameter blank.text
icon nameThis parameter corresponds to the file name of the icon uploaded to the SPIFFS of the pxlBlcktext
repetitionYou can use this parameter to repeat the icon display. For example, you can also create flashing icons.0-10

The following tables contain an overview of the available animations for showing and hiding the icons.

Fade-in animations
SurnameDescriptionID
fade inThe icon and, if applicable, the scrolling text are displayed with the set "show delay" time.1
Instant onThe icon and any defined text are displayed immediately.2
Fly in from rightThe icon and any defined scrolling text are inserted into the display area from the right-hand side. The "show delay" time defines how long this process takes.3
Fade-out animations
SurnameDescriptionID
fade outThe icon and, if applicable, the scrolling text are hidden with the set "out delay" time.1
instant offThe icon and any defined text are immediately hidden.2
Fly out to leftThe icon and any defined scrolling text are moved to the left-hand side of the display area. The "out delay" time defines how long this process takes.3

Example

More detailed information on how to design your own icons, transfer them to your pxlBlck and display them there can be found in the following article


Command: FakeTV simulation

You can use this command to activate a fake TV mode. This causes color patterns to be played on the display of the pxlBlck that resemble those of a running television. This mode is useful, for example, if you want to simulate a presence when you are away. This could deter burglars or nosy neighbors 🙂

Command name

pbfaketv

Command overview

pbfaketv,[enabled 0-1],

Parameter descriptiong

Parameter nameDescriptionPermitted value range
enabledThis (single) parameter can be used to activate (1) or deactivate (0) the FakeTV mode.0-1

Example

  • Activate fake TV mode: pbfaketv,1,
  • Deactivate fake TV mode: pbfaketv,0,

Command: Matrix/Color Test

This command is perfect for testing a connected LED matrix. If you enter the command, each color and white is displayed on the connected LED matrix one after the other for one second. This also makes it easier to find defective pixels or individual colors.

Command name

pbtest

Command overview

pbtest

Parameter description

-no parameters available-

Example


Command: Animations

You can use animation to signal an event. For example, they are perfect for displaying an event on the slot/ring clock or on other models that do not support icon display.

Command name

pbani

Command overview

pbani,[animation_type 1-6],[color_on_red 0-255],[color_on_green 0-255],[color_on_blue 0-255],[color_off_red 0-255],[color_off_green 0-255],[color_off_blue 0-255],[animation_delay 0-500],

Parameter description

Parameter nameDescriptionPermitted value range
animation_typeThis parameter defines the type of animation. An overview of the possible animations can be found in the following table.1-6
color_on_redThis parameter determines the brightness of the red color in the input animation.0-255
color_on_greenThis parameter determines the brightness of the green color in the input animation.0-255
color_on_blueThis parameter determines the brightness of the blue color in the input animation.0-255
color_off_redThis parameter determines the brightness of the red color in the output animation.0-255
color_off_greenThis parameter determines the brightness of the green color in the output animation.0-255
color_off_blueThis parameter determines the brightness of the blue color in the output animation.0-255
animation_delayHere you can set the duration of the animation. It is specified in milliseconds and describes the display duration per pixel.0-500
Overview of the animations
IDDescription
1The LED matrix is filled from the right with the input color and then overwritten to the left with the output color.
2The LED matrix is filled from the left with the input color and then overwritten to the right with the output color.
3A vertical line (in input color) moves from left to right (in output color).
4A vertical line (in output color) moves from left to right (in input color).
5The LED matrix is filled from both sides towards the mtte and then dissolved again.
6The LED matrix is filled from the center and then dissolved again.
Example

More detailed information including pictures and videos of the different animations and how you can display them on your pxlBlck can be found in the following article


Command: Configure watch faces

You can use this command to specify the displayed clock face or screen saver. The available clock faces and screen savers depend on the pxlBlck platform or LED matrix set.

You can also find an overview of the various clock faces and screensavers in the article pxlBlck - configure clock faces and screensavers

Command name

pbdia

Command overview

pbdia,[dial_id 0-X],[absolute 0-1],

Parameter description

Parameter nameDescriptionPermitted value range
dial_idHere you enter the ID of the desired dial or (if relative) the increment for selecting the next or previous dial.0-X
absoluteThis parameter specifies whether the parameter specified for "dial_id" is interpreted as absolute or relative.0-1

Example

You can find more information including pictures and videos of the different clock faces and screensavers in the article pxlBlck - configure clock faces and screensavers.


Have fun with the project

I hope everything worked as described for you. If not or you have questions or suggestions please let me know in the comments. I will then add this to the article if necessary.
Ideas for new projects are always welcome. 🙂

PS Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you think it's cool that I share the information with you, I would be happy about a small donation to the coffee fund. 🙂

Buy Me a Coffee at ko-fi.com       

6 comments

  1. Hello!
    I really like the controls. But can the commands for the marquee also display the contents of variables?
    So for example:
    on Clock#Time=All,**:*5 do
    pbrntxt,0,255,0,0,0,0,100,8,%date%
    endon
    Because I haven't managed to do that yet, thanks in advance!

    1. Hey Stefan,
      Thanks very much. 🙂 This is not working yet. But it's a cool idea! I'll try to install it and then I'll let you know here. 🙂
      Best regards
      Fabian

  2. Thanks very much! It works with the system variables. You just have to get it right (or I need to read more carefully)

    on Clock#Time=All,**:*5 do
    pbrntxt,0,255,0,0,0,0,100,8,%sysweekday_s% %sysday_0% %sysmonth_0% %sysyear%
    endon

    Definitely works. Nonetheless, thanks for the quick reply!

  3. Since I have time to play with the matrix again, I have another question. How can I display special characters? If I want to output a door via the rules, for example, a minus appears and the extended ASCII code 189 . How can I change that?

    1. good morning Stefan,
      good question. I haven't had that case yet. I'll take a look and try to fix it. 🙂
      Best regards
      Fabian

Kommentar hinterlassen

Your email address will not be published. Erforderliche Felder sind mit * markiert

This site uses Akismet to reduce spam. Learn how your comment data is processed.