ga2mer / ha-zepp

Home Assistant companion for Zepp OS devices
77 stars 18 forks source link

where to input home assistant url? is it in zepp app? #14

Open Ujeeee opened 10 months ago

Ujeeee commented 10 months ago

Hi there, I am able to get custom zepp app, but cannot find where to input home assistant url.

BramNH commented 10 months ago

You have to enable developer mode: https://docs.zepp.com/docs/guides/tools/zepp-app/

Hadatko commented 10 months ago

Hello, i enabled developer mode based on link here. But README is unclear to me to continue. For example enabling developer mode you have under MI BAND 7 section. But i guess steps from there are common for all devices.

I don't know how to install app. The app is installed into phone or into watches? If i need to build app by myself where are described steps how to do that.

What are the files in release used for?

Hadatko commented 10 months ago

It looks like i can slowly progress with https://docs.zepp.com/docs/guides/tools/cli/ and https://docs.zepp.com/docs/guides/faq/developer-bridge-mode/ (i needed original zepp account, so i loggout from google account in app and created one)

I need somehow determine setting for my watches. Any source based on what the values are set?

BramNH commented 10 months ago

I agree the README is not complete. I will update it when I have the time for it. You can follow the guides from the Zepp docs to rewrite this code to be able to build for your specific watch (the UI might not fit the screen dimensions, this is specifically designed for MiBand7).

The app is installed on the Phone, see Zepp OS Overall Architecture. There are multiple ways to install the app on your phone:

With the Zeus CLI you can build this repository and can either create a bridge connection or scan the QR code within the developer mode in the Zepp app.

BramNH commented 10 months ago

(i needed original zepp account, so i loggout from google account in app and created one)

I remember I had the same issue, this should be documented in the readme.

Hadatko commented 10 months ago

I can provide PR for documentation based on my observation + my watch support

BramNH commented 10 months ago

Feel free to make a pull request for this repository (I don't own it), but the owner usually response fast

Hadatko commented 10 months ago

My current state

bridge$ install
info  building...
? Which target would you like to preview? balance
info  Start building package, targets: balance.
[ROLLUP] Transform 8 JS files in 472ms
[PNG2TGA] Converting PNG files...
[PNG2TGA] Error: File brightness_down.png, PNG with grayscale color type is not supported!

I got pictures from gts3

BramNH commented 10 months ago

My current state

bridge$ install
info  building...
? Which target would you like to preview? balance
info  Start building package, targets: balance.
[ROLLUP] Transform 8 JS files in 472ms
[PNG2TGA] Converting PNG files...
[PNG2TGA] Error: File brightness_down.png, PNG with grayscale color type is not supported!

I got pictures from gts3

Try pictures from mi-band7. I think down the road the PNG2TGA tool within Zeus CLI has had some changes, I also had to re-export the images. Just copy the pictures from mi-band7 to gts3.

Hadatko commented 10 months ago

Thank you. Finally i made it somehow working. I see i need allow sensor in phone to get them into watches. Great ;) photo_2024-01-04_11-24-44 (2) photo_2024-01-04_11-24-44

Hadatko commented 10 months ago

By mistake i thought this device will report health data to HA. OR is it doing that?

BramNH commented 10 months ago

Reference

If you checked the "Update sensor data to HA" setting somewhere at the top then it does. See https://community.home-assistant.io/t/affordable-smart-wearable-meets-home-assistant/635266

I recommend turning notifications off for the device, because the sensor updates will stop if a notifications is blocking it.

BramNH commented 10 months ago

I also noted that the settings page is a bit buggy, feel free to update it :)

postn commented 8 months ago

Absolute noob here and this is what I did (for other people trying to get this going in the future), though I am stuck at installing the app and would need some help:

I apologise if I did something wrong, though would love to understand what I did wrong above. Thank you.

BramNH commented 8 months ago

Absolute noob here and this is what I did (for other people trying to get this going in the future), though I am stuck at installing the app and would need some help:

  • Enabled dev mode/tools
  • Installed nvm for zeus cli (docs linked above in the second link above)
  • created a new project called 'Hello World" as per the zepp docs
  • replaced the entire project structure with ha-zepp
  • replaced the pngs to png8: using magick (could not use assets from any watch folders on github)
  • ran zeus preview and it created the QR code
  • Issue: This is where when I install the app it shows Download failed, error code: null

I apologise if I did something wrong, though would love to understand what I did wrong above. Thank you.

Which watch are you using? Is the error shown in the Zepp app? If Zeus preview works, then it build correctly. Could you provide a bit more info on the error?

postn commented 8 months ago

Sorry I should have mentioned that I have an old Amazfit 2ge that I was testing this on. I also notice that this is not directly supported on Zepp (having read a bit more), possibly thats the issue. Unfortunately - no more error details apart from "download failed, error code: null). This pop ups when I scan the QR code on the mobile app (modified apk).

BramNH commented 8 months ago

Sorry I should have mentioned that I have an old Amazfit 2ge that I was testing this on. I also notice that this is not directly supported on Zepp (having read a bit more), possibly thats the issue. Unfortunately - no more error details apart from "download failed, error code: null). This pop ups when I scan the QR code on the mobile app (modified apk).

Even though I can't find the model in this table provided by Zepp, I believe it is indeed a non-zepp os model. I just switched from the Xiaomi mi-band7 to the amazfit band 7 (now I can use the most updated version of the Zepp app), which I can totally recommend if you like to continue and keep it cheap :)

postn commented 8 months ago

Thanks @BramNH I guessed as much. Glad to know I was able to go through the steps though and here's hoping this helps someone else. Cheers!

kr0ner commented 8 months ago

My current state

bridge$ install
info  building...
? Which target would you like to preview? balance
info  Start building package, targets: balance.
[ROLLUP] Transform 8 JS files in 472ms
[PNG2TGA] Converting PNG files...
[PNG2TGA] Error: File brightness_down.png, PNG with grayscale color type is not supported!

I got pictures from gts3

Try pictures from mi-band7. I think down the road the PNG2TGA tool within Zeus CLI has had some changes, I also had to re-export the images. Just copy the pictures from mi-band7 to gts3.

This one worked for me: convert brightness_up.png -set colorspace sRGB -set colorspace:auto-grayscale off PNG24:brightness_up.png

totoantibes commented 6 months ago

My current state

bridge$ install
info  building...
? Which target would you like to preview? balance
info  Start building package, targets: balance.
[ROLLUP] Transform 8 JS files in 472ms
[PNG2TGA] Converting PNG files...
[PNG2TGA] Error: File brightness_down.png, PNG with grayscale color type is not supported!

I got pictures from gts3

Try pictures from mi-band7. I think down the road the PNG2TGA tool within Zeus CLI has had some changes, I also had to re-export the images. Just copy the pictures from mi-band7 to gts3.

This one worked for me: convert brightness_up.png -set colorspace sRGB -set colorspace:auto-grayscale off PNG24:brightness_up.png

ms-dos script to do the conversion: for %f in (*.png) do convert %f -set colorspace sRGB -set colorspace:auto-grayscale off PNG24:%f