Giter VIP home page Giter VIP logo

miio-go's Introduction

miio-go

Coverage Status

An implementation of the miIO home protocol by Xiaomi written in Golang. Heavily inspired by:

This implementation has been design with the following concerns:

  • Testability
  • Development without a miIO device handy (or performing any real network operations)
  • A simple event-based API.

Supported Devices

At the moment, only the following devices are officially supported by this library. Feel free to submit a pull request, I'd be more than happy to have more devices supported by this library.

  • Xiaomi Mi Smart WiFi Socket (v1 - no USB) (chuangmi.plug.m1)
  • Xiamoi Yeelight (yeelink.light.color1)

Simulator

A device simulator/emulator exists in the simulator package. It takes advantage of the low level network used to communicate with real devices to emulate hardware devices.

Give it a try!

Tokens

Documentation coming soon...

Examples

Documentation coming soon...

CLI

A CLI exists to allow controlling devices using this library.

usage: miio-go CLI [<flags>] <command> [<args> ...]

CLI application to manually test miio-go functionality

Flags:
  --help            Show context-sensitive help (also try --help-long and --help-man).
  --local           Send broadcast to 127.0.0.1 instead of 255.255.255.255 (For use with locally hosted simulator)
  --log-level=warn  Set MiiO to a specific log level

Commands:
  help [<command>...]
    Show help.


  control brightness <brightness>
    Set device brightness


  control power <state>
    Set device power


  control color hsv <hue> <saturation>
    Set color using HSV values


  control color rgb <red> <green> <blue>
    Set color using RGB values


  discover
    Discover devices on the local network

miio-go's People

Contributors

nickw444 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

miio-go's Issues

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.