Git Product home page Git Product logo

migateway's Introduction

migateway

API DOC

小米网关协议文档参考

原版

修正格式版

绿米网关局域网通讯API V1.0.7

FEATURES

  • 支持网关自动发现(whois)
  • 支持设备自动发现(get_id_list,read)
  • 支持设备状态自动更新(report/heartbeat)
  • 支持网关彩灯控制,并支持颜色、闪烁等控制(write)
  • 支持智能插座的控制
  • 服务运行树莓派3上树莓派安装文档

Homekit

Document

migateway for homekit

Screenshot

手机

EXAMPLE

package main

import (
    "github.com/bingbaba/tool/color"
    "github.com/bingbaba/util/logs"
    "github.com/xuebing1110/migateway"
    "time"
)

var (
    LOGGER = logs.GetBlogger()
)

func init() {
    logs.SetDebug(true)
}

func main() {
    manager, err := migateway.NewAqaraManager(nil)
    if err != nil {
        panic(err)
    }
    manager.SetAESKey("t7ew6r4y612eml0f")

    gateway := manager.GateWay
    for _, color := range color.COLOR_ALL {
        err = gateway.ChangeColor(color)
        if err != nil {
            panic(err)
        }
        time.Sleep(time.Second)
    }

    err = gateway.Flashing(color.COLOR_RED)
    if err != nil {
        panic(err)
    }

    //do something...
    time.Sleep(10 * time.Second)
}

TODO LIST

  • 支持无线开关的控制
  • 支持86开关的控制
  • 支持场景自动化联动

Updating...

migateway's People

Contributors

pkgplus avatar jurgen-kluft avatar vkorn avatar

Watchers

James Cloos avatar

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.