← 返回
未分类 中文

Morning Wake-Up

Morning wake-up automation that fetches today's weather and matches it to a Sonos playback preset. Use when the user asks for a morning routine, wake-up auto...
早晨唤醒自动化,获取今日天气并匹配到Sonos播放预设。当用户询问早晨例行程序、唤醒自动化等时使用。
terrycarter1985
未分类 clawhub v1.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 247
下载
💾 0
安装
1
版本
#latest

概述

Morning Wake-Up

Automate a morning wake-up flow: fetch weather → match preset → play on Sonos.

Prerequisites

  • Weather skill (Open-Meteo, no API key)
  • Sonos CLI (sonos) installed and speakers on local network
  • At least one Sonos favorite configured per weather category

Weather-to-Preset Mapping

Weather CategoryWMO CodesDefault Sonos Favorite
---------
sunny0, 1Morning Sunshine
cloudy2, 3, 45, 48Cloudy Morning
rain51–67, 80–82Rainy Day
snow71–77, 85–86Winter Morning
storm95–99Storm Chaser

Override defaults by editing scripts/presets.json.

Manual Run

# From the skill directory
bun scripts/wake-up.ts --location "Shanghai" --speaker "Living Room"

Parameters:

  • --location (required): City name or "lat,lon"
  • --speaker (required): Sonos speaker name
  • --volume (optional, default 15): Start volume (0–100)
  • --units (optional, default "celsius"): "celsius" or "fahrenheit"

Scheduled Automation (cron)

Set up a daily cron job via OpenClaw:

cron add — schedule: "0 7 * * *" — payload: "Run morning-wake-up for location Shanghai on speaker Living Room"

The agent reads this skill, then executes the wake-up script.

How It Works

  1. Fetch weather — calls Open-Meteo API for current conditions at the given location
  2. Map weather code — translates WMO code to a category using presets.json
  3. Play on Sonos — opens the matching Sonos favorite and sets volume

Troubleshooting

  • sonos discover fails → see sonoscli skill troubleshooting (Local Network permission, sandbox mode)
  • No matching favorite → falls back to the first available Sonos favorite
  • Weather API unreachable → uses last known category if cached, otherwise defaults to cloudy

版本历史

共 1 个版本

  • v1.1.0 当前
    2026-05-21 14:52 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Code Formatter

terrycarter1985
代码格式化最佳实践及常用语言(Python、JavaScript、JSON、Markdown 等)的快速参考,使用 Prettier、Black、ESLint 等工具。
★ 0 📥 669

Python Support

terrycarter1985
OpenClaw代理的Python语言支持,提供环境配置、依赖管理、代码检查、测试及Python代码执行最佳实践。
★ 0 📥 669

Stock Price Alert

terrycarter1985
股价异动实时提醒,支持行情接口、邮件和Sonos语音播报
★ 0 📥 691