Giter Site home page Giter Site logo

atc-mi-interface-mqtt-bridge's Introduction

ATC MI Interface MQTT Bridge

Scan ATC Mi devices and publish the data to an MQTT server for Home Assistant.

Installation

First, you need to install Python and pip. Then, you can install the dependencies of the project with the following command:

pip install -r requirements.txt

Usage

You can run the project with the following command:

python main.py

Configuration

You can configure your devices and MQTT server in the config.yaml file. An example configuration can be found in the config.example.yaml file.

mqtt:
    host: ...
    port: ...
    username: ...
    password: ...
devices:
    - id: &id_ATC_ABCDEF atc_abcdef
      mac_address: &mac_address_ATC_ABCDEF A4C138ABCDEF
      bindkey: ...
      device_info:
          # https://www.mi.com/pl/product/mi-temperature-and-humidity-monitor-2/
          name: Mi Temperature and Humidity Monitor 2 ATC_ABCDEF
          model: LYWSD03MMC
          manufacturer: Xiaomi
          sw_version: V4.7
          hw_version: B1.5
          identifiers: [*mac_address_ATC_ABCDEF]
          configuration_url: https://pvvx.github.io/ATC_MiThermometer/TelinkMiFlasher.html
      sensor:
          temperature:
              name: Temperature
              unit_of_measurement: "°C"
              state_class: measurement
              device_class: temperature
          humidity:
              name: Humidity
              unit_of_measurement: "%"
              state_class: measurement
              device_class: humidity
          battery_level:
              name: Battery
              unit_of_measurement: "%"
              state_class: measurement
              device_class: battery
          battery_v:
              name: Battery Voltage
              unit_of_measurement: "V"
              state_class: measurement
              device_class: voltage
          signal_strength:
              name: Signal Strength
              unit_of_measurement: "dBm"
              state_class: measurement
              device_class: signal_strength

Building

You can build the project with the following command:

# .\build.ps1
$currentFolder = Split-Path -Path $PWD -Leaf
pyinstaller main.py --noconfirm --name $currentFolder --copy-metadata ha_mqtt_discoverable

atc-mi-interface-mqtt-bridge's People

Contributors

pillarszhang avatar

Watchers

 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.