Logo vun Weather Clock

Weather Clock

Organisatioun
espressif
weather_clock

Show a live clock and current/two-day weather forecast on the board display. Defaults to Shanghai; supports another city. Requires a Seniverse API key and HTTP allowlist for api.seniverse.com.

Iwwersiicht

Editeurespressif
Repositoryesp-claw-skills-lab
Skill-Nummweather_clock
Stären
37
Forks
19
Matgeliwwert Fichieren
2
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 2 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum espressif op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Weather Clock an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/espressif/esp-claw-skills-lab/tree/master/skills/weather_clock
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/espressif/esp-claw-skills-lab.git /tmp/esp-claw-skills-lab
mkdir -p .claude/skills
cp -r /tmp/esp-claw-skills-lab/skills/weather_clock .claude/skills/weather_clock
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Weather Clock an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Weather Clock automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Weather Clock net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Weather Clock

Use this skill when the user wants the device screen to show the current time and weather.

The skill uses Seniverse (Xinzhi Weather) APIs. Seniverse requires an API key. Use plain http://api.seniverse.com endpoints so it can run on builds where HTTPS/TLS requests are not available. The device HTTP allowlist must allow api.seniverse.com.

Before starting or switching Weather Clock, make sure the user has a Seniverse API key. If the user has not provided one, guide them to register or log in at https://www.seniverse.com, open the Seniverse console/API key page, copy the API key, and send it back. Do not invent an API key.

The script stores the Seniverse API key together with the selected location in the DATA-root file weather_clock/config.json. On the next startup, it automatically reads weather_clock/config.json and reuses the saved api_key, location, and timezone. Do not create a separate API-key file.

Every weather call must explicitly tell the device both:

  • api_key: the user's Seniverse API key.
  • location: the queried location, preferably an ASCII city name or Seniverse city V3 ID.

Do not use latitude and longitude for Seniverse requests. Seniverse weather APIs use the location parameter.

Start Weather Clock

Run the controller asynchronously because it owns the display and refreshes continuously:

json
{"path":"{CUR_SKILL_DIR}/scripts/start_weather_clock.lua","args":{"api_key":"<SENIVERSE_API_KEY>","location":"Shanghai"},"timeout_ms":0,"name":"weather_clock","exclusive":"display","replace":false,"log_bytes":4096}

Starting this async script is the only Lua tool call needed to start Weather Clock. The script starts local control endpoints at /api/lua/weather_clock/control and /api/lua/weather_clock/icon, and calls Seniverse internally through Lua capability.call("http_request", ...). Do not claim the weather has already been fetched just because the async job started; say that Weather Clock is running and will fetch Seniverse data in the background. To verify the fetch, inspect the async job log for lines such as [weather_clock] HTTP Seniverse now, [weather_clock] HTTP Seniverse daily, and [weather_clock] weather updated.

By default it uses Shanghai:

json
{"location":"Shanghai","timezone":"Asia/Shanghai"}

To start Weather Clock directly on another city when it is not already running, pass the API key and queried location:

json
{"path":"{CUR_SKILL_DIR}/scripts/start_weather_clock.lua","args":{"mode":"switch","api_key":"<SENIVERSE_API_KEY>","location":"Beijing","timezone":"Asia/Shanghai"},"timeout_ms":0,"name":"weather_clock","exclusive":"display","replace":false,"log_bytes":4096}

When starting directly, use a Seniverse city V3 ID when available:

json
{"path":"{CUR_SKILL_DIR}/scripts/start_weather_clock.lua","args":{"mode":"switch","api_key":"<SENIVERSE_API_KEY>","location":"WX4FBXXFKE4F","timezone":"Asia/Shanghai"},"timeout_ms":0,"name":"weather_clock","exclusive":"display","replace":false,"log_bytes":4096}

Control Location

When the user asks to change the city/location or query a city's weather while Weather Clock is running, do not run any Lua script and do not replace the display job. Send an HTTP POST to the local Weather Clock control endpoint instead. This lets the currently running Weather Clock page call Seniverse and redraw its existing LVGL UI in place.

Local control endpoint:

json
{"url":"http://127.0.0.1/api/lua/weather_clock/control","method":"POST","headers":{"Content-Type":"application/json"},"body":"{\"mode\":\"switch\",\"api_key\":\"<SENIVERSE_API_KEY>\",\"location\":\"Beijing\",\"timezone\":\"Asia/Shanghai\"}","timeout_ms":15000,"max_body_bytes":1024}

Use mode: "switch" when the user asks to switch/change the current city. This changes the stored default and updates the current screen in place:

