https://github.com/wr/homebridge-mpower
Homebridge plugin that provides on/off switching for Ubiquiti mPower outlets
https://github.com/wr/homebridge-mpower
Last synced: 4 months ago
JSON representation
Homebridge plugin that provides on/off switching for Ubiquiti mPower outlets
- Host: GitHub
- URL: https://github.com/wr/homebridge-mpower
- Owner: wr
- License: mit
- Created: 2016-10-22T21:51:26.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-10T06:05:31.000Z (over 9 years ago)
- Last Synced: 2025-10-20T04:49:01.787Z (8 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/homebridge-mpower
- Size: 7.81 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# homebridge-mpower
This is a plugin for [homebridge](https://github.com/nfarina/homebridge). It allows you to control your Ubiquiti mPower outlets with HomeKit.
# Installation
1. Install homebridge (if not already installed) using: `npm install -g homebridge`
2. Install this plugin using: `npm install -g homebridge-mpower`
3. Update your configuration file. See below for a sample.
# Configuration
```
"platforms": [
{
"platform": "mPower",
"name": "mPower",
"outlets": [
{
"name": "Fan",
"username": "admin",
"password": "hunter2",
"url": "10.0.1.5",
"id": "1"
},
{
"name": "Hall Light",
"username": "admin",
"password": "hunter2",
"url": "10.0.1.5",
"id": "2"
},
{
"name": "Mr. Coffee",
"username": "admin",
"password": "Correct Horse Battery Staple",
"url": "10.0.1.6",
"id": "1"
}
]
}
]
```
| Parameter | Description |
|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `name` | The human-readable name of the device plugged into your outlet |
| `username` | Your mFi Controller username |
| `password` | Your mFi Controller password |
| `url` | May be either a hostname or an IP address |
| `id` | The specific outlet you hope to control. For mPower mini, this can only be `1`. For mPower and mPower PRO, you might have to do some trial and error to figure out which outlet has which `id`. I only have an mPower mini, so I can't check :) |
# How it works
This plugin is basically a homebridge-compatible implementation of the [Ubiquiti mFi outlet HTTP API](https://community.ubnt.com/t5/mFi/mPower-mFi-Switch-and-mFi-In-Wall-Outlet-HTTP-API/td-p/1076449). It sends a HTTP request via `curl` to your mFi outlet device (not the controller) to manually toggle the device `on` or `off`.
# Acknowledgements
Major thanks to the other contributors who have improved this plugin: [pponce](https://github.com/pponce)