Support for Active Era BS-06 scales#1091
Conversation
|
Thanks for your awesome PR 🥇 |
| int hr = pkt[0x0d] & 0xff; | ||
| int adc = Converters.fromUnsignedInt16Be(pkt, 0x0f); | ||
| Timber.i("Historical measurement: %.3f kg, Weight Left: %.2f kg, HR: %d, ADC: %d", weight, weightLeft, hr, adc); | ||
| // TODO: store historical results |
There was a problem hiding this comment.
maybe just a simple
ScaleMeasurement historyMeasurement = new ScaleMeasurement();
historyMeasurement.setWeight(weight);
addScaleMeasurement(historyMeasurement);
would do it?
There was a problem hiding this comment.
The problem is - I'm not the sole user of this scales ) So unless we have a proper "select and claim" mechanic, I would rather not claim everything automatically
There was a problem hiding this comment.
This should be solved with the settings->Bluetooth->Intelligence user assignment which automatically assign the user which have the nearest weight. You could also enable then ignore out of range measurements to ignore weights that out of the user weights.
| int gender = selectedUser.getGender() == Converters.Gender.FEMALE ? 0 : 1; | ||
|
|
||
| calculateBIA(height, impedance, stableWeightKg, age, gender); | ||
| // TODO: report results |
There was a problem hiding this comment.
you could set scaleData with the results?
There was a problem hiding this comment.
Here I've used example BIA calculation, just to see how far off the result whould be from what the scales are showing. The results are way off, so this is why I'm not storing the results
There was a problem hiding this comment.
ok yeah the vendors calculations are sometimes mysterious. I also implemented some estimates calculations, see https://github.com/oliexdev/openScale/wiki/Body-metric-estimations
You can enable them under settings->measurements->Body fat / Body water / Lean body mass
PR contains rudimentary support for Active Era BS-06 scales.
Scales report weight, feet balance (weight distribution), raw impedance readout from the ADC, and heart rate.
All of those are logged, but only weight is reported in the app.
Historical measurements are also parsed, but not stored.
The BIA is done inside a native library, which I haven't looked at yet.