Skip to content

E-Ink Display Spec

Device-side specification for the wifi e-ink displays (MEDORO panels, 800x480, black/white/red/yellow). Source: vendor OpenAPI 3.1 schema (eink-openapi-3.1.yaml). See Server E-Ink Integration for how SafeCall serves these devices.

Polling model

Each display is configured with a server URL. It calls it periodically:

GET https://<server>/eink/display?voltage=1.66&mac=A0:F2:62:46:F8:38
  • mac — the display's MAC address (its identity)
  • voltage — current battery voltage

The response body must be the layout JSON (no envelope), encoded as Windows-1250 (Central European, required for Czech diacritics). The firmware compares the version field with the version of the layout it last drew; if it differs, it redraws.

Layout document

json
{
  "rotation": "0",
  "validity": "30",
  "version": "2",
  "objects": [ ... ]
}
FieldMeaning
rotationDisplay rotation: 03 (quarter turns; 0 = landscape)
validitySeconds between device polls ("how often it checks whether the UI changed")
versionLayout version, max 99, then restart from 1. The device redraws only when this changes
objectsDrawing primitives, rendered in array order (later objects paint on top)

All numeric values are integers encoded as strings ("50", not 50).

Drawing primitives

typeFieldsDescription
texttext, x, y, font, colorText; (x, y) is the baseline-left position
fillrectx, y, w, h, colorFilled rectangle
drawrectx, y, w, h, colorRectangle outline
fillroundrectx, y, w, h, r, colorFilled rounded rectangle
drawroundrectx, y, w, h, r, colorRounded rectangle outline
drawlinex0, y0, x1, y1, colorLine segment
fillcirclex, y, r, colorFilled circle (center + radius)
drawcirclex, y, r, colorCircle outline

Colors

IdColor
0Black (GxEPD_BLACK, default)
1White (GxEPD_WHITE)
2Red (GxEPD_RED)
3Yellow (GxEPD_YELLOW)

Fonts

Firmware font ids (Verdana, regular and bold):

IdFontIdFont
0Verdana 10pt (default)6Verdana 32pt
1Verdana Bold 24pt7Verdana Bold 10pt
2Verdana 10pt8Verdana Bold 12pt
3Verdana 12pt9Verdana Bold 16pt
4Verdana 16pt10Verdana Bold 24pt
5Verdana 24pt11Verdana Bold 32pt

Encoding rules

  • The JSON must be served as Windows-1250 bytes (Content-Type: application/json; charset=windows-1250). UTF-8 responses render Czech characters incorrectly.
  • Characters outside Windows-1250 cannot be displayed; SafeCall substitutes ?.
  • Although the vendor schema describes the response as ISO-8859-2, deployed panels render byte 0xA9 as ©. Windows-1250 sends Š as 0x8A, which matches the firmware's Central European font table.

Constraints summary

  • version wraps: 1 → 99 → 1. Never exceed 99.
  • Keep validity reasonable — every poll wakes the radio and an e-ink redraw is slow and flashes the panel.
  • Display resolution of the deployed panels: 800x480 (coordinates up to 799/479 in landscape).