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-mijia

v1.2.81

Published

MiJia plugin for homebridge: https://github.com/nfarina/homebridge

Readme

homebridge-mijia

npm version

MiJia plugin for HomeBridge

This repository contains the MiJia plugin for homebridge.

MiJia is a ZigBee gateway with a almost all sensors and accessories. Please see the pictures below.

A new service has been added. Level battery.

Adding a new low battery service. When the battery is low, the notification icon (iOS 10.3 or later version)

Pre-Requirements

  1. Make sure you have V2 of the gateway. V1 has limited space so can't support this feature.
  2. Update gateway firmware to 1.4.1_141.0141 or later. You can contact @babymoney666 if your firmware is not up to date.

Installation

  1. Install HomeBridge, please follow it's README. If you are using Raspberry Pi, please read Running-HomeBridge-on-a-Raspberry-Pi.
  2. Make sure you can see HomeBridge in your iOS devices, if not, please go back to step 1.
  3. Download homebridge-mijia to your local folder.

Configuration

  1. Open MiJia gateway's settings, enable local network protocol. Please follow the steps in this thread: http://bbs.xiaomi.cn/t-13198850. It's in Chinese so you might need a translator to read it.

  2. To control the devices, put gateway's MAC address (lower case without colon) and password to ~/.homebridge/config.json.

     {
         "platforms": [
         {
             "platform": "MiJiaPlatform",
             "sid": ["1a2b3c4d5e6f"],
             "password": ["1234567890123456"]
         }]
     }

If you have more than one gateways, fill them in right order, like below.

    {
        "platforms": [
        {
            "platform": "MiJiaPlatform",
            "sid": ["1a2b3c4d5e6f", "1a2b3c4d5e6f", "1a2b3c4d5e6f"],
            "password": ["1234567890123456", "1234567890123456", "1234567890123456"]
        }]
    }

If gateway's password is not set or not set right, you will see the following error in homebridge's output.

    > No password for gateway f0b429cbe4d3, please edit ~/.homebridge/config.json

If you like to use Light Bulb type for Light Switch to make grandma Siri happy, like me, you can set the following in the config.

    {
        "platforms": [
        {
            "platform": "MiJiaPlatform",
            ...
            "fakeLightBulbForLightSwitch": true,
            ...
        }]
    }
    

If you prefer to see sensor names instead of hex digis as name, add a mapping table to your config.json

    {
        "platforms": [
        {
            "platform": "MiJiaPlatform",
            ...
            "sensor_names": {
				"0c08":"Kitchen Window"
            }
            ...
        }]
    }   

Run it

  1. From source code

     $ cd /path/to/homebridge-mijia
     $ DEBUG=* homebridge -D -P .
  2. As homebridge plugin

     $ npm install -g homebridge-mijia
     $ homebridge