GeekMagic API (1.0.0)

Download OpenAPI specification:Download

GeekMagic API for customizable clock devices

shared

Delete file

Delete specified file (this endpoint always returns 'FAIL' <- WHAT)

query Parameters
file
required
string (SharedModels.ImagePathValue)
Example: file=/image//ezgif-3-d2f3e68a3c.jpg

image path value (weird but second separater is '//')

Responses

Get file list

Get uploaded file list for specified directory in html table

query Parameters
dir
required
string
Enum: "/image/" "/gif"

Responses

Update Device config (shared)

Update something option of a device. You should specify only one query in a request, if multiple queries are specified it processes only first parameter. But exceptionally, some endpoints wants multiple queries in one request. Please read below sheet carefully.

  • Settings page options:
    • brt: brightness value between -10 to 255 (seems it has no validation)
    • theme: device theme value
    • theme_list: list of theme enabled statuses separated by comma (must be called with sw_en and theme_interval)
    • sw_en: auto switch enabled status (must be called with theme_list and theme_interval)
    • theme_interval: interval in seconds (must be called with sw_en and theme_list)
    • t1: night mode schedule start time (must be called with t2, b1, b2, and en)"
    • t2: night mode schedule end time (must be called with t1, b1, b2, and en)"
    • b1: night mode schedule default brightness value (must be called with t1, t2, b2, and en)"
    • b2: night mode schedule night brightness value (must be called with t1, t2, b1, and en)"
    • en: night mode enabled status (must be called with t1, t2, b1, and b2)"
  • Image page options:
    • img: new image path want to show
    • i_i: image interval in seconds (must be called with autoplay)
    • autoplay: 1 if auto switch is enabled, 0 if auto switch is disabled (must be called with i_i)
  • Time page options:
    • tc: time color for hours in clock (must be called with mc and sc)
    • mc: time color for minutes in clock (must be called with tc and sc)
    • sc: time color for seconds in clock (must be called with tc and mc)
    • hour: clock hour format (Ex. 12 or 24)
    • day: clock day format (Ex. YYYY_MM_DD)
    • colon: 1 if colon blinking is enabled, 0 if colon blinking is disabled
    • font: time font (1: default big font, 2: digital font)
    • ntp: ntp server address
    • dst: 1 when summer time enabled, otherwise 0
  • Weather page options:
    • w_i: weather interval in minutes
    • gif: file path for bottom right mini animation (only works for weather clocks)
  • Network page options:
    • delay: delay in seconds before try to connect network at startup (default: 0)
query Parameters
brt
number (Settings.BrightnessValue) [ -10 .. 255 ]

brightness value between -10 to 255

theme
number (Settings.DeviceDesignTheme)
Enum: 1 2 3 4 5 6 7

Display design of the device

  • 1: WEATHER_CLOCK_TODAY
  • 2: WEAHTER_FORECAST
  • 3: PHOTO_ALBUM
  • 4: TIME_STYLE_1
  • 5: TIME_STYLE_2
  • 6: TIME_STYLE_3
  • 7: SIMPLE_WEATHER_CLOCK
theme_list
string
sw_en
string
theme_interval
number (SharedModels.IntervalSecondValue) [ 1 .. 2147483647 ]

interval in seconds between 1 and 2147483647 (actually it has no validation and makes overflow)

t1
number (Settings.HourValue) [ 0 .. 23 ]
t2
number (Settings.HourValue) [ 0 .. 23 ]
b1
number (Settings.BrightnessValue) [ -10 .. 255 ]

brightness value between -10 to 255

b2
number (Settings.BrightnessValue) [ -10 .. 255 ]

brightness value between -10 to 255

en
number (SharedModels.BooleanLikeNumberValue)
Enum: 1 0

