Giter Site home page Giter Site logo

jamesrodda / homebridge-mihomegateway Goto Github PK

View Code? Open in Web Editor NEW
11.0 5.0 2.0 336 KB

A homebridge plugin for connecting the MiHome gateway to HomeKit

License: Apache License 2.0

TypeScript 100.00%
homebridge homebridge-plugin energenie mihome homekit

homebridge-mihomegateway's Introduction

MiHome Gateway Platform Plugin

verified-by-homebridge

Energenie MiHome gateway plugin for Homebridge.

Installation

  1. Install Homebridge using: npm install -g homebridge
  2. Install this plugin using: npm install -g homebridge-mihomegateway
  3. Update your configuration file. See the sample below.

Updating

  • npm update -g homebridge-mihomegateway

Configuration

Currently, the setup is a bit convoluted - sorry about that!

This will all be automated in upcoming releases but for now a bit of manual work is required.

Sample Configuration

"platforms": [{
    "name": "MiHome Gateway",
    "platform": "MiHomeGateway",
    "username": "",
    "password": ""
}]
  • name - a friendly label for the MiHome gateway
  • platform - must be set to MiHomeGateway
  • username - call the register user service to create a new api user
  • password - the password you used to register with (your password is only used for one initial authentication call - subsequent calls will use the api key obtained during authentication)
  • token - [optional] the api key token obtained during authentication
  • baseUrl - [optional] an override for the MiHome API URL

TODO

  • Add additional device types (currently only supports light switches)
  • Automate registration

Credits

homebridge-mihomegateway's People

Contributors

chriscn avatar jamesrodda avatar smolsoftboi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

homebridge-mihomegateway's Issues

Support for sockets

Is it possible for this to support plug sockets, or any way to build this in?

Adding a collabrator

Hi James,
I am a big fan of this project, however I would like to make some changes, including a potential rewrite over the summer. I personally use this on my own homebridge setup but everytime I undergo a reinstallation I have to make some changes including some more recent commits.

My proposition is to make me a write collabrator on the GitHub and NPM so that I can independently push some new changes.

Best Wishes,
Christopher Nethercott

Receive Accessory State From API

The accessories' state can be controlled via non HomeKit apps, Alexa, etc. So it would be useful to get the accessory state periodically to reflect its true status. I can't see any web hooks available, but push notifications could potentially be utilised.

MiHome relays

MiHome relays are the same as MiHome switches, so adding:

  switch (device.device_type) {
    case "light":
      serviceType = Service.Switch;
      break;
    case "relay":
      serviceType = Service.Switch;
      break;
default:

works great :)

Cannot update reachability on non-bridged accessory! with latest version of Homebridge v1.0.2 (2020-04-28)

I have just updated my Homebridge server and now the system errors whenever I boot with the homebridge-mihomegateway config included

[4/28/2020, 16:22:28] Error: Cannot update reachability on non-bridged accessory!
at Accessory._this.updateReachability (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:399:13)
at PlatformAccessory.updateReachability (/usr/lib/node_modules/homebridge/src/platformAccessory.ts:124:34)
at MiHomeAccessory.updateReachability (/usr/lib/node_modules/homebridge-mihomegateway/index.js:261:18)
at new MiHomeAccessory (/usr/lib/node_modules/homebridge-mihomegateway/index.js:238:8)
at MiHomeGateway.addAccessory (/usr/lib/node_modules/homebridge-mihomegateway/index.js:107:38)
at MiHomeGateway.addDevice (/usr/lib/node_modules/homebridge-mihomegateway/index.js:74:10)
at MiHomeGateway. (/usr/lib/node_modules/homebridge-mihomegateway/index.js:57:16)
at Request.self.callback (/usr/lib/node_modules/homebridge-mihomegateway/node_modules/request/request.js:185:22)
at Request.emit (events.js:310:20)
at Request. (/usr/lib/node_modules/homebridge-mihomegateway/node_modules/request/request.js:1154:10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.