当前位置: 首页 > 软件库 > 其他开源 > 物联网 >

homebridge-mihome-outlet

Homebridge Mihome Outlet
授权协议 Readme
开发语言 JavaScript
所属分类 其他开源、 物联网
软件类型 开源软件
地区 不详
投 递 者 逄学潞
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

homebridge-mihome-outlet

XiaoMi outlet plugins for HomeBridge.

Thanks for nfarina(the author of homebridge), OpenMiHome, aholstenson(the author of miio), all other developer and testers.

Note: I have only a part of these devices, so some devices don't have tested. If you find bugs, please submit them to issues.

this plugin uses the miio version 0.15.6 or newer, unlike many other plugins version 0.14.1. Timeouts, API errors are now a thing of the past

Supported Devices

1.MiPlugBase
2.MiPlugBaseWithUSB
3.MiIntelligencePinboard
4.MiQingPinboard
5.MiQingPinboardWithUSB

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. Install packages.
npm install -g homebridge-mihome-outlet

Configuration

if you only have 'MiPlugBase'

"platforms": [{
    "platform": "MiHomeOutletPlatform",
    "outletDevices": [{
        "type": "MiPlugBase",
        "ip": "192.168.1.xx",
        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "outletName": "office room outlet",
        "outletDisable": false,
        "temperatureName": "office room outlet temperature",
        "temperatureDisable": false,
        "switchLEDName": "office room led light switch",
        "switchLEDDisable": false
    }]
}]

if you only have 'MiPlugBaseWithUSB'

"platforms": [{
    "platform": "MiHomeOutletPlatform",
    "outletDevices": [{
        "type": "MiPlugBaseWithUSB",
        "ip": "192.168.1.xx",
        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "outletName": "office room outlet",
        "outletDisable": false,
        "temperatureName": "office room outlet temperature",
        "temperatureDisable": false,
        "switchUSBName": "office room outlet usb switch",
        "switchUSBDisable": false
    }]
}]

or use all

"platforms": [{
    "platform": "MiHomeOutletPlatform",
    "outletDevices": [{
        "type": "MiPlugBase",
        "ip": "192.168.1.xx",
        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "outletName": "office room outlet",
        "outletDisable": false,
        "temperatureName": "office room outlet temperature",
        "temperatureDisable": false,
        "switchLEDName": "office room led light switch",
        "switchLEDDisable": false
    }, {
        "type": "MiPlugBaseWithUSB",
        "ip": "192.168.1.xx",
        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "outletName": "office room outlet",
        "outletDisable": false,
        "temperatureName": "office room outlet temperature",
        "temperatureDisable": false,
        "switchUSBName": "office room outlet usb switch",
        "switchUSBDisable": false
    }, {
        "type": "MiIntelligencePinboard",
        "ip": "192.168.1.xx",
        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "outletName": "office room outlet",
        "outletDisable": false,
        "temperatureName": "office room outlet temperature",
        "temperatureDisable": false,
        "switchLEDName": "office room led light switch",
        "switchLEDDisable": false
    }, {
        "type": "MiQingPinboard",
        "ip": "192.168.1.xx",
        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "outletName": "office room outlet",
        "outletDisable": false,
        "temperatureName": "office room outlet temperature",
        "temperatureDisable": false
    }, {
        "type": "MiQingPinboardWithUSB",
        "ip": "192.168.1.xx",
        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "outletName": "office room outlet",
        "outletDisable": false,
        "temperatureName": "office room outlet temperature",
        "temperatureDisable": false
    }]
}]

Get token

Get token by miio2.db

setup MiJia(MiHome) app in your android device or android virtual machine.
open MiJia(MiHome) app and login your account.
refresh device list and make sure device display in the device list.
get miio2.db(path: /data/data/com.xiaomi.smarthome/databases/miio2.db) file from your android device or android virtual machine.
open website [Get MiIo Tokens By DataBase File], upload miio2.db file and submit.

Get token by network

Open command prompt or terminal. Run following command:

miio --discover

Wait until you get output similar to this:

Device ID: xxxxxxxx   
Model info: Unknown   
Address: 192.168.1.xx   
Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx via auto-token   
Support: Unknown   

"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" is token.
If token is "???", then reset device and connect device created Wi-Fi hotspot.
Run following command:

miio --discover --sync

Wait until you get output.
For more information about token, please refer to OpenMiHome and miio.

Version Logs

0.0.42 (2018-04-09)

1.add support for PlugBase: outlet, temperature sensor, LED switch.
2.add support for PlugBaseWithUSB: outlet, temperature sensor, USB switch.
3.add support for Intelligence Pinboard: outlet, temperature sensor, LED switch.
4.add support for Qing Pinboard: outlet, temperature sensor.
5.add support for Qing Pinboard With USB: outlet, temperature sensor.

 相关资料
  • Intro As an iOS user, when you are building a smart home with the homebridge, you have to fill inthe Homebridge config with some information like a local IP or token of your smart devices.In most case

  • Homebridge 是一个轻量级 NodeJS 服务器,它模拟 iOS HomeKit API,提供从 HomeKit 到“智能家居”设备制造商提供的各种第三方 API 的基本桥接。通过 Homebridge 的桥接,可以让 Siri 控制完全不支持 HomeKit 的设备。 此外 Homebridge 支持插件。

  • homebridge-vsx homebridge-vsx is a plugin made for homebridge,which allows switching on and off your Pioneer AV receiver. All AV receivers (VSX and SC),which work with the iControl AV5 App are support

  • homebridge-sesame Control and monitor your Sesame smart lock with HomeKit integration. Prerequisites Installation of Homebridge iOS 11 or later Sesame lock with enabled cloud integration Sesame Wifi A

  • homebridge-panasonictv A homebridge plugin for turning on and off your Panasonic Viera TV. The plugin also has experimental support for changing the volume and channel. These characteristics are not r

  • Quick Start | Contribute A Wake on Lan plugin for Homebridge Turn your PCs, laptops, servers and more on and off through Siri Quick Start To install the plugin, head over to the machine with Homebridg