oliexdev / openScale

Open-source weight and body metrics tracker, with support for Bluetooth scales
GNU General Public License v3.0
1.68k stars 292 forks source link

Etekcity ESB4074C smart scale support #972

Open DiodeRed opened 1 year ago

DiodeRed commented 1 year ago

I have a Etekcity ESB4074C smart scale, that I'm interested in adding support for in openScale https://www.etekcity.com/products/smart-body-weight-scale-esb4074c

I've started reverse engineering it's packet format and intend to write a pull request with support for it later.

This is a very simple BLE scale, and it's looking to me that like the OKOK (PR #706) and Sinocare (PR #861), it is a pure broadcaster that just shoves it's measurements into the manufacturer specific data packet. It doesn't look to me like it implements any actual services for reading the data.

I've identified where the weight measurement data is in it's packet (it appears to just be integer weight in grams as a 24-bit little-endian value, regardless of what unit is selected on the scale), so that part is quite straightforward. I'll add more details about this to this ticket later, once I get a chance to document what I've been able to determine properly. The driver itself will likely look pretty similar to the Sinocare one.

One thing that may prove to be a complication, is that it doesn't seem to advertise itself with a name or show up in openScale's search window at all. I can see the raw packet in BLE scanning tools, but it's never advertised with a bluetooth device name, nor is it connectable in scanning tools. I notice that BluetoothFactory.java often seems to rely on matching names too, but since this scale doesn't advertise itself with a bluetooth name some other approach will need to be taken. Any advice/thoughts on that aspect would be appreciated. Being unsure about how to address this complication is much of the reason I'm making this issue, rather than just waiting till I have things ready to make a pull request.