10011: Draw Element
Draw an element
Payload
| Field | Name | Description | Type | Unit |
|---|---|---|---|---|
| 3 | Page ID | The page to draw or update. Page ids 0-10 are reserved for system use. If no page id is provided, page id 11 will be assumed. | uint8 | |
| 5 | Status bar Enable | Show the status bar | bool | |
| 6 | Redraw Type | Possible values:
| uint8 | |
| 7 | X | X coordinate for the start of the element. If padded, this is the start of the padded area. | uint | |
| 8 | Y | Y coordinate for the start of the element. If padded, this is the start of the padded area. | uint | |
| 9 | Width | Width of the element. If padded this does not include the padding. | uint | |
| 10 | Height | Height of the element. If padded this does not include the padding. | uint | |
| 11 | Type | Type of element to draw Possible values:
| uint8 | |
| 12 | Style | Style of the element to draw. Default is BlackOnClear. Possible values:
| uint8 | |
| 13 | FontSize | Size of the font to use. Default is Medium. Possible values:
| uint8 | |
| 14 | TextAlign | Alignment of the text. Default is Middle. Possible values:
| uint8 | |
| 15 | LineWidth | Default is 1. Max is 8. | uint8 | |
| 16 | Padding | Padding inside the element (in terms of x and y). Default is 0. | uint8 | |
| 17 | Radius | For use with circle, or corner rounding. Default is 0. | uint8 | |
| 18 | LineType | Default is Solid. Possible values:
| uint8 | |
| 19 | X2 | Second X coordinate, primarily for lines. Min 0, Max WIDTH -1. | uint | |
| 20 | Y2 | Second Y coordinate, primarily for lines. Min 0, Max HEIGHT -1. | uint | |
| 25 | Bitmap | bytes | ||
| 100 | Text | ascii |
Element types
Box
Box with text

Line

Circle

Bitmap

Examples
Draw circle in the middle of a page
📡 Real example from RH2 ESP32 Toit on 2025-10-17Generated using a Toit example on an RH2 ESP32
Draw a horizontal line across the middle of the page
📡 Real example from RH2 ESP32 Toit on 2025-10-17Generated using a Toit example on an RH2 ESP32
Draw a 40x40 lightbug logo in the top left of the screen
📡 Real example from RH2 ESP32 Toit on 2025-10-17Generated using a Toit example on an RH2 ESP32
Write the string "Lightbug..." in the top left of the screen in a box
📡 Real example from RH2 ESP32 Toit on 2025-10-17Generated using a Toit example on an RH2 ESP32
Code
For convenience, the following constants can be used to reference this message type.