lswiderski / mi-scale-exporter

Mobile App to export data from Mi Body Composition Scale and upload it to Garmin Connect Cloud
Apache License 2.0
146 stars 13 forks source link

App cannot get data from my scale XMTZC05HM #10

Closed skibbipl closed 1 year ago

skibbipl commented 2 years ago

I'm trying to get data from my mi body composition 2 but with no luck. After tinkering with settings the only thing I get is:

2022-09-22 08:25:38.8417|INFO|E:\Projects\mi-scale-exporter\src\MiScaleExporter\App.xaml.cs|received data but it is unstable, or wrong scale type is selected
27; 24; 2; 132; 230; 7; 9; 22; 8; 22; 16; 0; 0; 64; 1
juanfcocontreras commented 2 years ago

The same thing happens to me with my Mi Body Composition 2.

Sometimes it works (I haven't found the pattern), but most of the time it fails with the following message:

received data but it is unstable, or wrong scale type is selected
27; 24; 2; 132; 230; 7; 9; 25; 7; 22; 32; 0; 0; 32; 3

Any idea of what is going on?

Thanks!

lswiderski commented 2 years ago

Hi Guys,

Do the lights on scale stops blink when you receive data? Is everything correct in Zepp app?
@skibbipl there is no correct weight received by phone in the data you provided. Looks like the measuring is still going on.

Try to measure in Zepp App, and after that try to get data by MiScaleExporter. The scale broadcasts data by Bluetooth for approximately 15 minutes after measuring.

@juanfcocontreras do you measure yourself barefoot or in socks/shoes?

Cheers

skibbipl commented 2 years ago

Hi, I think all is measured correctly. I stand on the scale, it shows my weight, the "progress bar" fills 100%, weight blinks, I step from scale. I don't use zepp app but Notify For Mi Band app correctly downloads the measurements.

juanfcocontreras commented 2 years ago

I get my data in Zepp synced without any issue. I don't weight with shoes or similar. Would it help if I send you the Zepp screenshot with the values?

LeRo93 commented 2 years ago

Scale data collection does not work on Samsung S21, S21 Ultra or Note10. All permissions confirmed. WhatsApp Image 2022-10-11 at 22 28 15 (1)

lexalalex commented 1 year ago

same problem on Poco x3 pro IMG_20221119_173911

ghost commented 1 year ago

Unfortunately having the same error on Pixel6 with Android 13. Same "Data could not be obtained" error received wit Scale Composition 1 and 2 used on Zepp Life app. Looking forward to support, if possible in some way to do troubleshooting.

jendrush commented 1 year ago

Same situation with S22U, and Mi Body Composition Scale 2. Zepp life works normally, and on MiScale Exporter "Data could not be obtained. try again".

lswiderski commented 1 year ago

@P1EMO @jendrush Did you guys give all necessary permissions for the app? In the next week I will release version with little different method for receiving data and more options for debug connection.

jendrush commented 1 year ago

The app had "devices nearby" permissions as standard, but I added location to it. Unfortunately, that didn't help. Later I was able to run the sync using miscale2garmin on the raspberry, which is enabled 24/7. This will be more convenient for me, but if you improve something in the app I will test it to give feedback.

LeRo93 commented 1 year ago

If I enabled photo and video, music, in short all permissions, the application works on both Samsung Galaxy S21+ and S21 Ultra. But why photo and video? :-) THX for your work!

ghost commented 1 year ago

Confirmed. With all permission active it works flawlessly. Need to do some test because I guess that the location permission only will be sufficient (on top of nearby devices). Will try and report

lexalalex commented 1 year ago

Confirmed too. With all permission active it works fine. Thanks for your work!

lswiderski commented 1 year ago

I'm just released new version of the application. I hope it will resolve most of your problem guys. Ask for permissions should now pop up.

https://github.com/lswiderski/mi-scale-exporter/releases/tag/v2.0.1

@LeRo93 "But why photo and video?" Dunno. That version required access to external storage to save Log. But on my android 10 there was a permission just for Storage. I guess with permissions changes in Android 12 Google changed it to photo and video. It still required? Now should be only be Bluetooth/Location required.

skibbipl commented 1 year ago

Unfortunately app still cannot read measurements from my scale. All permissions are granted.

lswiderski commented 1 year ago

@skibbipl When you scan, do you see only 0 on scanning page? Do you see scanning indicator? Can you select option "Show Debug Info during scan" in Settings? It should tell us more about the connection. If you will get see any weight information, you can click on stop measure then It will process just weight.

skibbipl commented 1 year ago

@lswiderski It connected to scale, but pulled some random gibberish - weight 3kg and some random fat etc. When I tired to pull the data again I've got cannot obtain data error. I will try to debug later. But it behaves the same as previous version.

ghost commented 1 year ago

On my side (Pixel6 with A13 QPR beta) everything is fine. As noted above Nearby devices and location is fine. No storage needed. Now everything works flawlessly!

PS: if I can support you with some Italian translation, feel free to ht me up!

skibbipl commented 1 year ago

@lswiderski With debug info obraz

lswiderski commented 1 year ago

Somehow your scale is broadcasting that data or App is receiving this in that way. The last 2 bytes are a weight information and after conversion to kgs: 1,1. I'm sorry to say this but I have no idea what can be a problem here 😢.

lswiderski commented 1 year ago

@skibbipl I got some lead. Do you have "Weigh small object" option turned off in Zepp Life settings? If it's ON can you turn off and then check it? image

Lelik-74 commented 1 year ago

Hi, I can't send data to Garmin, the application is the latest. Error: net_http_ssl_connection_failed

lswiderski commented 1 year ago

@Lelik-74 Hi, do the measure time is correct? And measure Date/Time is the same as actual time? Did you try to use external API:

Lelik-74 commented 1 year ago

The date and time are correct, I tried both with and without use External API p.s. The use external api checkmark is constantly flying off

lswiderski commented 1 year ago

@Lelik-74 Your problem with "net_http_ssl_connection_failed" should be gone in v 2.0.3+ and bug with external api checkmark is also fixed.