HowTo: pxlBlck – Commands to configure the pxlBlck

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

One possibility 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 rule-based. For example, you can automatically adjust the display brightness to the ambient brightness, switch off the display at night or when you are absent (to save energy) or change settings at the push of a button.


Basic Information

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

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

The structure of the commands is mostly similar. After the actual command name – separated by a comma – the parameters are transferred. So a complete command usualy 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 down so that you can get a quick overview of the name of the command and its attached parameters. The parameters are again separated from one another and summarized in square brackets. In addition, the permitted value range of the respective parameter is indicated in the square brackets.

Example:

Commandname, [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 here that values that are outside of this permitted range lead to this parameter being ignored.

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

Commandname, 2,16,133,

With this specification, the first two entered values are ignored because they are outside the permitted value range. Only the last value “133” is accepted because it is in the permitted value range for “ParameterX”.


Command list

Command: General Settings

To be able to make general settings, you can use the command “pb”. This allows you to configure the general behavior and the simple options for displaying your pxlBlck.

Command name

pb

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 range of values
display_enabledActivates (1) or deactivates (0) the display output. This can be used, for example, to save electricity when nobody is in the house. See also pxlBlck – Switch off the display when you are absent0-1
brightnessBrightness of the display in 16 steps from 0-15, whereby the display is not completely deactivated with 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.0-15
matrix_rotationDisplay orientation of the displayed matrix from 0-3. An increase in this value causes a 90 ° clockwise rotation.0-3
selected_dialSelected face. This allows you to choose which clock face is regularly shown 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 “O’ clock” in word clock mode.0-1
rc_dir_inversedInverts (1) or non-inverts (0) in ring clock mode the direction of movement of the pointer. This setting basically mirrors the ring clock face on the vertical axis.0-1
wc_language_idSelects the desired language in word clock mode. So you can display the time on the word clock in different languages.
minimal_brightnessThe value that is 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 specification of the minimal_brightness 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 brightnesses can be set. You can find more information about this in the article pxlBlck – Automatic setting 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 the colors changes depending on the selected watch face. However, there are 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 range of values
color_idThis parameter specifies which color is to be set. You can find an overview of the possible colors and the associated IDs in the following table.0-4
color_redRed component of the color0-255
color_greenGreen component of the color0-255
color_blueBlue component of the color0-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

With this option you can configure all options that are set using truth values. These can be set absolutely (on or off) or “toggle” (ie switch to the opposite state).

Command name

pbbo

Command overview

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

Parameter description

Parameter namedescriptionPermitted range of values
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 indicates the value that will set. Zero sets the selected truth value to “false”, one sets it to “true” and two toggles the relevant value. “Toggle” means here 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 associated IDs) which you can use as the value for the Value_id parameter.

Name descriptionID
displayEnabledActivates or deactivates the display output1
wordclockShowOClockEnabledActivates or deactivates the display of “clock” in word clock mode.2
wordclockShowItIsEnabledEnables or disables the display of “It is” in word clock mode.3
ringclockThick12markEnabledActivates or deactivates the display of a thicker hour mark in RingClock mode.4
ringclockClockDirInversedInverts or not inverts the pointer direction in RingClock mode.5
diallLeadingZerosEnabledActivates or deactivates the display of leading zeros in clock faces that represent the time using numbers.6

Example

  • activates the thick hour mark: pbbo, 4.1,
  • deactivates the thick hour mark: pbbo, 4.0,
  • changes the status of the thick hour mark to the opposite: pbbo, 4,2,
  • changes the status of the leading zeros display to the opposite: pbbo, 6,2,

Command: Set brightness

The command described here can be used to configure the various brightnesses. The brightness can be set absolutely to a specified value, but can also be increased or decreased relative to the currently set brightness.

Command name

pbbr

Command overview

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

Parameter description

