VALID PRESETS:

00 = Autostart Preset
01 - 99 Flash-Filesystem-Presets
0R - 9R RAM-Presets, volatile

VALID BANKS:

A – Z = 26 Banks, each containing 100 Presets Bank A is default bank. It hosts the Main Loop, if enabled. It´s first Preset (00) is the Autostart Preset, witch the device will start after power-on or reset

MQTT COMMANDS:

* = SCRIPT identifier. Script-Lines alway start with *; and end with ;
; = COMMAND DELIMITER
xxxxxx = Six character hex-value per clock pixel, so 216 chars for complete 6x6 matrix
Lxx = LOAD and display preset xx
Lbxx = LOAD and display preset xx from preset-bank b (b = capital letter from A-Z, xx = preset nr)
Lbxx,yy,zz = LOAD and display preset xx in preset-bank b in the pixel-range yy to zz (b = capital letter from A-Z (optional), xx = preset nr, yy = start-pixel, zz = end-pixel)
Txx = TRANSITION-speed for morphing and scrolltext (xx = speed 00 and 99, smaller = faster)
Mxx = MORPH to preset nr xx
Mbxx = MORPH to preset nr xx in preset-bank b (b = capital letter from A-Z, xx = preset nr)
Mbxx,yy,zz = MORPH to preset nr xx in preset-bank b in the pixel-range yy to zz (b = capital letter from A-Z (optional), xx = preset nr, yy = start-pixel, zz = end-pixel)
Syyxxxxxx = SAVE hex-pixels or script (xxxxxx (up to 36 pixels = 216 hex-chars) or script) to preset yy
Sbyyxxxxxx = SAVE hex-pixels or script (xxxxxx (up to 36 pixels = 216 hex-chars) or script) to preset yy in preset-bank b
Wxxxx = WAIT xxxx/100 Seconds (eg. W0100 waits 1 second) ; W0000 waits for end of running morph
WMxx = WAIT xx/1000 Seconds (eg. WM01 waits 1/1000 second)
H = HALT clock hands drawing
G = GO and enable clock hands drawing
Xxx = Delete preset xx
Xbyy = Delete preset yy from preset-bank b
Ixxxxxxyyyyyy = Set Ink- and background-color for pixelset functions
IR = Set Ink- and background-color to random values
D = Begin DO loop
Rxxxx = REPEAT from DO xxxx times (set xxxx = 0 for endless Loop) (max. loop nesting depth is 10)
Oxx = Set pixel xx to fOregroundcolor set by I command (xx = value between 0 and 35)
Oxx,yy = Tint pixelrange xx to yy with fOregroundcolor set by I command (each value between 0 and 35)
OR = Set random pixel to fOregroundcolor
Jx = JOGG-scroll-funktion (x = 0 -> pixels forward | x = 1 -> pixels backward | x = 2|3|4|5 -> rotate up|right|down|left | x = 6|7|8|9 -> shift up|right|down|left ). The shift feature takes into account the currenty set background color
Jx,yyy,zzz = JOGG rotate pixels in range from yyy to zzz with direction x (x = 0 -> clockwise | x = 1 -> counterclockwise)
" = Begin of Scroll-Text-Message, has to be terminated with second " (eg. "Hello World")
?xx = Send content of preset xx via MQTT to own topic. Response is prefixed with ;
?bxx = Send content of preset xx from preset-bank b via MQTT to own topic. Response is prefixed with ;
??xx = Send content of preset xx via MQTT to own topic. Response is prefixed with ;;xx (response contains preset-number)
??bxx = Send content of preset xx from preset-bank b via MQTT to own topic. Response is prefixed with ;;xx (response contains preset-number but not bank)
??? = Send comma-separated list of existing presets in current preset-bank
???? = Send all Presets
& = Send current framebuffer in hexformat prefixed with ;
! = Start Main Loop (starting with preset 01 to first preset containing a ! then loops back from preset 01 – Main Loop is bound to bank A
- = Stop Main Loop execution
= = Do resync with NTP-Time-Server now
ZXxx = Set overall brightness (xx = hex-value)
V = Send Firmware-Version followed by hash sign(#) followed by time and date. Response is prefixed with ;V
Nxxxxx,yyyy = Generate NOISE ( tone with xxxxx Hz and yyyy/100 seconds duration, whilst execution is nonblocking) ( if frequency is either 0 or 1 then loopcounter or 5000-loopcounter is used as frequency (for simple sound-effects like eg. alarm) )
POxx,y = PORT OUTPUT to GPIO pin xx with logic state y (y = 0 -> low | y = 1 -> high)
PIxx = PORT INPUT from GPIO pin xx - Port state is sent back as ;Pxx;y where xx is the requestet port and y is 0 or 1 depending on port-state
PTxx,yy,zz,x = PORT TRIGGER on GPIO pin xx level-change. On HIGH->LOW go to preset yy, on LOW->HIGH go to preset zz. x = 0 (first branch on next level-change) or 1 (first branch now)
PTC = PORT TRIGGER CLEAR
XX = Reset Device (restart)
XXX = Reset WiFi-Credentials (delete WiFi-Credentials and restart)
XXXX = Check for Firmware-Update (only restart device when new firmware is available and installed)
$x = Switch preset-bank to x ( x = capital letter from A-Z so 26 preset-banks with 100 presets each = 2600 presets). Bank A is default preset-bank
@xx:yy,zzz,f = Schedule task to start preset nr zzz (e.g. A98) AT xx:yy clock (e.g. 23:00). On reset or power-up of the device, only process previous scheduled tasks of the day that have 1 as f, otherwise ignore this task if it is in the past.
@E = ENABLE scheduler
@D = DISABLE scheduler
@C = CLEAR scheduler
~ = Ignore WiFi outages (include in autostart-preset to avoid restarts on loss of WiFi signals)
<xxxxx,yyyyy> = Send MQTT message to given topic (xxxxx = MQTT-Topic, yyyyy = MQTT-Message)

SCRIPT EXAMPLE:

EXAMPLE: *;T08;IFF0000000000;"rot ";W0000;I00FF00000000;"gruen ";W0000;I0000FF000000;"blau ";W0000;IFFFFFF000000;
RESULT: Set morph-speed to 8, set foreground-color to red and background to black, display text "rot ", wait for scrolling end, set foreground green, display text "gruen ", wait again for scrolling to complete, set foreground to blue, display text "blau ", wait for end of text-display, reset to default ink (bg: black, fg: white)

EXAMPLE: *;D;IFFFFFFFF00FF;J8;W0020;IFFFFFF00FFFF;J8;W0020;IFFFFFFFFFF00;J8;W0020;R0100;
RESULT: Start loop, set foreground-color to white and background-color to magenta, shift display down (always one pixel), wait 200 ms, set foreground-color to white and background-color to cyan, shift display down, wait 200 ms, set foreground-color to white and background-color to yellow, wait 200 ms, repeat 100 times from loop-start

PUSH BUTTON

Press button to cycle through presets on bank A
Store a single @ in a preset to reset button-cycle to preset 01 (e.g. @ in preset 5 will give folowing button-cycle-sequence: 1,2,3,4,1,2,3,4,1,2,3,4......)
If no preset with @ exists, button will cycle from 1 to 99 and then start again at preset 1 of bank A, banks will never automatically switch!