json
{"url":"http://127.0.0.1/api/lua/weather_clock/control","method":"POST","headers":{"Content-Type":"application/json"},"body":"{\"mode\":\"switch\",\"api_key\":\"<SENIVERSE_API_KEY>\",\"location\":\"Beijing\",\"timezone\":\"Asia/Shanghai\"}","timeout_ms":15000,"max_body_bytes":1024}

Use mode: "query" when the user asks to query/check a city without saying to switch the current default. This displays the queried weather on the current screen but does not change the stored default:

json
{"url":"http://127.0.0.1/api/lua/weather_clock/control","method":"POST","headers":{"Content-Type":"application/json"},"body":"{\"mode\":\"query\",\"api_key\":\"<SENIVERSE_API_KEY>\",\"location\":\"Beijing\",\"timezone\":\"Asia/Shanghai\"}","timeout_ms":15000,"max_body_bytes":1024}

Use an ASCII city name for location unless the user provides a Seniverse city V3 ID. If the user gives a non-ASCII city name, translate it to an English city name before calling the script, for example use Beijing for 北京.

Before calling the script, tell the user which Seniverse API key status and location will be sent to the device, for example: Using Seniverse API key: provided; location: Beijing. Do not print the full API key back to the user unless they explicitly ask.

For the most reliable result, include the Seniverse city V3 ID:

json
{"url":"http://127.0.0.1/api/lua/weather_clock/control","method":"POST","headers":{"Content-Type":"application/json"},"body":"{\"mode\":\"switch\",\"api_key\":\"<SENIVERSE_API_KEY>\",\"location\":\"WX4FBXXFKE4F\",\"timezone\":\"Asia/Shanghai\"}","timeout_ms":15000,"max_body_bytes":1024}

If the HTTP POST returns connection refused or 404, Weather Clock is not running yet. Start start_weather_clock.lua asynchronously once, then retry the local control POST.

After a switch or query control POST, report that the request was sent to Weather Clock, not that the HTTP fetch is complete unless the async job log confirms it.

Set Weather Icon

When the user wants to manually test or change the weather icon while Weather Clock is running, do not run a Lua script. Send an HTTP POST to the local icon endpoint:

json
{"url":"http://127.0.0.1/api/lua/weather_clock/icon","method":"POST","headers":{"Content-Type":"application/json"},"body":"{\"icon\":\"rain\"}","timeout_ms":15000,"max_body_bytes":1024}

Valid icon values:

  • clear
  • cloudy
  • partly
  • rain
  • thunder
  • snow
  • wind
  • fog
  • night
  • auto

Aliases are accepted for common names such as sunny, cloud, rainy, thunderstorm, snowy, windy, foggy, and partly_cloudy.

Sending auto clears the manual icon override and returns to the icon selected from the latest weather API result:

json
{"url":"http://127.0.0.1/api/lua/weather_clock/icon","method":"POST","headers":{"Content-Type":"application/json"},"body":"{\"icon\":\"auto\"}","timeout_ms":15000,"max_body_bytes":1024}

The icon endpoint changes only the icon. It does not change city, weather text, temperature, date, or stored default settings. Automatic weather updates use the same LVGL icon drawing function with the icon kind mapped from Seniverse weather codes.

Behavior

  • The clock reads local device time through system.date, which uses the system time synchronized by SNTP after Wi-Fi connects.
  • The clock label refreshes once per second and displays time down to minutes.
  • Weather refreshes immediately at startup and then once every hour.
  • Switch requests store the Seniverse API key and location in weather_clock/config.json under the DATA root.
  • Startup automatically reads weather_clock/config.json and reuses the saved API key and location.
  • Query requests display the requested location without changing the stored default.
  • The default forecast covers today and tomorrow.
  • Screen text is ASCII-only. Temperature uses a C label with a small LVGL-drawn dot near its upper-left instead of the ° character.
  • If using a free Seniverse account, follow Seniverse's attribution requirement when displaying weather data.
  • Weather icons are drawn with LVGL objects and line widgets, not loaded as bitmap image files.
  • Seniverse weather codes are mapped to clear, cloudy, partly cloudy, rain, thunderstorm, snow, wind, night, and fog icons.
  • If time is not synchronized yet, the display keeps running and shows a waiting status until system.date becomes available.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Weather Clock?

Show a live clock and current/two-day weather forecast on the board display. Defaults to Shanghai; supports another city. Requires a Seniverse API key and HTTP allowlist for api.seniverse.com.

Firwat Weather Clock op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Weather Clock besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Weather Clock an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/espressif/esp-claw-skills-lab/tree/master/skills/weather_clock an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Weather Clock benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Weather Clock benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Weather Clock domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Weather Clock gratis?

Jo. De Skill gëtt vum espressif ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