← 返回
未分类 中文

Iobroker Simple Api

Full access to ioBroker via the iobroker simple-api adapter. Read states, objects, historical data, write to states, execute scripts, and more.
通过 iobroker simple-api 适配器完整访问 ioBroker,可读取状态、对象、历史数据,写入状态、执行脚本等。
sanwebgit sanwebgit 来源
未分类 clawhub v1.3.0 1 版本 100000 Key: 无需
★ 1
Stars
📥 395
下载
💾 0
安装
1
版本
#latest

概述

📊 ioBroker Simple-API Skill

> Production-ready ioBroker client for OpenClaw automation.

Full access to ioBroker via the simple-api adapter. Read states, objects, historical data, write to states, execute JavaScript, and monitor your smart home. The skill automatically handles caching, rate limiting, and circuit breaker protection. Use this skill to integrate OpenClaw with your ioBroker installation for full smart home control.


🚀 Quick Start

Prerequisites

  • ioBroker with simple-api adapter installed
  • Adapter running on a port (default 8087)

Minimal Configuration

The skill auto-detects config on first run. Manual config in openclaw.json:

{
  "entries": {
    "iobroker-simple-api": {
      "config": {
        "url": "http://CHANGE_ME_IP",
        "port": 8087,
        "username": "",
        "password": ""
      }
    }
  }
}

Test Connection

health

Returns connection status, uptime, and state count.


⚙️ Configuration

OptionRequiredDefaultDescription
----------------------------------------
urlYeshttp://CHANGE_ME_IPioBroker simple-api base URL
portYes8087ioBroker simple-api port
usernameNo(empty)Basic Auth username
passwordNo(empty)Basic Auth password

Auto-Detection

The skill automatically detects the OpenClaw config path:

  1. From environment variables (OPENCLAW_HOME, OPENCLAW_STATE_DIR)
  2. From its own installation path (skill → workspace → .openclaw)
  3. Creates default config on first run if missing

Runtime Config

Change config at runtime:

config:baseUrl=http://CHANGE_ME_IP:8087
config:timeout=20000

📖 Read Operations

Get State Value

getPlainValue:javascript.0.sensor.temperature

With JSON parsing:

getPlainValue:javascript.0.data?json

Get State + Object

get:javascript.0.sensor.temperature

Get Multiple States

getBulk:javascript.0.sensor.temperature,javascript.0.sensor.humidity

List Objects/States

objects:*              # All objects
objects:javascript.0.*  # JavaScript adapter objects
states:*               # All states
states:humidity*       # States starting with humidity

Search

search:temperature
search:livingroom

Query History

query:javascript.0.sensor.temperature?dateFrom=-1h
query:system.host.*?dateFrom=-24h&aggregate=minmax

Supported time formats:

  • -1h, -30m, -7d (relative)
  • today (today at midnight)
  • 2024-01-01 (absolute)

CSV Export

csv:javascript.0.sensor.temperature?dateFrom=-24h

📤 Write Operations

Set State

set:javascript.0.light?value=on
set:javascript.0.counter?value=42&type=number&ack=true

Toggle

toggle:javascript.0.switch

Set Multiple

setBulk:javascript.0.light1=on&javascript.0.light2=off

Create/Delete State

create:javascript.0.myNewState?common={"type":"number","name":"My State"}
delete:javascript.0.myNewState

Enable/Disable

enable:javascript.0.myNewState
disable:javascript.0.myNewState

💻 Script Execution

Execute JavaScript

exec:$('javascript.0.sensor.temp').val(true)
eval:2+2

List Scripts

scripts
jsinfo

🔌 System Commands

CommandDescription
----------------------
healthConnection status, uptime, state count
cacheCache statistics (hits, misses, size)
rateRate limit status
systemHosts, memory, CPU info
runtimeUptime, CPU, memory, disk
adaptersList installed adapters
instancesAdapter instances with status
statusFull skill status

🎬 Scenes & Snapshots

Scenes

scene:mynight={"light.living":"on","light.bedroom":"off"}
scenes
activate:mynight
deletescene:mynight

Snapshots

snapshot:backup=state1,state2
snapshots
diff:snap1 vs snap2
diff:snap1 vs current

📊 Groups & Enums

groups
groups:rooms
group:enum.rooms.living

⚡ Features

Caching

  • 30 second TTL for frequently accessed states
  • Automatic cache invalidation on writes

Rate Limiting

  • 10 requests/second to prevent API flooding
  • Queue management for burst requests

Circuit Breaker

  • Auto-recovery on failures
  • Exponential backoff with jitter

Batch Operations

  • Efficient bulk get/set
  • Parallel execution option

Type Coercion

  • Convert between boolean/number/string
  • Automatic JSON parsing

Historical Queries

  • Multiple aggregation types (minmax, average, sum, count)
  • Configurable time ranges

📋 API Reference

Commands Summary

CommandDescription
----------------------
getPlainValue:Get state value
get:Get state + object
getBulk:Multiple states
objects:List objects
states:List states
search:Search data
query:?dateFrom=...Query history
set:?value=...Set state
toggle:Toggle state
setBulk:=&=Multiple writes
create:?common=...Create state
delete:Delete state
exec:Execute JS
scene:name={...}Create scene
snapshot:name=...Take snapshot
groupsList enums
healthConnection check
cacheCache stats
systemSystem info
runtimeRuntime info

📁 Resources

Files

  • skill.js - Main implementation
  • index.js - Skill loader
  • LICENSE - MIT No Attribution

🔗 External Links

版本历史

共 1 个版本

  • v1.3.0 当前
    2026-05-07 05:04 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

it-ops-security

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 90 📥 30,868
dev-programming

Mqtt Client

sanwebgit
基于Node.js/mqtt.js的OpenClaw通用MQTT客户端,支持连接管理、订阅管理、消息处理及OpenClaw集成。
★ 1 📥 625
it-ops-security

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 31,554