Giter Site home page Giter Site logo

py_amazfit_tools's People

Contributors

ghbhaha avatar ghtalpo avatar titanzx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

py_amazfit_tools's Issues

Unknown PulseProgressElement

it seems wf creation handles parameters up to id 6

elif parameterId == 6:
pass
from watchFaceParser.models.gts2mini.elements.common.scaleElement import ScaleElement
self._scale = ScaleElement(parameter = parameter, parent = self, name = 'Scale')
return self._scale
else:
print ("Unknown PulseProgressElement",parameterId)
return super(PulseProgressElement, self).createChildForParameter(parameter)

while parsing has id 7 and 8

6: {'Name': 'Scale', 'Type': Scale},
7: {'Name': 'NoDataImage', 'Type': Image},
8: {'Name': 'UnknownImage', 'Type': Image},

Role of Unknown7 in Number

I did a quick try and repacked a watchface with a positive value for Unknown7 (Minutes).
Looks like it's meant to offset the digits vertically.
image

{
  "Info": {
    "DeviceId": 73
  },
  "Background": {
    "Image": {
      "X": 133,
      "Y": 100,
      "ImageIndex": 0
    },
    "Preview": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 1
    },
    "PreviewKorean": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 1
    },
    "PreviewChinese": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 1
    }
  },
  "DateBlock": {
    "Date": {
      "PaddingZeroMonth": true,
      "PaddingZeroDay": true,
      "Unknown6": 0
    }
  },
  "TimeDigital": {
    "Hours": {
      "TopLeftX": 42,
      "TopLeftY": 100,
      "BottomRightX": 147,
      "BottomRightY": 177,
      "Alignment": "TopLeft",
      "Spacing": 0,
      "Unknown7": 0,
      "ImageIndex": 2,
      "ImagesCount": 10
    },
    "PaddingZeroHours": true,
    "HoursFollowPosition": false,
    "Time": {
      "Unknown1": 1,
      "Minutes": {
        "TopLeftX": 167,
        "TopLeftY": 100,
        "BottomRightX": 272,
        "BottomRightY": 177,
        "Alignment": "TopLeft",
        "Spacing": 0,
        "Unknown7": 50,
        "ImageIndex": 2,
        "ImagesCount": 10
      },
      "PaddingZeroMinutes": true,
      "PaddingZeroSeconds": true,
      "MinutesFollowHours": false,
      "SecondsFollowMinutes": false
    }
  }
}

Some bugs into GTS2Mini

I play with pack/unpack, it works in general, but have 2 bugs i found:

  1. "Weather" shortcut switch to Music, in fact - seems like wrong ID.
  2. At GTS2Mini, Weather shotrcut defined not in "Shortcuts", but into "VUIndex" of the "Weather" block. But if i try to add it, i got "Unknown humidity type" error at packing and weather block stop working on device.

PS: I can provide watch face .bin which utilize both shortcuts to check.

It seems the GTS2 Mini can display scales for some parameters

0000
9dd4668a2762a86e8b837b933a23efe4.zip

It is a bit weird, on this watchface the blue circle is obtained with a set of images.
But the green circle (for steps) seems to be drawn by the watch

Parsing descriptor for parameter 7...
4 (22): 28 bytes
    1 ( 8): 239 EF    # x coord.
    2 (10): 84 54     # y coord.
    3 (18): 33 21     # width?
    4 (20): 33 21     # height?
    5 (28): 180 B4    # start angle
    6 (30): 540 21C   # stop angle
    7 (38): 8  8      # ????
    8 (40): 18446744073694918516 FFFFFFFFFF 20B774  # green color

Cannot unpack packed watchface

I created a very simple watchface on Huami with just hour/minutes and a background:
simple.zip
If I unpack it I get this json

