Giter Club home page Giter Club logo

go-aqaramqtt's Introduction

Xiaomi Aqara MQTT

I've been using a custom Xiaomi Aqara MQTT bridge for a while, but it loads my Raspberry Pi Model B a lot as it was written in Python.

This project includes

Building

This project use Bazel to build, although go build would probably works fine if you have the dependencies installed.

To build and run:

bazel run :go-aqaramqtt

Bazel will download and install all dependencies, including the Go compiler!

For cross compiling to Raspberry Pi:

bazel build :rpi

The output binary will be in bazel-bin/linux_arm_pure_stripped/rpi

To update dependencies using bazel-gazelle. This should be run when you've created new files or import an external module.

bazel run :gazelle

To add external dependencies:

bazel run :gazelle -- update-repos github.com/example/module

Command line options

Option Required Description
--help Read help
--ip Xiaomi Gateway IP address
--sid Xiaomi Gateway SID
--key Y Xiaomi Gateway encryption key (Tutorial). Use environment variable AQARA_KEY instead.
--iface Y Network adapter to use for Xiaomi communication (eg. eth0)
--mqtt-server Y Protocol and address of MQTT server (eg. tcp://192.168.1.1:1883. Supported scheme: tcp, ssl, ws)
--username MQTT username. Use environment variable MQTT_USERNAME instead.
--password MQTT password. Use environment variable MQTT_PASSWORD instead.
--prefix MQTT prefix. Default to "xiaomi"

License

Licensed under the MIT license

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.