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

@luftloch/homebridge-mideaportasplit

v0.1.0

Published

Homebridge plugin for the Midea PortaSplit air conditioner: local LAN control with one-time cloud credential retrieval.

Downloads

20

Readme

@luftloch/homebridge-mideaportasplit

Homebridge plugin that exposes the Midea PortaSplit air conditioner (and other Midea 0xAC appliances) to Apple HomeKit as a HeaterCooler accessory.

Control happens entirely over your local network using Midea's LAN protocol (TCP port 6444, protocol "V3"). Your Midea SmartHome (MSmartHome) account is contacted once per device to fetch the token/key pair required for the local handshake; after that the credentials are cached and no cloud connection is needed.

Features

  • Power, mode (Auto / Cool / Heat), target temperature (16–31 °C in 0.5° steps)
  • Current indoor temperature
  • Fan speed (slider: 0 = Auto, then Silent/Low/Medium/High/Full in 20% steps)
  • Louvre swing
  • Temperature display units (°C/°F on the unit's panel)
  • Optional: Boost (Turbo) switch, outdoor temperature sensor
  • Automatic discovery via UDP broadcast, plus manual IPs for devices on other subnets/VLANs

Installation

npm install -g @luftloch/homebridge-mideaportasplit

or search for "Midea PortaSplit" in the Homebridge UI after publishing.

From this repository

npm install
npm run build
npm link

Then add the platform to your Homebridge config.json.

Homebridge UI

After installing the plugin, open Homebridge UI → Plugins → Midea PortaSplit → Settings. The form is driven by config.schema.json and groups account login, HomeKit features, optional devices, and advanced intervals. Changes are written to your Homebridge config.json.

Configuration

Minimal config.json platform block:

{
  "platform": "MideaPortaSplit",
  "name": "Midea PortaSplit",
  "account": "[email protected]",
  "password": "your-msmarthome-password"
}

All options:

| Option | Default | Description | | ------ | ------- | ----------- | | account / password | – | Midea SmartHome (MSmartHome) app login. Used only to fetch local credentials. | | refreshInterval | 30 | Seconds between status polls. | | heartbeatInterval | 10 | Seconds between keep-alive heartbeats. | | promptTone | false | Unit beeps on every command. | | boostSwitch | false | Adds a separate "Boost" switch. | | outdoorTemperatureSensor | false | Adds a temperature sensor for the outdoor coil sensor. | | swing | "vertical" | Which louvre axes the HomeKit swing toggle drives (vertical, horizontal, both, none). | | devices | [] | Per-device entries: ip, name, and optional manual token/key (hex). With manual credentials the cloud account is not needed at all. |

Fan speed mapping

HomeKit's fan slider maps to the PortaSplit's discrete speeds: 0 % = Auto, 20 % = Silent, 40 % = Low, 60 % = Medium, 80 % = High, 100 % = Full.

Manual credentials (no cloud)

If you already have a device token/key (for example from Home Assistant / msmart-ng):

{
  "platform": "MideaPortaSplit",
  "name": "Midea PortaSplit",
  "devices": [
    {
      "ip": "192.168.1.50",
      "name": "Living Room AC",
      "token": "YOUR_TOKEN_HEX",
      "key": "YOUR_KEY_HEX"
    }
  ]
}

Troubleshooting

  • Device not found — the plugin discovers devices with a UDP broadcast (ports 6445/20086). If your AC is on another subnet or VLAN, add its IP under devices. Make sure the AC is connected to Wi-Fi in the Midea SmartHome app first.
  • Authentication fails — double-check the account/password. The plugin tries both udpid variants (little/big endian) automatically. Enable Homebridge debug mode (-D) for details.
  • "No Response" in the Home app — the plugin marks the accessory unavailable when the TCP connection drops; it reconnects automatically with backoff.

Development

npm install
npm test
npm run build

Protocol attribution

The Midea LAN/cloud protocol used here was reverse-engineered by the community. This implementation was written with reference to:

Many thanks to those authors.

License

MIT