Parameter namedescriptionPermitted range of values
brightnessIdIndicates the ID of the brightness that you want to set. You can see 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 indicates whether the desired brightness should be set absolutely or relative to the current brightness.0-1
bottomBorderYou can use this parameter to limit the brightness setting. For example, with a relative increase in brightness, you can avoid exceeding a desired maximum brightness.1-15
topBorderYou can use this parameter to limit the brightness setting. For example, with a relative reduction in brightness, you can avoid falling below a desired minimum brightness.1-15

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

Brightness typeID
All brightnesses are configured at the same time0
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 setting 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

With this command the colors can be set based on the angle of a color wheel. For example, color changes can be implemented at the push of a button and all colors can be controlled. You can find information on the topic of color wheel, for example, here: https://en.wikipedia.org/wiki/Color_wheel

color wheel or color circle[1] is an abstract illustrative organization of color hues around a circle, which shows the relationships between primary colorssecondary colorstertiary colors etc.

Some sources use the terms color wheel & color circle interchangeably;[2][3] however, one term or the other may be more prevalent in certain fields or certain versions as mentioned above. For instance, some reserve the term color wheel for mechanical rotating devices, such as color tops, filter wheels or Newton disc. Others classify various color wheels as color disccolor chart, and color scale varieties.[4]

https://en.wikipedia.org/wiki/Color_wheel

The advantage of this command is that you can switch between the different possible colors with one command. This is helpful, for example, if you want to select the next possible color at the touch of a button.

Command name

pbclrwhl

Command overview

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

Parameter description

Parameter namedescriptionPermitted range of values
colorIdThis parameter indicates which color should be set. There are a maximum of four different colors. The following table contains colors and the associated IDs.0-4
degreeThis parameter determines to which (absolute) angle in the color wheel the desired color should be set.-360-360
absoluteThis parameter determines whether the desired color angle should be set absolutely or relatively.0-1

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

NamedescriptionID
Alle Farben All colors are configured at the same time.0
Erste FarbeThis corresponds to the first color in the web view’s color palette.1
Zweite FarbeThis corresponds to the second color in the color list of the webanisch.2
Dritte FarbeThis corresponds to the second color in the web view’s color palette.3
Vierte FarbeThis corresponds to the fourth color in the web view’s color palette.4

Example

  • Place all colors on 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,
  • Place the first color on the color in the color wheel five degrees forward starting from the current color: pbclrwhl, 1,5,0,
  • Place the third color on the color in the color wheel five degrees forward based on the current color: pbclrwhl, 3,5,0,

Command: Display scrolling text

With the help of this command scrolling texts can be displayed, which 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 range of values
txt_color_redRed component of the text color0-255
txt_color_greenGreen component of the text color0-255
txt_color_blueBlue component of the text color0-255
bg_color_redRed component of the background color0-255
bg_color_greenGreen component of the background color0-255
bg_color_blueBlue component of the background color0-255
delay_timeThe time it takes for the text to scroll through the display. This allows the speed of the text to be set. The time corresponds to the waiting time until the text is pushed one pixel further to the left.0-1000
start_posThe horizontal starting position on the display in pixels. It counts from left to right. A one therefore corresponds to the first column of pixels from the left.0-“Width of the LED matrix”
textThe scrolling text to be displayed.Text

Example

  • Scrolling text: Message “TestMessage” in green: pbrntxt, 0,255,0,0,0,0,50,8, TestMessage,
  • Scrolling text: Message “TestMessage” in red: 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

With the help of the icon display, you can display icons that you have created yourself on the display of your pxlBlck.

That means you can specify the color of each individual pixel in a file, transfer this file to the pxlBlck and use this command to display it on the display.

There are various fade-in and fade-out options available to you. In addition, a text can also be defined, which is displayed together with the icon. More detailed information on how you can design icons yourself, transfer them to your pxlBlck and display them there is contained 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],[repitition 0-10],

Parameter description

