Code Monkey home page Code Monkey logo

scale's Introduction

Xiaomi Mi Scale

Hass.io addon that integrates the Xiaomi Body Composition Scale 1 and 2 into Home Assistant based on the original code from @lolouk44.

Setup & Configuration

  1. Retrieve the scale's MAC Address based on the Xiaomi Mi Fit app.

  2. Download the addon

  3. Create a new directory xiaomi_mi_scale in the folder addons in your hass.io installation and place all files in it (via SSH) Mi Scale

  4. Adjust the Dockerfile according to your needs

# adjust here the environment variables
ENV MISCALE_MAC 00:00:00:00:00:00
ENV MQTT_PREFIX miScale
ENV MQTT_HOST 192.168.1.3
ENV MQTT_USERNAME username
ENV MQTT_PASSWORD password
ENV MQTT_PORT 1883
ENV MQTT_TIMEOUT 30
ENV USER1_GT 80
ENV USER1_SEX male
ENV USER1_NAME Tobias
ENV USER1_HEIGHT 186
ENV USER1_DOB 1990-01-01
ENV USER2_LT 70
ENV USER2_SEX female
ENV USER2_NAME Juliane
ENV USER2_HEIGHT 173
ENV USER2_DOB 1990-01-01
  1. Open Hass.io and navigate to Hass.io -> add-on store and clock the reload button on the top right corner. Now you should see the Xiaomi Mi Scale as a local addon Mi Scale

  2. Install the addon (takes a while as the container is built locally)

  3. Start the addon

Home-Assistant Setup:

Under the sensor block, enter as many blocks as users configured in your environment variables:

  - platform: mqtt
    name: "Example Name Weight"
    state_topic: "miScale/USER_NAME/weight"
    value_template: "{{ value_json['Weight'] }}"
    unit_of_measurement: "kg"
    json_attributes_topic: "miScale/USER_NAME/weight"
    icon: mdi:scale-bathroom

  - platform: mqtt
    name: "Example Name BMI"
    state_topic: "miScale/USER_NAME/weight"
    value_template: "{{ value_json['BMI'] }}"
    icon: mdi:human-pregnant

Mi Scale

Mi Scale

scale's People

Contributors

lolouk44 avatar ned-kelly 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.