{
  "Info": {
    "DeviceId": 73
  },
  "Background": {
    "Image": {
      "X": 133,
      "Y": 100,
      "ImageIndex": 0
    },
    "Preview": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 1
    },
    "PreviewKorean": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 1
    },
    "PreviewChinese": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 1
    }
  },
  "DateBlock": {
    "Date": {
      "PaddingZeroMonth": true,
      "PaddingZeroDay": true,
      "Unknown6": 0
    }
  },
  "TimeDigital": {
    "Hours": {
      "TopLeftX": 42,
      "TopLeftY": 100,
      "BottomRightX": 147,
      "BottomRightY": 177,
      "Alignment": "TopLeft",
      "Spacing": 0,
      "Unknown7": 0,
      "ImageIndex": 2,
      "ImagesCount": 10
    },
    "PaddingZeroHours": true,
    "HoursFollowDate": false,
    "Time": {
      "Unknown1": 1,
      "Minutes": {
        "TopLeftX": 167,
        "TopLeftY": 100,
        "BottomRightX": 272,
        "BottomRightY": 177,
        "Alignment": "TopLeft",
        "Spacing": 0,
        "Unknown7": 0,
        "ImageIndex": 2,
        "ImagesCount": 10
      },
      "PaddingZeroMinutes": true,
      "PaddingZeroSeconds": true,
      "MinutesFollowHours": false,
      "SecondsFollowMinutes": false
    }
  }
}

If I repack it:

  • the .bin file is different
  • the watchface won't transfer to the watch
  • the unpacker will show many bytes gap and fail on last image

Parameter 22

Watchface eddc844402b6157dfb01e2b780b64b0b.bin contains data for parameter 22

It looks like a set of 8 images that cycle during the day.
Not sure if we can have more or less than 8.
image

Parsing descriptor for parameter 22...
1 ( A): 132 bytes
    1 ( A): 50 bytes
        1 ( 8): 51 33      # id of the first image
        2 (12): 4 bytes    # array of 10 (x,y) coordinates
            1 ( 8): 0  0
            2 (10): 109 6D
        2 (12): 4 bytes
            1 ( 8): 0  0
            2 (10): 109 6D
        2 (12): 4 bytes
            1 ( 8): 0  0
            2 (10): 109 6D
        2 (12): 4 bytes
            1 ( 8): 0  0
            2 (10): 109 6D
        2 (12): 4 bytes
            1 ( 8): 0  0
            2 (10): 109 6D
        2 (12): 4 bytes
            1 ( 8): 0  0
            2 (10): 109 6D
        2 (12): 4 bytes
            1 ( 8): 0  0
            2 (10): 109 6D
        2 (12): 4 bytes
            1 ( 8): 0  0
            2 (10): 109 6D
    2 (12): 8 bytes        # array of start/stop time for each image?
        1 ( 8): 19 13      # 19:00 -> 06:00
        2 (10): 0  0
        3 (18): 6  6
        4 (20): 0  0
    2 (12): 8 bytes
        1 ( 8): 6  6       # 06:00 -> 08:00
        2 (10): 0  0
        3 (18): 8  8
        4 (20): 0  0
    2 (12): 8 bytes
        1 ( 8): 8  8       # 08:00 -> 10:00
        2 (10): 0  0
        3 (18): 10  A
        4 (20): 0  0
    2 (12): 8 bytes
        1 ( 8): 10  A
        2 (10): 0  0
        3 (18): 11  B
        4 (20): 30 1E
    2 (12): 8 bytes
        1 ( 8): 11  B
        2 (10): 30 1E
        3 (18): 12  C
        4 (20): 31 1F
    2 (12): 8 bytes
        1 ( 8): 12  C
        2 (10): 31 1F
        3 (18): 15  F
        4 (20): 0  0
    2 (12): 8 bytes
        1 ( 8): 15  F
        2 (10): 0  0
        3 (18): 17 11
        4 (20): 0  0
    2 (12): 8 bytes
        1 ( 8): 17 11
        2 (10): 0  0
        3 (18): 19 13
        4 (20): 0  0

Typo "AppendDegresForBoth"

There is a typo, what causes to not be compatible with the older "AmazfitBipS_Tools_alpha_230420". I didn't see this typo first. Wondering why it's not working

Within "Today" , "OneLine", "AppendDegresForBoth": false, should be: "AppendDegreesForBoth"

Special custom watchface from Zepp application

Here is a funny thing to tinker,
In Zepp application you can select a background, a text color and it will generate a watchface for you.
The resulting watchface is really weird.

  • header is shorter and different
  • it seems there's a first section that describe the template watchface, ie. zepp demo background and white text
  • then further in the bin file you have the real generated watchface, but I believe the colored digits are drawn by the watch, they are not pre-rendered images

This was reported to me by Lazim, props to him
It looks like this
image

and the bin:
ret.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.