Open bigdigital opened 3 years ago
@bigdigital Ok i have done some Photoshop magic :D It looks horrible so far but its pretty small. There is a lot of room to make it pretty, but not a lot of reducing the size. Perhaps i coudl reduce the size by 5-10 more kb. But i think thats the absolute maximum.
https://github.com/twinko/GTR-2-WF-Xdrip-EN/tree/main/small_v2 Could you compare the upload and processing time for this watchface with your own one?
The complete watchface uploading takes 6-7 seconds. I think this is not bad results
Sounds great. I'll try to reduce the size even more and adapt the look a little bit. Just to let you know: I used the "Save for Web" feature under Data in Photoshop. Than i reduced the colors to 8. This is possible with every image. Especially with images that have gradient. But i noticed it helps also with pictures that are only white text on a trasparent background. The file size got cut up to 1 third of the original filesize.
Reducing the number of colors actually not influence to the watch face size. Unfortunately, this watch model understands only 32 bit true color images with transparency. So every pixel here takes 4 bytes of the data. The watcface packer will anyway convert your 8 bit image to true color image.
Reducing number of the colors, was actual for miband and bip watch series. But for gtr it does not work.
hmmmm, ok, looks like my trick doesnt work. But i would love to know if Photoshop does anything elso to reduce the image size. I will create the same WF with the original images today. If that takes the same time to completly upload, my photoshop magic didnt work :D As soon as i know how to minimzie the images as good as possible, I'll create more watchfaces. But i think it shouldn take longer than the 6-7 seconds. My goal was 5 sec ^^
btw thank you for all he in depth details and testing :)
One more thing. you didnt upload the graph, would that slow down the process even more?
Want to add one more thing, the watch takes a packed watcface. It uses a QuickLZ algorithm to compress the watcface. I am not familiar in detail how it works, but i guess, if using a images with the same color in a row, the compression rate can be higher. This can reduce the watcface size. So maybe, the number of colors can affect the final file size. In this case watcface would be transferred faster. And i guess such watcface can be uncompressed faster on the watch itself (not sure) so this can also affect "activation" state. Regarding the graph, in this case it would be added on the background image, so the image size would be the same. The only difference can be in the compression, but i don't think adding the graph would significantly affect the uploading time. Also I'll try to make a test watcface with different varieties of number of colors ,and will see how it would affect the final size and uploading speed
Ok, yes, the number of colors indeed can influence the watcface uploading time because of compression. I made a watface with only one fullscreen background image. Here is my test image and test results with full and reduced colors
uncomp size,bytes | compr size, bytes | uploading time | num of colors 824712 | 345814 | 19s | all colors 824712 | 157739 | 13s | 256 colors 824712 | 81074 | 5s | 6 colors 824712 | 24660 | 2s | 6 colors latest image has the same number of colors but another pattern
So i can conclude the number of colors indeed may influence the watcface size and uploading speed, but image pattern also can affect the final size.
Hey @bigdigital ,
thank you for the investigation. Reducing colors is pretty bad for complex designs but for a simple design it would help a ton to reduce the colors in total. Sometimes you find a color thats used but not really visible on the watch.
1. Regarding compressed and uncompressed. Im a little confused by that. The watchface editor only lets me save my WF in a compressed form ("Pack and compress .bin"). -->When you mean "uncompressed", you mean all png files and the json file?
Because, my compressed .bin is way bigger than the files in the folder on my PC.
all png and json: 45 kb compressed .bin: 90 kb https://github.com/twinko/GTR-2-WF-Xdrip-EN/tree/main/01-WF%20MD225
2. Moreover i tried to implement the graph and all the xdrip data. You wrote om patreon: "Please note you should place UNCOMPRESSED watface into xdrip folder." --> Same question as above: what do you mean by "uncompressed"? Here you added: "To get different watcfaces, you would need to replace this file (config.json) together with my_watchface.bin, my_image.png and my_mask.png(if it was used)." -->Where do i get the my_image.png from? Is that the background image (0001.png) or is it the canvas.png(found it in your releace in the watcface folder of the gtr2) from your watchface? If its the canvas.png, where is that located on the watchface, because its way smaller than the whole watchface? Moreover, is it possible to place the changed config.json in the xdrip folder aswell or do i have to compile a whole new release, to be honest that doesnt sound practical :D ? As you see i have some difficulties to understand how to set everything up to have the xdrip data shown :D
3. -->One more question: Is the background of the graph invisible or does it have a solid color (is the canvas.png the background of the graph?)?
######################################
And attached the latest version of the WF. Its way better looking and reduced the size down to 90kb. But i dont see any more space to reduce the size without loosing pretty bad in looks. https://github.com/twinko/GTR-2-WF-Xdrip-EN/tree/main/01-WF%20MD225 Moreover edited a similar WF that has less gradiants. It's at about 81KB. Getting closer to your 69kb of the default .bin ;D https://github.com/twinko/GTR-2-WF-Xdrip-EN
main.exe --gtr2 47 --file config-file.json
where config-file.json is a location to your json.
As a result, you should receive a unpacked bin file. This file you would need to use in the xdrip. Xdrip will inject the required resource into this file, compress it and sent it to the watch. HEy @bigdigital thank you for your detailed reply!
3. You can use any color for graph background. If you want the transparent background, just assign a color with alpha channel property for "bg_color" property.
Would the following work? Or without " ?
"graph": {
"bg_color": "rgba(0, 0, 0, 0)",
I used everything you told me above and created the following. https://github.com/twinko/GTR-2-WF-Xdrip-EN/tree/main/01-WF-MD225-Version3-xdrip-ready Im really nervouse about the .bin size. its 1MB. Thats a huge difference to your .bin i found in your release. I thought your bin is already compressed as well. Moreover i dont understand how a folder with a size of 38,5kb including the json becomes 1 MB, but whatever ;) . Btw i used the packer from AmazFit_Watchface_Editor_2.
Im not 100% sure regarding the positioning of the xdrip data. Sadly my watch still isnt shipped, i already contacted the seller, having some trouble there. Could you test the files regarding complete watchface uploading time and how it looks? If you dont have the time, let me know, I'll ask at patreon.
As soon as i have a working watchface, I'll create a guide for others to create own watchfaces. It was a steep learning curve for me :D Thank you for your support :)
*Update:
looks like i did something wrong :( https://github.com/twinko/GTR-2-WF-Xdrip-EN/issues/9#issuecomment-887797873 Would be great if you have a look :)
Sorry for the delay in response, was busy last week to take a look. I have long wanted to start writing a guide for creating custom watch faces, but I still can't find the time for this. It would be cool if you can do it :)
@bigdigital I'll create a guide with all the stuff i learned so far. I'll link it here and if possible I'll give you ediing rights, to add things if you feel like i missed something.
@bigdigital startet writing the guide, if you want to edit something, let me know. Than i need to figure out how to give you writing rights :) https://github.com/twinko/GTR-2-WF-Xdrip-EN
I've created a WF for GTS2e. I took nike WF and adjusted it to make update time comparable to the built-in one from xDrip. I can share my files if anyone is interested in testing/improving the WF. BTW the only option to remove graph I've found is to make it 1x1 size.
@dubidrubi looks sweet. would be great if we could upload it here: https://github.com/twinko/xdrip-watchface-collection
Please upload the necessary files, than i upload it and add it to the collection. :)
btw thx for the update on the graph. hadn't time to tinker with it.
@dubidrubi Looks nice. Yep, there is no way to remove the graph. In future versions, it would be possible to do this by removing "graph" item in the config file. For now, i guess you can simply set XY graph position to the outside of the canvas.
@dubidrubi looks sweet. would be great if we could upload it here: https://github.com/twinko/xdrip-watchface-collection
Please upload the necessary files, than i upload it and add it to the collection. :)
btw thx for the update on the graph. hadn't time to tinker with it.
Here you go https://ufile.io/f/rjgxn
Thanks @twinko and @bigdigital
@dubidrubi awesome, could you do me a favor and upload an gif aswell (the oes you can createwithe the watchface editor, to see a preview)?
@twinko absolutely
@dubidrubi Can i know how long watchface uploading takes for you? I see the uncompressed watchface has size 790kb. I did some optimization in your watchface, so the wathcface size decreased to 245kb . When compressed, it takes only 27kb, so i think wf uploading should be much faster now. Can you test it? my_watchface_nike_optimized_v1.bin.zip
@bigdigital Thanks, indeed update time improved a bit. Before the change - 6-7 sec After the change approx 5 sec
May I know what have you changed exactly?
Btw, graph position adjustment doesn't seem to be working, moving it outside the image doesn't work for me :(
I've cut your bg image into small parts and set them as a icons for the corresponding elements As a main background was set a simple color.
Thanks, didn't know that makes a difference.
@dubidrubi btw if you want even faster upload times, you ca reduce the size of every image by following the guide here: https://github.com/twinko/GTR-2-WF-Xdrip-guide#111-reducing-image-size
This can cut the size in half or even further and you wont notice the quality reduction on your watch. But it takes some time to modify every image.
@bigdigital @dubidrubi Wanted to upload the watchface. One question: do i need the my_image.png from dubi, can i remove it entirely or do i replace it with an image of 1 black pixel?
Checked my_image.png image. As i can see from @dubidrubi photo , the image size can be also decreased i think it is possible to change image height to 51 px, without any negative consequences for watcface design. But this should also a little increase fw uploading speed. @dubidrubi can you try to do this?
@bigdigital I'll definitely check it but don't have much time during the week, most likely next weekend. Also, I'm planning to add AOD with watch/BG values on it.
Hey @dubidrubi ,
i added the WF to the collection, let me know if you update the watchface, ill update the collection :) https://github.com/twinko/xdrip-watchface-collection/blob/main/README.md
regards
thanks @twinko Title states BipS but it is not a Bip WF, it is GTS 2e
@dubidrubi Thank you for checking, now it should be fine :)
Thank you for your incredible work, but I have an Issue with the watchface for GTS2, it only starts synchronisation till 99% and breaks up. So what is the reason for this ? Are there any other watchfaces with xdrip+-Integreation ? How to upload the watchface-files on the watch ? (I ve tried notify for amazfit)
Is there a chance to use GTR2 watchfaces on GTS2 ? (Differences between GTS2e and GTS ?)
Hope someone will have an useful advice on my issues/problems
@HaraldS76 hi, im really confused by your questions. please specify which question belongs to which watchface? Does your first question is about the default watchface or the one provided by dubidrubi?
You can find different watchfaces (only 1 at the moment for the GTS), including a tutorial here: https://github.com/twinko/xdrip-watchface-collection If you finde more, let us know.
Its possible to convert GTR2(e) watchfaces to GTS2(e) ones, i think! Please read here for more information. I think the last releases of the watchface Editor are able to convert watchfaces. https://amazfitwatchfaces.com/forum/viewtopic.php?t=1888
Hi :) Thank you for the incredible work and the guide to create something by ourselves:) I have created a WF for GTR2E if someone is interested I am happy to share it here - I am a total newbie in this so be kind to me haha. I didn't add a lot of functions as for me the steps, battery and big fonts for time are the most important things in a WF.
@mavricaaa looks awesome! Does ithave AOD (always on Disply)-functionality, to see data when the screen is off?
Feel free to share the files, i will add them to the collection: https://github.com/twinko/xdrip-watchface-collection
btw is the small ":" separator in the time a mistake or did you do it intentionally? and what are your watchface upload times, how long des it take to upload the watchface?
@twinko Thanks:) Puhh thanks, i uploaded the wrong separator file, I corrected it now:) I personally don't use AOD function but I have added it now, but only the BG info without the time etc. i don't know if that affects battery life. Upload time is cca 13secs, even though the files and .json together are 36Kb. The time and day of the week digits arent system fonts in this case so I guess that might be the problem, or some colors?
@mavricaaa looks great now, btw sweet change of the strap :) Feel free to Upload the watchface files, including a final gif from the watchface editor, I will add it to the collection. Im not a pro with gira, if you finde a way to directly contribute to the collection feel free as well.
@twinko I have uploaded them here I will figure out the direct way to upload it for the next time :P The upload time still bothers me so when I catch some time I will try to figure it out, but in the meantime if anyone else has and idea feel free to modify it of course:)
@mavricaaa could you do me a favor, i need to have to download every single file one after another. Please upload it as .zip or .rar :)
@twinko Oh right, sorry:) I uploaded a zip now:) https://ufile.io/hpaa4q63
@mavricaaa now it says file removed ^^ Perhaps a google drive or dropbox upload is a better way.
@twinko https://www.dropbox.com/s/7vhacxxhtgeyoc4/GTR2EXDRIP.zip?dl=0 OMG I am really clumsy these days -.- . I guess it was a limited time availability file sharing site. Hopefully it is okay now:)
Hi Twinko,
my question belongs to watchface nr. 14 for GTS2, in detail:
I was not able to install the watchface files in the filestructure of the readme file, because I use Android 11 and do not find the xdrip+-folder on my android phone
I was able to download sashas watchface editor, upload the watchface bin file and save it, so then an watchface installation with notify - app was possible
But: No bloodsugar values are displayed from xdrip+
So who can help me to find the xdrip+-folder on Android Phone and how to put the files there ?
Which part of xdrip+ you are using, the amazfit-sync-service or MiBand as Smartphone ? Is there any how to set the right buttons ?
Best regards
HaraldS76
Gesendet: Dienstag, 09. November 2021 um 11:22 Uhr Von: "twinko" @.> An: "bigdigital/xDrip-miband" @.> Cc: "HaraldS76" @.>, "Mention" @.> Betreff: Re: [bigdigital/xDrip-miband] Watcface creation amazfit GTR2(2e), GTS2(2e) (#5)
@HaraldS76 hi, im really confused by your questions. please specify which question belongs to which watchface? Does your first question is about the default watchface or the one provided by dubidrubi?
You ca find different watchfaces (only 1 at the moment for the GTS), including a tutorial here: https://github.com/twinko/xdrip-watchface-collection If you finde more, let us know.
Its possible to convert GTR2(e) watchfaces to GTS2(e) ones, i think! Please read here for more information. I think the last releases of the watchface Editor are able to convert watchfaces. https://amazfitwatchfaces.com/forum/viewtopic.php?t=1888
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Is anyone already trying to implement this to GTS/GTR3?
I already applied on huami's developer portal. But as an individual developer the access is very limited.
@mavricaaa added your WF to the collection, thank you for contribution :) https://github.com/twinko/xdrip-watchface-collection
@HaraldS76 im sorry about the missing xdrip folder, i cant help with that. You need to find it or ask the xdrip community about where to find it here (https://github.com/NightscoutFoundation/xDrip/issues). You need to upload the new watchface in the xdrip folder! Using notify - app wont work! You need to use miband, not amazfit syn service! When you found the folder, you need to follow this guide, to create a xdrip compatible watchface: https://github.com/twinko/GTR-2-WF-Xdrip-guide
@Klaus3d3 i follow artems patreon and right now he didnt wrote anything about plans to implement this to gts or gtr3. I think a much requestet watch lately was the gts 2 mini. Some days ago he puplished miband6 support.
@Klaus3d3 I already did some research regarding GTR3. The watcface modification in GTR3 version is now much easier, and do not require a watcface deobfuscation or any special compilation. The watcface for this watch is a simple zip package which contains a javascripts and images. The javascript defines the watcface representation and image resources are encoded with a slightly modified TGA images protocol. But since this watch has a new OS, not sure it would have a similar communication protocol. So most possibly the implementing integration for this watch would require a lot of time to reverse-engineer the communication protocol. For now, i guess, the next watcface for implementation would be a gts 2 mini. I also have plans to separate miband project from the xdrip. This would allow adding a new features and devices without touching xdrip core.
@Klaus3d3 I already did some research regarding GTR3. The watcface modification in GTR3 version is now much easier, and do not require a watcface deobfuscation or any special compilation. The watcface for this watch is a simple zip package which contains a javascripts and images. The javascript defines the watcface representation and image resources are encoded with a slightly modified TGA images protocol. But since this watch has a new OS, not sure it would have a similar communication protocol. So most possibly the implementing integration for this watch would require a lot of time to reverse-engineer the communication protocol. For now, i guess, the next watcface for implementation would be a gts 2 mini. I also have plans to separate miband project from the xdrip. This would allow adding a new features and devices without touching xdrip core.
Thanks for looking into it. Yes, the watchfaces are much easier to design. Huami already provided a watchface editor via their developer platform. I applied as an individual developer, but sadly they don't give access to their standard sdk for this type of developer. There is also a documentation for the standard sdk. Should be pretty easy to, once you get access to the sdk. But i guess we have to missuse some other data entries like weather data to get these on the watchface directly.
I've moved Questions from Patreon thread