npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aqara-claw/aqara-home-assistant

v0.1.0

Published

OpenClaw Home Assistant plugin — device discovery, entity state reading, and service calls via HA REST API

Readme

@aqara-claw/aqara-home-assistant

OpenClaw plugin for Home Assistant integration — device discovery, entity state reading, service calls, and event firing via the HA REST API.

Features

  • Proxy bypass — uses a direct-connect HTTP agent so LAN requests never route through HTTP_PROXY / HTTPS_PROXY.
  • IPv4 priority — forces dns.setDefaultResultOrder("ipv4first") to prevent connection failures when the OS resolver returns an IPv6 address for a LAN hostname.
  • In-memory entity cache — reduces redundant API calls; cache is automatically populated on discovery and refreshed per-entity on demand.

Installation

// openclaw.config.json
{
  "plugins": {
    "allow": ["aqara-home-assistant"],
    "entries": {
      "aqara-home-assistant": {
        "enabled": true,
        "config": {
          "ha_url": "http://192.168.1.100:8123",
          "access_token": "<YOUR_LONG_LIVED_TOKEN>"
        }
      }
    }
  }
}

Configuration

| Option | Type | Default | Description | | -------------- | -------- | ------- | ------------------------------------------------------- | | ha_url | string | — | Home Assistant base URL (e.g. http://192.168.1.100:8123) | | access_token | string | — | Long-lived access token (HA → Profile → Security) | | timeoutMs | number | 15000 | HTTP request timeout in milliseconds |

Generating an access token: In Home Assistant, go to your user ProfileSecurityLong-Lived Access TokensCreate Token.

Agent Tools

| Tool | Purpose | Parameters | | --------------------------- | ---------------------------------- | ------------------------------------------------- | | ha_check_connection | Verify HA connectivity | (none) | | ha_discover_entities | Fetch & cache all entity states | (none) | | ha_get_entity_state | Get a single entity's state | entity_id | | ha_list_entities_by_domain| List entities for a domain | domain | | ha_call_service | Call an HA service | domain, service, service_data? | | ha_get_services | List available services | domain? | | ha_fire_event | Fire a custom event | event_type, event_data? |

Typical Workflow

1. ha_check_connection            → verify HA is reachable
2. ha_discover_entities           → populate the entity cache
3. ha_list_entities_by_domain     → e.g. domain="light" to see all lights
4. ha_get_entity_state            → e.g. entity_id="light.living_room"
5. ha_call_service                → e.g. domain="light", service="turn_on",
                                     service_data={"entity_id":"light.living_room","brightness":200}

Project Structure

aqara-home-assistant/
├── index.ts                  Plugin entry point
├── openclaw.plugin.json      Plugin metadata & config schema
├── package.json
├── tsconfig.json
└── src/
    ├── types.ts              TypeScript type definitions
    ├── config-schema.ts      Zod config validation
    ├── runtime.ts            Plugin runtime singleton
    ├── ha-client.ts          HA REST API client (proxy bypass + IPv4 priority)
    ├── store.ts              In-memory entity cache
    └── tools/
        ├── schemas.ts        TypeBox tool parameter schemas
        ├── actions.ts        Tool execution logic
        └── index.ts          Tool registration & config resolution

License

MIT