Custom_component bodymiscale [For Xiaomi Miscale 1& 2] Esphome or BLE Monitor

Look here.

Sorry but i don’t understand
image
I cannot add new integration on my ESP

Hello,

Do you have at least this :

esp32_ble_tracker:
sensor:
  - platform: xiaomi_miscale2

The sensor depends on ble_tracker.

image
I use ESP from HA
I should install something else?

For now you must use the Esphome DEV version with in the configuration tab

esphome_version: 'dckiller51:dckiller51'

The version will normally be available soon in the stable version of esphome

Sorry i don’t know how to install this version :frowning: Can You help me? If yes i can do some test for integration.

Hello, you need to install the dev version of esphome. Then in the configuration tab you delete everything and you must put esphome_version: ‘dckiller51:dckiller51’
Then it works as for the stable version except that it will use files from my github.

Dear dckiller,

I installed the dev version of ESPHome and put the dckiller51:dckiller51 in the configuration tab:

But in the log I have the following errors:

[23:36:12] INFO: Installing esphome version 'dckiller51:dckiller51' (https://github.com/dckiller51/esphome/archive/dckiller51.zip)...
Collecting https://github.com/dckiller51/esphome/archive/dckiller51.zip
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://codeload.github.com/dckiller51/esphome/zip/dckiller51
[23:36:13] FATAL: Failed installing esphome pinned version.
[cont-init.d] 30-esphome.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.

 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

Any help about this?.

Thanks,

Jose

Hello, you can switch to the official DEV version.The integration has since been validated.

Sorry dckiller51, but, how I can install the officla DEV version?, to install dev version is necessary to add the following repository (accoding with the esphome docs):

To install the dev version of ESPHome:

But is impossible to me to add this repository, and I cant find the ESPHome Dev available…

If I select:

image

Also, is not working, and the log shows:

[17:27:41] INFO: Installing esphome version 'dev' (https://github.com/esphome/esphome/archive/dev.zip)...
Collecting https://github.com/esphome/esphome/archive/dev.zip
  Downloading https://github.com/esphome/esphome/archive/dev.zip (2.0MB)
esphome requires Python '>=3.7,<4.0' but the running Python is 3.6.9
[17:27:43] FATAL: Failed installing esphome pinned version.
[cont-init.d] 30-esphome.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.

 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------

Sorry for my understanding…

Jose

Here are my screens

In options leave blank

Finally I installed the dev version thank to your reply. But I continue with the error with the dckiller51:dckiller51 version:

[23:42:22] INFO: Installing esphome version 'esphome_version:dckiller51:dckiller51' (https://github.com/esphome_version/esphome/archive/dckiller51.zip)...
Collecting https://github.com/esphome_version/esphome/archive/dckiller51.zip
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://github.com/esphome_version/esphome/archive/dckiller51.zip
[23:42:23] FATAL: Failed installing esphome pinned version.
[cont-init.d] 30-esphome.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.

 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

The dckiller51 version no longer exists. it has been integrated into the official dev. you must not specify a version in the configuration.

1 Like

Dear dckiller,

Thanks a lot, the integration works perfectly now, I can read all the data from my BodyScale.

Thanks,

1 Like

Hi @dckiller51,

Thanks again for a new great integration.
I use Passive BLE Monitor integration and it added automatically my Mi Body Composition Scale 2. Thanks to this I can read the impedance and the non-stabilized and stabilized weight given by the scale.
I also added your component using HACS and following your steps explained on GitHub.
How do I make the link between both? Is there anything else to do to make it work?

Right now, I see bodymiscale entities but not the weight and impedance entities.

Hello,

Does that answer your question?

Actually, I understood after posting this that I need to give the same entity names for the weight and impedance between the bodymiscale and the blemonitor integrations.

1 Like

Hello,

this is my card for MIScale:

You can make template sensors for the attributes if you change it to “easy readable” format in the /config/custom_components/bodymiscale/const.py.

For example ATTR_FATMASSTOLOSE = “Fat mass to lose” has to be changed to ATTR_FATMASSTOLOSE = “fat_mass_to_lose”

There is only one question left, which is the right evaulation, the results in the official app Zepp or these ones? Because lot of result differrent between the results.

1 Like

Hello, I did not understand the meaning of your example

I should put the attributes with “_”

For example ATTR_FATMASSTOLOSE = “Fat mass to lose” has to be changed to ATTR_FATMASSTOLOSE = “fat_mass_to_lose”

If you make a template sensor with originial attribute, for example:

      scale_fat_mass_to_lose:
        friendly_name: lefogyasztandó zsír
        value_template: "{{ states.bodymiscale.merleg.attributes.Fat mass to lose }}"
        unit_of_measurement: "kg" 

then you got an error and the sensor can not be compiled. Maybe the spaces between the words cause the problem.