I have a bluetooth dongle on my HA server. The scale seems to hold the last weight info for about 5 min so I have a cron job that runs every 5 min and calls the script.
The script connects to the scale and gets the latest reading and then sends the data to HA over MQTT
You first need to retrieve the MAC address of your scale: sudo hcitool lescan (step on the scale just before to wake it up) and enter it here instead of REDACTED: MISCALE_MAC = 'REDACTED'
well if you manage to find the formula to retrieve it from the impedance, please let me know.
In the meantime, BMI is weight / (height * height) where weight is in Kg and height is in m.
i tried using the miscale node in node-red on my hassos running on tinker board. but am getting the following error
Error: Cannot find module 'bluetooth-hci-socket
any one having gone through this? or knows a solution?
i couldnt find a node to install matching this. and dont know how to install it externally in HASSIO.
The script it triggered via a cron job indeed that runs every 5 min. This is often enough that the scale doesn’t go into sleep mode, yet not that often that it drains the battery, which I’m really impressed with:
I’ve had the scale for about a year now. I weigh myself once a day and I’ve not had the replace the batteries yet.
Compared to my previous Salter non smart scale that drained its battery within 4 month with no use, it’s quite a change…
Hi @lolouk44
There is at least two versions of the scale, v. 1 measures only weight while v.2 adds fat %, water % and other measurements. I have been thinking about putting a xiaomi vibration sensor on the scale, instead but it seem a bit overkill.
The script works with both v1 and v2 scales. With v2 it sends the body impedance, though I’ve not yet figured out the formula that xiaomi uses to calculate other body measurements.
I personally use this one to figure out the bmi https://www.organicnutrition.co.uk/images/body-mass-index-formula.jpg
The script I posted does some calcualtions, or you might want to have a look at the openscale app for android, its open source, taken that you know how to read code better than I do
If there a way to do this directly from hass? I’m using HASSIO and im quit new to the platform, and I didn’t figure out how to ssh into root yet… (or I might have lost the login and password)
Tried a few times looking for a possible formula embedded in the code with no luck. Online available formulas done give me the same readings as the Xiaomi app so ended up with the above.