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

homebridge-xiaomi-powerstrip-km81

v0.1.7

Published

Homebridge plugin for Xiaomi Power Strip (single unified switch; auto-detect miot/legacy).

Readme

homebridge-xiaomi-powerstrip-km81

Homebridge에서 샤오미 멀티탭 / 스마트 플러그를 제어할 수 있는 플러그인입니다.
이 플러그인은 기기가 MIoT 프로토콜(get_properties/set_properties) 또는 miIO 레거시 프로토콜(get_prop/set_power)을 사용하는지 자동으로 감지하여 적절히 동작합니다.

✨ 주요 기능

  • 샤오미 멀티탭/플러그를 HomeKit에서 단일 스위치로 제어
  • MIoT ↔ miIO 프로토콜 자동 감지 및 전환
  • 폴링 주기 설정 가능 (기본 15초, 최소 3초)
  • 낙관적 업데이트(토글 시 상태가 되돌아가지 않도록 처리)
  • 디버그 로그 옵션 제공 (지원하지 않는 메서드 확인용)
  • 선택적으로 기기 모델명 힌트를 설정해 인식률 향상 (예: zimi.powerstrip.v2, chuangmi.plug.v3)

🔧 설치 방법

npm install -g homebridge-xiaomi-powerstrip-km81

또는 Homebridge UI에서 homebridge-xiaomi-powerstrip-km81를 검색하여 설치할 수 있습니다.

⚙️ 설정 예시

config.json 예시:

{
  "platforms": [
    {
      "platform": "XiaomiPowerStripPlatform",
      "deviceCfgs": [
        {
          "name": "거실 멀티탭",
          "ip": "192.168.1.55",
          "token": "YOUR32CHARTOKENHEXHERE",
          "serialNumber": "123456789",
          "pollingInterval": 15000,
          "model": "zimi.powerstrip.v2",
          "protocolMode": "auto",
          "debug": false
        }
      ]
    }
  ]
}

설정 항목 설명

| 항목 | 타입 | 기본값 | 설명 | |------------------|---------|---------|------| | name | string | "Xiaomi Power Strip" | HomeKit에 표시될 이름 | | ip | string | 필수 | 기기의 IP 주소 | | token | string | 필수 | 32자리 HEX 토큰 (miio 툴 등으로 추출) | | serialNumber | string | 선택 | Home 앱에 표시될 일련번호 | | pollingInterval| int | 15000 | 상태 폴링 주기(ms), 최소 3000 | | model | string | 선택 | 기기 모델 힌트 (예: chuangmi.plug.v3) | | protocolMode | enum | auto | auto, miot, legacy 중 선택 | | debug | boolean | false | 디버그 로그 출력 여부 |

🛠 문제 해결

  • HomeKit에서 스위치를 켰는데 다시 꺼짐으로 돌아간다면 → protocolModelegacy로 설정하고 debug를 켜세요.
    로그를 확인해 어떤 속성(power, relay_status 등)이 실제 상태를 반환하는지 확인할 수 있습니다.
  • 특정 모델은 model 값을 직접 지정하면 인식률이 더 좋아집니다.

📌 참고 사항

  • 이 플러그인은 단일 스위치 제어용 샤오미 멀티탭 / 플러그를 대상으로 최적화되어 있습니다.
  • 6구 멀티탭 등 다채널 제품도 하나의 스위치로 통합 제어됩니다 (개별 콘센트 제어는 불가).
  • LED 제어, 온도 센서 등은 단순화를 위해 노출하지 않습니다.

📜 라이선스

MIT © Km81