← 返回
未分类 Key 中文

Ostrom Energy

Fetch Ostrom hourly electricity spot prices, find cheapest appliance/EV charging windows, and trigger smart-home actions from price thresholds. Use for Ostro...
获取Ostrom每小时电价,查找最便宜的电器/电动车充电时段,根据价格阈值触发智能家居操作。用于 Ostro...
pmagnomuller
未分类 clawhub v1.0.1 1 版本 100000 Key: 需要
★ 0
Stars
📥 291
下载
💾 0
安装
1
版本
#latest

概述

Ostrom Energy

When to use

Use when the user asks about:

  • Current or upcoming electricity spot prices
  • Cheapest time to run a load (dishwasher, laundry, EV charging)
  • Device actions based on price thresholds

Setup

Set environment variables before running:

export OSTROM_CLIENT_ID="your_ostrom_client_id"
export OSTROM_CLIENT_SECRET="your_ostrom_client_secret"
export OSTROM_ZIP="optional_zip_code"
export OSTROM_ENV="production" # or sandbox

OSTROM_ZIP is optional, but recommended to include local taxes/levies and grid/base fees.

For persistent configuration, create ~/.config/ostrom-energy/config.json:

mkdir -p ~/.config/ostrom-energy
cp config.json.example ~/.config/ostrom-energy/config.json
$EDITOR ~/.config/ostrom-energy/config.json

For local testing only, copy .env.example to .env in this skill folder and fill values. Never commit real credentials.

The scripts use credentials in this order:

1) environment variables (OSTROM_*), including values loaded from .env by run.sh

2) ~/.config/ostrom-energy/config.json

3) interactive prompt (only if you pass --prompt-missing-secrets)

Run

Always run from this skill directory unless a local wrapper has been installed.

Reliable skill-directory form:

bash run.sh prices

Direct executable from the skill directory:

./ostrom-energy prices

Optional one-time local CLI install:

bash install-local-command.sh
ostrom-energy prices

If ostrom-energy says command not found, use bash run.sh ... or run bash install-local-command.sh from this folder.

Commands

1) Fetch current and upcoming hourly spot prices

bash run.sh prices --hours 36

2) Find optimal time for appliance or EV charging

Estimate hours from kwh / power-kw, then find cheapest contiguous block:

bash run.sh optimize \
  --kwh 28 \
  --power-kw 11 \
  --window-start "2026-04-27T18:00:00+02:00" \
  --window-end "2026-04-28T08:00:00+02:00"

For fixed duration instead of kWh:

bash run.sh optimize --duration-hours 2

3) Control smart-home devices by price threshold

Use shell commands for your automation endpoint, Home Assistant script, or smart plug CLI.

Dry-run:

bash run.sh control \
  --price-below 0.20 \
  --on-command "ha service call switch.turn_on --entity_id switch.ev_charger" \
  --off-command "ha service call switch.turn_off --entity_id switch.ev_charger"

Execute commands:

bash run.sh control \
  --price-above 0.40 \
  --on-command "ha service call switch.turn_on --entity_id switch.boiler" \
  --off-command "ha service call switch.turn_off --entity_id switch.boiler" \
  --execute

Notes

  • The skill obtains an OAuth2 token via client credentials (/oauth2/token) before each run.
  • Prices come from /spot-prices and are shown as:
  • spot = grossKwhPrice (ct/kWh)
  • taxes = grossKwhTaxAndLevies (ct/kWh)
  • total = spot + taxes
  • optimize and control use total converted to EUR/kWh.
  • Start with dry-run control mode and verify commands before --execute.

Safety

  • Never commit or publish .env with real credentials.
  • Keep --execute off until threshold logic is verified in dry-run.
  • Treat --on-command and --off-command as trusted input only (they run as shell commands).
  • By default the scripts are non-interactive; pass --prompt-missing-secrets only when you want to enter credentials interactively.

Publisher Checklist (ClawHub)

  • Include: SKILL.md, run.sh, ostrom-energy, install-local-command.sh, ostrom_energy.py, .env.example, config.json.example, .gitignore
  • Exclude: .env, __pycache__/, local logs, temporary files
  • Validate from a clean shell:
  • bash run.sh --help
  • ./ostrom-energy --help
  • bash install-local-command.sh && ostrom-energy --help
  • With valid credentials: bash run.sh prices --hours 6
  • bash run.sh optimize --duration-hours 2
  • bash run.sh control --price-below 0.20 --on-command "echo on" --off-command "echo off"

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-08 00:33 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,350 📥 317,716
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,211 📥 266,173
ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,056 📥 796,118