1 if enabled, 0 if disabled (this api doesn't use boolean)

img
string (SharedModels.ImagePathValue)
Example: img=/image//ezgif-3-d2f3e68a3c.jpg

image path value (weird but second separater is '//')

i_i
number (SharedModels.IntervalSecondValue) [ 1 .. 2147483647 ]

interval in seconds between 1 and 2147483647 (actually it has no validation and makes overflow)

autoplay
number (SharedModels.BooleanLikeNumberValue)
Enum: 1 0

1 if enabled, 0 if disabled (this api doesn't use boolean)

tc
string (SharedModels.HtmlColorValue) ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$
Example: tc=#FFFFFF

HTML color in hex

mc
string (SharedModels.HtmlColorValue) ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$
Example: mc=#FFFFFF

HTML color in hex

sc
string (SharedModels.HtmlColorValue) ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$
Example: sc=#FFFFFF

HTML color in hex

hour
number (Time.TimeHourFormat)
Enum: 0 1
day
number (Time.DateFormat)
Enum: 1 2 3 4 5
colon
number (SharedModels.BooleanLikeNumberValue)
Enum: 1 0

1 if enabled, 0 if disabled (this api doesn't use boolean)

font
number (Time.TimeFont)
Enum: 1 2
ntp
string
dst
number (SharedModels.BooleanLikeNumberValue)
Enum: 1 0

1 if enabled, 0 if disabled (this api doesn't use boolean)

w_i
number (SharedModels.IntervalMinuteValue) [ 1 .. 2147483647 ]

interval in minutes between 1 and 2147483647 (actually it has no validation and makes overflow)

gif
string (SharedModels.ImagePathValue)
Example: gif=/image//ezgif-3-d2f3e68a3c.jpg

image path value (weird but second separater is '//')

delay
number (SharedModels.IntervalSecondValue) [ 1 .. 2147483647 ]

interval in seconds between 1 and 2147483647 (actually it has no validation and makes overflow)

Responses

Get device storage info

Get device total and free storage size in bytes

Responses

Response samples

Content type
application/json
{
  • "total": 3121152,
  • "free": 97804
}

Upload file

Upload file to specified directory The file format recommendation is different for each directory.

  • "/image"
    • Extension must be JPG or GIF
    • Resolusion must be 240x240px
  • "/gif"
    • Extension must be GIF
    • Resolusion must be 80x80px or lower
query Parameters
dir
required
string
Enum: "/image" "/gif"
Request Body schema: multipart/form-data
required
file
required
string <binary>

Responses

settings

Get Device Theme

Get current device theme value

Responses

Response samples

Content type
application/json
{
  • "theme": 1
}

Get Device Auto Switch Theme

Get current device auto switch theme value

Responses

Response samples

Content type
application/json
{
  • "sw_en": 1,
  • "theme": "string",
  • "sw_i": 1
}

Get Device brightness

Get current device brightness value between -10 to 255

Responses

Response samples

Content type
application/json
{
  • "brt": 128
}

Get Device brightness schedule (night mode config)

Get current device brightness schedule (night mode config)

Responses

Response samples

Content type
application/json
{
  • "en": 1,
  • "t1": 23,
  • "t2": 23,
  • "b2": -10
}

Get Device information

Get device name and version

Responses

Response samples

Content type
application/json
{
  • "m": "SmallTV-Ultra",
  • "v": "Ultra-V9.0.26"
}

pictures

Get Device Auto Display

Get image carousel config status

Responses

Response samples

Content type
application/json
{
  • "autoplay": 0,
  • "i_i": 10
}

time

Get colon blinking in clock configuration

Get current colon blinking status in clock configuration

Responses

Response samples

Content type
application/json
{
  • "colon": 0
}

Get date format configuration

Get current date format configuration

Responses

Response samples

Content type
application/json
{
  • "day_fmt": 1
}

Get summer time configuration

Get current summer time configuration

Responses

Response samples

Content type
application/json
{
  • "dst": 0
}

Get font configuration

Get current font configuration

Responses

Response samples

Content type
application/json
{
  • "font": 1
}

Get clock hour format (12 or 24) configuration

Get current clock hour format configuration

Responses

Response samples

Content type
application/json
{
  • "h": 0
}

Get ntp server configuration

Get current ntp server configuration

Responses

Response samples

Content type
application/json
{
  • "ntp": "pool.ntp.org"
}

Get time number color configuration

Get current time number color configuration (seems not working?)

Responses

Response samples

Content type
application/json
{
  • "hc": "#ffffff",
  • "mc": "#feba01",
  • "sc": "#ff5900"
}

weather

Get current city code for weather forecast

Get current city code for weather forecast

Responses

Response samples

Content type
application/json
{
  • "cd": "1850147",
  • "ct": "Tokyo",
  • "loc": "Tokyo,JP",
  • "mt": "0",
  • "t": "9"
}

Get weather forecast api key configuration

Get current weather forecast api key (untested)

Responses

Response samples

Content type
application/json
{
  • "key": "1234567890"
}

Get weather unit format configuration

Get current weather unit format configuration

Responses

Response samples

Content type
application/json
{
  • "w_u": "m/s",
  • "t_u": "°C",
  • "p_u": "hPa"
}

Get weather update interval configuration

Get current weather update interval configuration

Responses

Response samples

Content type
application/json
{
  • "w_i": 20
}

network

Get network configuration

Get current network SSID and PASSWORD

Responses

Response samples

Content type
application/json
{
  • "a": "SSID",
  • "p": "password"
}

Get network delay configuration

Get network connection delay in seconds

Responses

Response samples

Content type
application/json
{
  • "d": 0
}

Update network configuration

Update network SSID and PASSWORD

query Parameters
s
required
string

new network SSID

p
required
string

new network PASSWORD (PLAIN TEXT)

Responses