Cirrus Pebble WatchApp for Weather Display Live
I don’t mind admitting that I am a bit obsessed about the weather. I am especially fastidious in keeping up with the current conditions where I live. This has manifested itself in several of my recent coding projects that display data from my weather station including my own web site, a web service, a PiFaceCAD based console and an android app widget.
I bought a Pebble smart watch last year on a whim and have found it useful for its notifications of texts, emails and phone calls (I keep my phone on silent so the Pebble’s vibration based notifications are especially handy). Given I have access to my weather station’s data on all of my other devices doing the same with the Pebble was a logical choice for a new project.
Previous weather projects I have written have directly fetched and processed Weather Display Live’s clientraw.txt file. For my Pebble watch application I wanted to make more use of my own web service. This would simplify the coding process as the service, unlike clientraw.txt, exposes weather data in a well-defined structure and many different measurement units. In addition PebbleJS toolkit has built-in support for making http calls to JSON-based web services.
The only other code that was required was a web page to expose configuration settings for the application. This currently has to be hosted on the web. In my application’s case this page allows the configuration of the web service URL and a choice of metric or imperial weather measurement units.
The finished application makes use of the Pebble’s menu UI. It populates a top-level menu of current weather data including temperature, surface pressure, humidity, rainfall and wind. Selecting any of these top-level menu items displays a sub-menu of more in-depth information for the particular measurement including daily high and low values.
As usual my code is open source and hosted on github. It can be found here: pebblejs-watchapp-cirrus.