Git Product home page Git Product logo

gomijia's Introduction

gomijia

This is a simple tool, written in Go, that passively listens for Bluetooth LE broadcasts from a Xiaomi Mijia Temperature/Humidity sensor and transmits them to an MQTT broker.

It is configured via the gomijia.ini file, which specifies the details of the MQTT broker (hostname, username, password) as well as a mapping of Bluetooth MAC addresses to locations.

Built With

Author

License

This project is licensed under the GPL 3+ license, see COPYING for details.

gomijia's People

Contributors

dependabot[bot] avatar u1f35c avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

serbitor

gomijia's Issues

Xiaomi Thermometer 2

Thanks for this code!

I've bought some of the new Xiaomi Thermometer 2 but I'm unable to read from them with your code.

I suspect (!) the Advertisment (!?) format has changed.

How did you determine the protocol for the original sensor?

Your code looks for Data > 14 but I only receive Data == 14

I also only receive id == 0x0128 (not 0x1004, 0x1006, 0x100A, 0x100D)

I'm able to enumerate|scan for the devices that I have.

They report being Connectable().

But I don't understand how to decode the Data I receive from them.

Any pointers would be appreciated.

Thanks!

Weird issue: Nothing gets written to mqtt

Hi there. Thanks for building this.

I purchased the same device (version 1...the round version) and I'm just trying if gomijia will work for me.

From what I can tell nothing is happening. What I did:

I installed mosquitto locally (I'm running debian).
I changed ssl:// to tcp:// and port from 8883 to 1883 since the default install does not
enable ssl.
Ran go build to build the binary.
I added my device address to config.ini. I got the address using hcitool lescan.
I run the tool with: "sudo ./gomijia -config config.ini"
I monitor mqtt with mosquito-sub but nothing appears to be written there.
I tried adding print(update) in the publish function but nothing gets printed ever.
(I don't think the publish function gets called ever)

-verbose doesn't help either since it's just printing a bunch of random devices it's found and if they're connectable.

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.