Main config.json object data structure
Property name | Property type | Description | |
info | Info | Default | Described additional info about current watchface |
use_custom_arrows | Boolean | false | If true , will use custom arrow images from /xdrip/arrows folder. The arrows folder should contain 7 images with the following names. DoubleDown, DoubleUp,Flat, FortyFiveDown, FortyFiveUp,SingleDown,SingleUpIf false or not specified, the embedded arrows would be used. |
resource_to_replace | int | 0 | Defines the resource number which should be replaced and used to generate wathcdrip app dynamic content |
graph | GraphSettings | Defines graph settings | |
arrow_position | Position | Position | Defines the arrow position where it would be rendered on the canvas |
bg_value_text | BgValueText | BgV | Will display bg value with specific settings |
iob_text | SimpleText | SimpleText | Predicted IOB text settings |
wpb_text | SimpleText | SimpleText | Predicted WPB text settings |
pump_iob_text | SimpleText | SimpleText | Pump iob text settings |
pump_reservoir_text | SimpleText | SimpleText | Pump reservoir text settings |
pump_battery_text | SimpleText | SimpleText | Pump battery text settings |
delta_text | SimpleText | SimpleText | BG delta text settings |
delta_time_text | SimpleText | SimpleText | BG delta time text settings |
treatment_text | SimpleText | SimpleText | |
treatment_time_text | SimpleText | SimpleText | |
no_readings_text | SimpleText | SimpleText | This text would be displayed if there is no reading to display |
no_readings_time_text | SimpleText | SimpleText | No readings time settings |
battery_level | SimpleText | SimpleText | Will display a phone battery level |
status_text | array [SimpleText] | not implemented | |
ext_status_line_text | SimpleText | SimpleText | Will display the AAPS external status data (since watchdrip v0.2.2) |
Info object data structure
Property name | Property type | Description |
description | String | A short description for current watcface |
author | String | Wathcface creator author |
watch_type | String | The watch model is supported by this watch. |
version | String | The current version of the watcface |
GraphSettings object data structure
Property name | Property type | Default | Description |
position | Position | Position | Position where to draw the graph |
width | int | 120 | Graph width |
height | int | 80 | Graph height |
x_axis | AxisSettings | If defined, will display x-axis with specified settings | |
y_axis | AxisSettings | If defined, will display y-axis with specified settings | |
low_line | LineSettings | If defined, will display a low BG line with specified settings | |
high_line | LineSettings | If defined, will display a high BG line with specified settings | |
in_range_line | LineSettings | ||
low_val_line | LineSettings | ||
high_val_line | LineSettings | ||
predictive_line | LineSettings | ||
iob_line | LineSettings | ||
poly_predictive_line | LineSettings | ||
cob_vals_line | LineSettings | ||
bolus_line | LineSettings |
Position object data structure
Property name | Property type | Default | Description |
x | int | 0 | The x-coordinate |
y | int | 0 | The y-coordinate |
rotate | int | 0 | The amount to rotate, in degrees |
AxisSettings object data structure
Property name | Property type | Default | Description |
has_lines | boolean | true | Will connect the dots with a line |
is_inside | boolean | true | Set to true if you want axis values to be drawn inside the chart area(axis name still will be drawn outside), by If set to false, the axis is drawn outside the chart area. |
text_size | int | 10 | The amount to rotate, in degrees |
line_color | String(color format) | #FFFFFF | Defines line color |
text_color | String(color format) | #FFFFFF | Defines text color |
LineSettings object data structure
Property name | Property type | Default | Description |
display | boolean | true | Will display a current line |
point_radius | int | Set the radius for points for this line. | |
line_thickness | int | Set line thickness. | |
text_size | int | Set labels text size | |
has_lines | boolean | ||
has_point | boolean | ||
shape | ValueShape | Set shape for points, possible values CIRCLE, SQUARE, DIAMOND | |
has_labels | boolean | ||
is_filled | boolean | ||
area_transparency | int | Set area transparency(255 is full opacity) for filled lines | |
color | String(color format) |
TextSettings object data structure
Property name | Property type | Default | Description |
font_size | float | 10 | Text size |
text_scale | float | 1 | Set the paint’s horizontal scale factor for text. The default value is 1.0. Values > 1.0 will stretch the text wider. Values < 1.0 will stretch the text narrower. |
font_family | String | sans-serif | Since watchdrip 0.1.2 is possible to use one of the android system fontface “MONOSPACE“, “SANS_SERIF“, “SERIF“. Or use an app embedded “Roboto-Bold.ttf“, “Roboto-Italic.ttf” and “Roboto-Regular.ttf“. Or if enabled custom watchface, you can upload your custom font ttf file to “xdrip/fonts” directory and specify the font file name in this field, like “my_custom_font.ttf”. I case you use an app embedded or custom font, the text_style option will be ignored. |
text_style | String | normal | The text style. possible values “normal”, “bold”, “italic”, “bold_italic” |
stroke_width | Float | 1 | |
text_align | String | left | Set the text alignment |
color | String(color format) | #FFFFFF |
SimpleText object data structure
Property name | Property type | Default | Description |
text_settings | TextSettings | TextSettings | Text Settings |
position | Position | Position | Defines the text position where it would be rendered on the canvas |
text_pattern | String | “” | The text pattern would be used to display text in normal state. Use ‘$value‘ to display the value. Use ‘$time‘ to display time data. Use ‘$time_short‘ to display short units in time |
outdated_text_pattern | String | “” | The text pattern which would be used to display text in an outdated state. It is possible to use the same variable as in text_pattern |
BgValueText object data structure extends SimpleText
Property name | Property type | Default | Description |
color_high | String(color format) | #FFFFFF | The text color which would be used when BG data is high |
color_low | String(color format) | #FFFFFF | The text color which would be used when BG data is low |
Hello Artem.
Thank you a lot for this great overview.
It’s really a huge list of possibilities.
Greatings from Germany
Andreas
LikeLike
Hi Artem, How are you???
I’ve got a question: how can i “x_axis” “line_thickness” change, cause when i set chart on GTR2E i’ve got vertical line but they are randomly visible.
LikeLike
Hi guys,
I wanna change the watchface, so that I can’t see the graph, I want a picture instead.
Any idea how to do that?
There are a lot of setting, but i couldn’t find a file anywhere with that content. I just see the watchface.bin all the time.
And another thing, if I open the watchfac.bin, open it and pack it again (without changes), it’s more than double size. Is there a trick to compress it?
LikeLike
You need to create a custom wf. To pack/unpack there is a lot of tools online (I use python). To save space cut all PNG smaller as you can and remove the half alpha (pixel half transparent – to do that I used PIL python and numpy)
LikeLike
Is it possible to insert a line break in the string text_pattern between delta text and time? If yes how?
LikeLike
Okay I can use delta_text and delta_time_text to split the string of the delta.
How can I change the text color? Contrary to what is stated in the table above, you cannot specify the colors in RGB in hex (#ffffff). Some combinations work (e.g. #0000ff), most don’t (e.g. #555555, #aaaaaa). What colors are supported? I want to use the Bip S palette: (source https://amazfitwatchfaces.com/forum/viewtopic.php?f=76&t=1419 and https://github.com/wdschei/amazfit-bip-s-watchfaces/tree/main/resources/palettes)
Why the colors in bg_value_text are set to color_high: “#ffffff00” and color_low: “#ffff0000 – four hex values instead of three?
LikeLike
4 hex value are for RGB and A (alpha transparency)
LikeLike
Has anyone made this work with a key from the Amazfit Falcon?
LikeLike
Thanks so much for your work (using an Amazfit 5 with WatchDrip+ perfectly).
How do i need to get started with customization?
Where do i find this file config.json?
LikeLike
Use the guide he created
https://github.com/twinko/Amazfit-watchface-Xdrip-guide
There are few example for some band. I suggest you to reverse engineer wf that you can find online for you own band
LikeLike
Thanks for the link. Though, i am still having trouble to get started.
Is there a working example for AMAZFIT BAND 5 that looks like the original?
I just want to change font sizes and not the whole watchface.
LikeLike
Hi, is there a way to use a xdrip watchface on the Amazfit GTR3? It seems the one for GTR3 Pro is not compatible 😥
Can I, somehow adapt the one for GTR3 Pro?
Thanks
LikeLike
Hello, is this also valid for ZeppOS based devices? I would very much like to make a watchface with Watchdrip+ data for a GT3 Pro.
LikeLike