I have another new gadget - Fitbit Versa. I have owned and developed apps on a number of Pebbles and I was very disappointed when Pebble stopped trading. I really enjoyed using my Pebble watches, and I guess to a certain extent was resentful of Fitbit, however I have to say that Fitbit have tried to be fair to us Pebble users. As my Pebbles have started to show signs of wear and tear, and Fitbit launched the Versa so I decided to have a look.
These devices are sufficiently expensive in money and effort to develop apps that I wanted to make sure the Versa was right for me. I have to say that there is lots of documentation to help me get started and there is even a simulator that I can start writing code for without buying a device.
I had a look around the guides and decided I needed a real project to work out if the device was going to be good for me.
The main app I wanted to have on my watch was wrist-spin, a realtime cricket scoreboard app that uses vibration alerts to notify me when a wicket falls. I have already produced a version of the app for Pebble.
The simple solution
In theory this should be even easier on the Fitbit as it has build in Wifi I should be able to do something like this
However as I tried to port the application is became obvious that I needed a more complex solution because
- HTTP requests cannot be made over Wifi from apps that users write for Fitbit devices, the Wifi is only used for system updates and file transfer. The only communications possible is over bluetooth to a “companion app” running in the Fitbit on a paired phone.
- ESPNCricinfo does not support HTTPS at the moment its data is only accessible via HTTP. Using a similar architecture to the Pebble I could get the phone to make a HTTP request however the SDK blocks any HTTP request that is not local.
The actual solution
To get around this I ended up with the following architecture.
- The phone has a “companion app” that makes HTTPS calls over Wifi/3G to an Azure Function Proxy, this make a proxy call to ESPN Cricinfo HTTP endpoint, the data is then returned to the phone
- The “companion app” then parses the returned data and sends a small packet over bluetooth to the Fitbit
- The Fitbit renders the score and handles any vibrating and alerting.
During development there were sine other issues that I stumbled over
- Bluetooth might not work, there might be problems with my Nokia 7.1, it is not on the list of supported devices
- Running while the screen is off might not work, there appears to be a problem disabling the app timeout in the simulator but it might be OK on a real device
- Bugs with combo buttons and physical buttons
In the end I decided that I was near enough to getting it working on the simulator and that I should buy a device and hope that I could work round the issues. As it happened the bluetooth was fine and running while the screen is off does not work in the simulator but is fine on a real device.
The bugs with the physical and combo buttons is annoying but there are workarounds.
There were any number of concerns about buying a Versa and now I have had one for a month I think on balance I am very happy with it.
I have ported wrist-spin and it is working very well and looks great.
- Screen is excellent, even in bright sunlight
- I could port wrist-spin and it works as well on the Fitbit as it did on the Pebble
- Bluetooth with my Nokia 7.1 is fine
- Battery life is not as good as the Pebble - but its OK
- Fitbit is a much better fitness tracker than the Pebble and the software is much better than Google Fit
Less Good Bits
- Pebble screen was “always on”. The Fitbit “auto on” screen mostly works but is annoying when it doesnt.
- The quality and quantity of the apps is not great, its much worse that either Pebble or Android Wear, however I dont really need many apps and I’ll probably write the ones I need.