Facade
A dual world time zone analog chronometer watch face for the Fitbit
Ionic, Sense, & Versa
Analog watch face with support for dual world wide time zones,
chronograph,
moon phase,
and can act as a flashlight.
Time zone 1 is always
the main analog clock in the center of the display. If a second
timezone is selected then that time is displayed as a digital
clock in the lower left hand corner of the display. Timesones
can be selected from one of 34 cities, 198 countries, or
custom timezones can be specified.
Note that this second timezone can also act as a chronograph
(tapping on the second timezone brings up the chronograph
configuration page where it can be enabled/disabled/set).
Tapping on the center of the watch turns the face into a
flashlight (all be it a rather dim one). Tapping the center
again brings back the watch face.
Note that while the chronograph is enabled
tapping the battery level will turn on the flashlight.
The bottom right icon changes to show the phase of the moon.
Tapping this icon brings up configuration pages for choosing time
zones, setting custom time zones, (and setting the watch hands
to rotate counter clockwise).
Battery percentage is displayed in the upper left corner and
the current heart rate
or step count is displayed in the upper right corner.
You can obtain this watchface from the Fitbit Gallery or
by going to
this
direct link.
Facade is licensed under the GPL V3.0.
The latest source tree is available
for browsing
here
and tarballs for the latest and older versions are here:
Note that the source tree is exactly the same
for for all supported devices but Fitbit,
in their infinite wisdom,
has decided to create 2 incompatible SDKs.
SDK4 must be used to create
binaries for the Ionic, Versa, Versa 2, and Versa Lite
while SDK5 must be used to create
binaries for the Sense and Versa 3.
The source tree contains
package4.json and package5.json
files for both SDKs,
just rename either
file to package.json
and you can create the appropriate binary.
Main display
Refer to the picture of the main clock face
to understand the information provided by this
clock face.
There is an analog clock in the center and the
4 corners provide extra info/control buttons.
- Upper left hand corner
This shows the current battery charge as a percentage.
From 51-100 the number shows in green - the battery is
in good shape.
From 26-50 the number shows in amber - be aware that the
battery level is dropping.
From 0-25 the number shows in red - you should probably
recharge soon.
- Upper right hand corner
This is the current heart rate or step count as reported by the watch.
Tap on the number to switch between heart rate and step count.
An icon is shown beneath the number to indicate what
metric is being displayed.
- Lower left hand corner
This is a 2 line digital clock that shows the current
time in Time Zone 2.
The first line is the abbreviation for the time zone
while the second line is the actual time, with a P
added at the end for PM time.
This is where the chronograph function is
displayed when enabled.
A stopwatch icon is shown if there is no Time Zone 2
configured.
- Lower right hand corner
This is a button that
displays the current phase of the moon.
Note that waxing phases use a light green
icon while waning phases use a khaki icon.
The exact day of the new and full moon are
denoted by white icons but note that the lunar
cycle is 29.5 days.
That half day will create some inaccuracies,
new and full moons might be off by a day.
In addition, tapping this button
brings up configuration pages that can be used
to select time zones and configure the watch.
Analog watch face
A, hopefully, simple and elegant watch face showing
second granularity with a red second hand. There
are 4 areas in the center of the analog face that
show extra information.
- On the top
An AM or PM indicator.
- On the left
A two character abbreviation for the day of
the week.
- On the right
The day of the month,
rendered inside a box just because
that's sort of traditional for analog watches.
- On the bottom
If Time Zone 1 is anything other than
local
then this
will the abbreviation for that time zone
(MDT for Mountain Daylight Time,
IST for India Standard Time,
and so on).
If Time Zone 1 is
local
(the default)
then there is nothing displayed in this area.
Flashlight function
Tapping on the center of the face
will turn the watch into a flashlight.
The screen will go totally white at
the brightest setting possible.
Tapping the center of the face
again will bring back the watch.
Although the flashlight is rather dim
you'd be amazed at how helpful it is when
you're stumbling around a strange hotel
room in the middle of the night trying
to not wake your spose.
Note that the chronograph function,
when enabled,
pre-empts a tap to the center of the
watch.
In this mode just tap on the battery
level indicator and the flashlight
will be enabled.
Tapping the center of the watch face
while the flashlight is on will always
turn the flashlight off.
This means that the chronograph can
only be stopped when the flashlight
is off.
Chronograph
Facade has a built in chronograph that
can operate as either an up counting stopwatch
or as a down counting timer.
Tapping the Timezone 2 area brings
up the configuration page for the Chronograph.
When the Chronograph is enabled
the second timezone display on the
main face now displays a timer and some of the
buttons on the main face change their meaning.
Specifically:
- Timezone 2
The two line timezone 2 display
now shows the state of the chronograph.
The bottom line always show the current value
of the chronograph.
Note the the current value only shows seconds
even though the chronograph keeps track of
hundredths of seconds,
tap this value to bring up the
configuration page that will
show the exact value of the chronograph.
The top line of Timezone 2
shows the mode of the chronograph
and can be one of the following values:
- chrono
The chronograph is in stopwatch mode
(up counter) and has not been started.
- lap n
The chronograph is in stopwatch mode,
is running,
and shows the time value for lap n.
- pause
The chronograph is paused
(start it again by tapping the
center of the face).
- timer
The chronograph is in timer mode
(down counter) and has not been started.
- down
The chronograph is in timer mode
and is counting down.
Note that when the chronograph is in
timer mode the watch with vibrate when
the count hits zero.
This vibration lasts for 2 seconds
(we don't want to kill the battery)
and repeats every 10 seconds
until the timer is stopped
(by tapping the center of the watch).
- Moon icon
When the stopwatch is running this icon
will change to a lap icon.
Tapping the lap icon adds the current
stopwatch value to the list of laps.
When the stop watch is not running
or when the chronograph is in timer
mode then this icon doesn't change
and,
as normal,
tapping it brings up the configuration pages.
- Center of the face
Tapping the center of the face starts or
stops the chronograph.
Note that the flashlight can be
enabled when the chronograph is running.
When this is the case the only way to
stop the chronograph is to tap the center
to turn off the flashlight and then tap
the center again to stop the chronograph.
Chrono controls
Tapping Timezone 2 on the main
display brings up the pages
used to control the Chronogrph.
- Status
The main status page for the chronograph.
The chronograph can be in one of two
different states:
- Disabled - the chronograph is not operating.
- Enabled - when enabled the chronograph can be in
one of two modes
- Up
(Stopwatch)
mode where it counts up from 0.
- Down
(Timer)
mode where it counts down from a
start value
(and vibrates the watch when the counter
reaches 0).
The number at the top is the current time value
of the chronograph (in hundredths of a second).
Tapping this number (in Timer mode only)
brings up the Time set page which
is used to set the start value for the timer.
Tapping the Reset button resets the time value,
setting it to 0.00 in stopwatch mode
or setting it to the start
value in timer mode.
The Up/Down button selects the mode of
the chronograph,
either Up for stopwatch mode
(counts up from 0)
or Down for timer mode
(counts down from a preset value set by the
Time set configuration page).
The Disabled/Enabled button
at the bottom shows the state of the
chronograph, either enabled or disabled.
Tapping this button changes the state of
the chronograph.
- Time set
This page
has a timer start value at the top and
has a field of digits from 0
to 9,
a Cancel button,
and an Ok button.
One of the digits in the time value
is highlighted with a red square aroud it.
Pressing a timer start value digit changes the
highlight to that digit.
Pressing one of the numbers 0-9 changes the highlighted
digit and moves the highlight to the next digit.
Pressing Cancel discards the changes
and returns to the prior page.
Pressing Ok saves the time value
and returns to the prior page.
Be aware that the Time set value on this
page changes the time value on the
main status page in a rather confusing manner.
The problem is that this value is displayed
in seconds while the time value on the
main status page is displayed in hundredths
of a second.
Settings this value to 1:30,
representing 1 minute and 30 seconds,
will display on the status page as 1:30.00,
representing 1 minute and 30 seconds and 00 hundredths.
Confusing but,
given the layout constraints of a
small watch face,
it's the best solution I could think of.
- Laps
Tapping the right arrow on on the Status page
(when in Stopwatch mode)
brings a page showing the lap counters.
The individual laps show the time since
the prior lap while the Time
value at the bottom shows the entire
elapsed time.
Configuration
There are multiple configuration pages,
all accessible after pressing the
moon icon on the main watch face
which will bring up
the first configuration
page, Select TZ.
For all the configuration pages,
pressing the blue title at the top of the
page returns to the main watch face,
press the left chevron to go to the
configuration page on the left,
press the right chevron to go to the
configuration page on the right.
In summary,
presssing the left/right buttons at the top of
the these pages cycles through the configuration
pages in this order (starting from the Configuration):
Set Custom TZ <-> AM/PM Style <-> Configuration <-> Select TZ
Configuration navigation
- Configuration
This page contains the Rotation and
Moon phases controls and shows the
current date/time/lunar day.
- date/time/lunar day
The first line shows the current day and
time with GMT offset.
The second line shows the exact
(within the limits of the moon phase
calculations detailed in the section
Moon Phase Inaccuracies)
day of the current lunar cycle.
- Rotation
Set the direction for the hands on the
analog face.
Tapping the circular arrow causes the
analog clock hands to rotate in the indicated
direction,
clockwise or counter clockwise.
Fortunately,
the default is clockwise but,
if you really want to,
you can change it to counter clockwise.
(It'll probably give you a headache if you
leave it on counter clockwise but its
your choice.)
- Moon phases
Setting this button to a list icon
disables the moon phase display
while setting this button to a crescent
enables the moon phase display.
- Select TZ
This page now contains 2 buttons that
are used to select the timezones that
are displayed by the main watch face.
Each button shows the currently
selected timezone and,
pressing that button,
brings up a page that will select
the timezone from a city/country list.
This page is used to select the time zone that
is displayed by the digital display.
Scroll up and down through the list
by tapping on the up or down arrow at
the top of the page.
When you find the timezone you desire
tap on it and it will be highlighted
in gray to indicate that this is now
the time zone used by appropriate time display.
At the top of the list are 2 or 3 special entries:
- None
No time zone specified so the digital display
will be blank.
- Custom 1
Use the first custom time zone that was
set up from the Set Custom TZ page.
This is only availabe for TZ1.
- Custom 2
Use the second custom time zone that was
set up from the Set Custom TZ page.
This is only availabe for TZ2.
- Chrono
Enable the chronograph function for the
second timezone display.
This is only availabe for TZ2.
- AM/PM Style
Controls AM/PM indications:
- AM/PM
Control the AM/PM indication.
The two off and on buttons control
whether an indication is show at all.
If the control is On then
the specific indication is controlled
the the AM/PM button,
PM highlighted means
only show a PM after noon,
otherwise show AM before noon
and PM after noon.
- 12 Hour, 24 Hour
This two button control the format
for a digital display.
Note that if 12 Hour is selected
then an A or a P is
added to the time if appropriate.
- Set Custom TZ
This page presents 2 buttons,
one for the Custom TZ 1 and the other for
the Custom TZ 2.
Tapping either of these 2 buttons brins up
a time setting page.
This page
has a time value at the top and
has a field of digits from 0
to 9,
a Cancel button,
and an Ok button.
One of the digits in the time value
is highlighted with a red square aroud it.
Pressing a time value digit changes the
highlight to that digit.
Pressing one of the numbers 0-9 changes the highlighted
digit and moves the highlight to the next digit.
Pressing the +/- character changes the sign
of the time value.
Pressing Cancel discards the changes
and returns to the prior page.
Pressing Ok saves the time value
and returns to the prior page.
Versa 3/Sense enhancements
Unfortunately Fitbit,
in their infinite wisdom,
decided to change the SDK for
Versa 3 & Sense devices in a
way that is incompatibile with
the SDK used for Ionic and older Versa models.
In the interests of standardization
Facade has decided to go with the new
SDK design
(it makes it much
easier to use the same
code base to support all
Fitbit smart watches).
The problem is that the Versa 3 & Sense
devices do not support vertical scrolling for
watch faces.
This means that the configuration pages:
- Can't use scrolling to show all of the
different configuration
options on a single configuration page.
- Can't use scrolling to select a
city or country to use for a timezone.
- Can's use hour/minute tumblers to
select a custom timezone offset.
- Can's use hour/minute tumblers to
select the chronograph start value.
As such,
the UI has been changed to use buttons
to manually page through multiple configuration
pages,
use buttons to move up and down in the list
of cities and countries for timezone selection,
and use a 10 button digit field to select each digit
of a time value.
(In case you haven't noticed
Fitbit has decided that a button is
the only valid UI control for a watch face.)
This is a cumbersome design where
scrolling views and tumblers would
be much more appropriate but who
am I to argue with Fitbit.
Also, the change in the SDK required many
internal changes to the code
in order to get this watch face
working on the new devices.
Users don't care about these changes but,
trust me,
the developer is still bitter about them.
Local Time
The Fitbit has a rather loose concept of time zone,
e.g. it doesn't know anything about it.
Time is accurately reported as local time
plus the GMT offset.
If the watch is taken to a different
time zone it will silently update
the time to the current time in
the local time zone.
This means that,
if set to Local,
the analog clock face will always
display the current,
local time.
You won't know what time zone you're
in,
but you will have the correct local time.
For those that care about time zones
you can explicitly set the time zone
for the analog face and it will be displayed
correctly.
Facade has to use a rather baroque technique
to display an explicit time zone.
First the GMT offset is applied to the local
time to get UTC time.
Then,
the appropriate GMT offset for the desired
time zone is applied to that UTC time in
order to get the time in the desired time zone.
Daylight Savings Time
Since there's only a GMT offset provided there's
no way to determine the time zone
for the local time.
This means there's no way to
automatically determine daylight savings time
for the local time zone.
Even if you can use the date to find out if
daylight savings time is in effect you still
can't reliable go from a GMT offset to a time zone.
Consider Eastern European Time (EET - offset of GMT+02)
but observes daylight savings time (EEST - offset of GMT+03)
Moscow (MSK - offset of GMT+03)
does not observe daylight savings
time. If the Fitbit returns a time of 00:00:00 GMT+03:00
on June 1 is that MSK or EEST - there's no way to know.
Having said that,
for explicitly specified time zones it is possible to
use the date to determine if daylight savings time is
in effect.
Facade will do this for US and EU times (AKST/AKDT,
PST/PDT, MST/MDT,
CST/CDT, EST/EDT, GMT/BST, CET/CEST, EET/EEST).
If I get enough requests I can consider doing daylight
savings time for other time zones
but dealing with all the special cases
(who's brilliant idea was it to use
the last Sunday of a month,
that is hard to determine)
for all the time zones gets really messy really quickly
(just getting the US & EU was hard enough).
Moon Phase Inaccuracies
(Basically an apology for why Facade is only
approximately correct about moon phases.)
There are two issues that make identifying the
correct moon phase extremely hard:
- Lunar cycle
The moon completes it cycle of phases
in 29.5 days
(more precisely in 29.530588853 but who's
keeping track).
- Lunar orbit
It's an elipse rather than a circle
which means the various phases other than
a new moon can appear at slightly
different times during the lunar cycle.
This makes computing the precise
moon phase extremely difficult and
way beyond the capabilities of Facade.
Having said that,
Facade attempts to be fairly
accurate.
It calculates the current lunar
day by
comparing the current date to the
reference date of the new moon on
January 1, 1900, modulo 29.5(30588853).
This calculation seems to be fairly
accurate (it is certainly correct for
the 44,206 days from the new moon on
January 1, 1900
to the new moon on
January 12, 2021).
This results in a lunar day of 1 - 29
(actually, some months it turns out
to be 1-30 because of roundoff with the
lunar period).
The lunar day is then converted to
one of 8 icons (representing the moon
waxing from new moon to full moon and
then waning from full moon to new moon).
This conversion is offset by 2 days so
that the new moon icon appears for the
2 days before the new moon, the actual
new moon itself and then 1 day after the
new moon.
Maintained by Don Dugger <n0ano@n0ano.com>
--
"Censeo Toto nos in Kansa esse decisse." - D. Gale