Parameter namedescriptionPermitted range of values
incoming animationThe ID of the entrance animation1-3
outgoing animationThe ID of the exit animation1-3
in delayThis parameter sets the length of time that is used for the entrance animation. It is given in milliseconds.0-2000
show delayWith this parameter you can set the duration of the icon and, if necessary, the text. It is given in milliseconds.0-10000
out delayThis parameter sets the length of time that is used for the exit animation. It is given in milliseconds.0-2000
brightnessWith this parameter you can set the maximum brightness for your icon and possibly text. Please consider that a high brightness also requires more power and the connected LED matrix must be designed accordingly.0-100
running textWith the help of this parameter you can enter a text which is 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
repititionWith the help of this parameter you can repeat the display of the icon. For example, flashing icons can also be implemented.0-10

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

Fade in animations
NamedescriptionID
Fade inThe icon and, if applicable, the scrolling text are displayed with the set “show delay” time.1
Instant onThe icon and any text that has been specified are displayed immediately.2
Fly in from rightThe icon and the scrolling text that may have been set are inserted from the right into the display area. The “show delay” time defines how long this process takes.3
Fade out animations
NamedescriptionID
Fade outThe icon and, if applicable, the scrolling text are faded out with the set “out delay” time.1
Instant offThe icon and any text that has been specified are immediately hidden.2
Fly out to leftThe icon and the scrolling text that may have been set are moved to the left of the display area. The “out delay” time defines how long this process takes.3

Example

More detailed information on how you can design icons yourself, transfer them to your pxlBlck and display them there is contained in the following article


Command: FakeTV simulation

With this command you can activate a fake TV mode. As a result, color samples are played on the display of the pxlBlck, which are similar to that of a running television. This mode is worthwhile, for example, if you want to simulate presence when you are absent. This could deter burglars or curious neighbors. 🙂

Command name

pbfaketv

Command overview

pbfaketv,[enabled 0-1],

Parameter description

Parameter namedescriptionPermitted range of values
enabledWith this (only) parameter, the FakeTV mode can be activated (1) or deactivated (0).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. When you enter the command, each color and white will be displayed one after the other for one second on the connected LED matrix. This also makes it easier to find defective pixels or individual colors.

Command name

pbtest

Command overview

pbtest

Parameter description

-no parameters available-


Command: Animations

You can use animation to signal an event. For example, they are perfect for displaying an event on the slotClock/ringClock or on other models that do not support an 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 range of values
animation_typeThis parameter defines the type of animation. You can find an overview of the possible animations in the table below.1-6
color_on_redThis parameter determines the brightness of the red color in the entrance animation.0-255
color_on_greenThis parameter determines the brightness of the green color in the entrance animation.0-255
color_on_blueThis parameter determines the brightness of the blue color in the entrance animation.0-255
color_off_redThis parameter determines the brightness of the red color in the initial animation.0-255
color_off_greenThis parameter determines the brightness of the green color in the initial animation.0-255
color_off_blueThis parameter determines the brightness of the blue color in the initial animation.0-255
animation_delayWith this you can set the duration for the animation. It is specified in milliseconds and describes the display time per pixel.0-500

Overview of the animations

IDdescription
1The LED matrix is filled with the input color from the right and then overwritten with the output color to the left.
2The LED matrix is filled with the input color from the left and then overwritten with the output color to the right.
3A vertical line (in input color) moves from left to right (in output color).
4A vertical line (in the initial color) moves from left to right (in the initial color).
5The LED matrix is filled from both sides towards the center 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 various animations and how you can display them on your pxlBlck are contained in the following article


Command: Configure watch faces and screensavers

With this command you can set the displayed clock face or the screen saver. The available clock faces and screen savers depend on the set pxlBlck platform or LED matrix.

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

Command name

pbdia

Command overview

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

Parameter description

Parameter namedescriptionPermitted range of values
dial_idHere you enter the ID of the desired dial or (if specified 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

More information including pictures and videos of the various clock faces and screensavers can be found in the article


I hope everything worked as described. If not or you have any other questions or suggestions, please let me know in the comments. Also, ideas for new projects are always welcome. 🙂

Fab

P.S. 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 appreciate it that I share these information with you, I would be happy about a small donation to the coffee box. 🙂

Buy Me a Coffee at ko-fi.com

Leave a Reply

Your email address will not be published. Required fields are marked *