Pebble Watch Screen Tearing Fix (with lots of pictures!)

Posted February 1, 2016 by waynedgrant
Categories: Pebble


I’m a big fan of the original Pebble Watch. Day-to-day it allows me to keep my phone in my pocket while still getting my notifications and controlling my music and its long battery life at around a week negates the fact it doesn’t have fancy graphics. I’ve even coded an app or two for it.

The only annoying thing about the Pebble is the infamous screen tearing issue. I’m on my third Pebble in three years and every single one has succumbed to this intermittent issue within a year:


Credit to Pebble – they’ve carried out two free replacements for me so far with no arguments. One of those was out of warranty. They didn’t even want the broken one back the second time around. So now I’ve got two Pebbles with the annoying screen tearing issue.

I was sure Pebble would do a fourth replacement if I asked nicely. However, this seemed very wasteful for what could be a simple issue to fix myself. Indeed I’d seen a few forum threads like this one describing how I could go about making a fix myself. Based on these I set about fixing both my Pebbles with only a few tools. Each Pebble took less than three minutes to fix. With a little care you can do the same.

This is my step-by-step guide to fixing the screen tear issue. I’ve included what I didn’t see in any of the guides I read – lots of pictures covering each step.

1) There’s some stuff you’ll need as pictured. Left to tight we have a small flat head screwdriver (I use an electrical screwdriver), a small Torx screwdriver (I used a size T4), an edged plastic tool, some masking/painters tape and some scissors.

The only stuff I had to buy was the Torx screwdriver and the plastic tool. I ordered a really cheap mobile phone repair kit from Amazon (only £3) to get these.


2) You’ll also need a broken Pebble. Flip it over and you’ll find four small screws, one in each corner. I believe the original KickStarter Pebbles have no screws and are therefore probably glued together so I’m afraid you are on your own if you’re one of the early adopters.


3) Use the Torx screwdriver to remove all four screws.


4) Put them somewhere safe as they are tiny and look really easy to lose.


5) Next is the tricky bit. Take the plastic tool and prise the back cover off. Be very careful here as you don’t want the back cover to come completely off yet (and if it does your Pebble will be completely broken as a result. You’ll see why in the next step). Just break the seal all the way round and lift the back case no more than a few millimetres.


6) Slowly prise the back cover away from the top and take a look inside your Pebble. Looking at it from the top you’ll find a small, round battery on the lower left-hand corner. This is glued to the inside of the back cover and attached by two tiny wires to the main body of the watch. It looks really easy to snap these wires if you pull the back cover away from the watch too far.


7) Instead use the small flat head screw driver to prise the battery off the back case.


8) Now completely remove the back case. The battery will remain connected to the Pebble by its wires when you do this.


9) Push the battery back down into the case. Then take a length of masking tape and fold it over on itself four of five times. Cut the folded tape to be the same width and height as the bottom compartment of the Pebble not including the tall gold section on the left side.


10) Place the masking tape into position as pictured.


11) Finally reattach the back case and replace the four tiny screws using the Torx screwdriver.

You should now have a jagged screen free Pebble. It probably isn’t water proof anymore but at least you can read the display.


Met Office Weather Maps PHP API

Posted October 17, 2015 by waynedgrant
Categories: Code Projects, Meteorology, Open Source, Weather Station

Tags: , , ,

For those who want to add detailed weather maps of the UK to their websites an excellent option is to use the Met Office’s DataPoint web service API. Among many other features the API makes available several different types of observation and forecast time series weather maps as detailed images.

However, DataPoint still leaves users with a lot of work to do if they want to utilise the maps on their websites. For example the DataPoint API only provides the map images as simple layers with no underlying map of the UK. This gives users the flexibility of adding their own UK maps but creates one of many common problems that all DataPoint users have to solve individually.

To address this and other website integration issues I’ve made the met-office-weather-maps PHP API available on GitHub under the MIT License. It’s primary use case is to make it easier to incorporate the latest Met Office weather maps into a web site while not requiring users to directly engage with the Datapoint API.

It’s functionality includes:

  1. Wrapping the complexity of underlying JSON web service calls by exposing one simple PHP class for each available map type.
  2. Adding tailored UK map layers to fetched images that obey the required Mercator projection boundary box.
  3. Adding UK timestamps to map images where they are not already present.
  4. Operating caching to allow maps to be requested on a regular schedule. This ensures that the latest maps are fetched without making excessive calls to DataPoint which may breach their fair use agreement.

The met-office-weather-maps API supports all of the DataPoint map types:

  • Infrared satellite
  • Lightning strikes
  • Precipitation forecast
  • Pressure forecast
  • Rainfall radar
  • Surface pressure charts
  • Temperature forecast
  • Total cloud cover forecast
  • Total cloud cover and precipitation forecast
  • Visible satellite

See the met-office-weather-maps Git Hub project page for details of its requirements, installation and API documentation.

I originally wrote met-office-weather-maps for incorporation into my own weather website where I regularly fetch a selection of weather maps. I previously used Weather Underground’s map API but I find DataPoint to be far superior in terms of map selection and the high frequency of map update.

See below for some real examples that demonstrate met-office-weather-map’s capabilities.

Example 1: Surface Pressure Forecast Map

The Surface Pressure Forecast image available from DataPoint is a transparent layer depicting isobars and fronts:

Click to Enlarge

The same image after processing by met-office-weather-maps. Note the addition of a timestamp and a colour base image of the UK:

Click to Enlarge

Example 2: Visible Satellite Map

The Visible Satellite image available from DataPoint is an opaque layer depicting cloud cover:

Click to Enlarge

The same image after processing by met-office-weather-maps. Note the addition of a yellow outline overlay image of the UK which does not obscure the existing image layer’s timestamp and key:

Click to Enlarge

Example 3: Temperature Forecast Map

The Temperature Forecast image available from DataPoint is a partially transparent layer depicting colour-coded screen temperature:

Click to Enlarge

The same image after processing by met-office-weather-maps. Note the addition of a timestamp, a colour base image and a black outline overlay image of the UK:

Click to Enlarge

Example 4: Cloud Cover and Precipitation Forecast Map

The Cloud Cover and Precipitation Forecast image available from DataPoint is a transparent layer depicting cloud cover and colour-coded precipitation rates:

Click to Enlarge

The same image after processing by met-office-weather-maps. Note the addition of a timestamp, a colour base image and a black outline overlay image of the UK:

Click to Enlarge

Road Trip of the Living Dead

Posted May 24, 2015 by waynedgrant
Categories: Expat

Tags: , , ,

I make no secret of my obsession with zombie movies. This does not mean I like just any movie with zombies in it. There’s no place for “Zombies vs Werewolf Strippers” or whatever else in my movie collection. I mean the good zombie movies with subtext, engaging characters and plot. If I had to narrow it down to my top two zombie movies of all time it would by George A, Romero’s  Dawn of the Dead (1978) and Night of the Living Dead (1968) in that order (in my opinion “Dawn” is one of the rare examples of the superior movie sequel).

Both movies were filmed in and around Pittsburgh, Pennsylvania which is around 400 miles from where I’m currently living in New Jersey. I’ve done a number of road trips across the North Eastern US and with time running out on my stay in the USA I embarked on my final vacation here: A Road Trip of the Living Dead.

While the drive to Pittsburgh was a long one for me all of the locations for both movies are within 40 miles of each other. With a car you can easily hit them in a few hours. The google map below shows all the locations and points of interest I took in over a single day.

“Dawn” Locations

For my trip my initial stops were in Monroeville to visit a few “Dawn” locations. These correspond to the red pins on the map.

First up was the so-called “Mall of the Dead”, Monroeville Mall. This is where most of “Dawn” was set.

Click to Enlarge

Click to Enlarge

On the exterior much of the mall is still recognisable especially at the rear.

Click to Enlarge

Click to Enlarge

As it has been almost 40 years since “Dawn” was filmed nothing of the original look remains in the interior. However, you can still locate areas where some of the movie’s action took place such as the corridor leading to the heroes’ hideout.

Click to Enlarge

Click to Enlarge

Up until the week before I visited in May 2015 the small arched bridge featured in the movie still remained. This had just been torn down at the time of my visit which was a disappointment. At the time of writing a campaign was underway to save the dismantled bridge and preserve it in a museum.

Click to Enlarge

Click to Enlarge

Other locations in the mall are more difficult to locate such as the balcony where the notable “No More Room in Hell” dialogue takes place. See the link to “Adam the Woo’s” video at the end of this post for a great guide to how to find this and other locations in the mall.

Next up was the location of the “Zombie Hunt” scenes which is only a couple of miles from the mall on Logans Ferry Road. Unlike the mall this road is mostly unchanged from the movie only missing the army trucks, mob of armed rednecks and National Guardsmen drinking Iron City beer.

Click to Enlarge

Click to Enlarge

A short walk further along Logans Ferry Road is Monroeville Airport where the helicopter refuelling scene and a few zombie kills were filmed. I didn’t attempt to enter the airport as I had no wish to get in trouble with Homeland Security.

Click to Enlarge

Click to Enlarge

Living Dead Museum

Next stop was Evans City which is 40 miles to the North of Monroeville. “Night” and another Romero movie The Crazies (1973) were filmed here.

My first visit in Evans City was to The Living Dead Museum which is the green pin on the map.

Click to Enlarge

Click to Enlarge

The museum is small but packs a load of cool stuff into the space including original props from many of Romero’s movies, memorabilia, a “Maul of Fame” and many recreations of zombies from the films. At $3 it is a bargain. Note that the museum is not open every weekday so check their opening hours on their website if you are planning a visit.

Click to Enlarge

Click to Enlarge

“Night” Locations

Next up were various “Night” locations in and around Evans City which are the blue pins on the map.

I thought Monroeville Mall would be the highlight of my trip. I was wrong as Evans City Cemetery knocks it into a cocked hat.

It looks almost exactly as it did in the opening scenes of “Night” right down to the sign at the entrance.

Click to Enlarge

Click to Enlarge

The particular headstone Barbara cowered behind and the grave stone on which Johnny had his head smashed in remain in place.

Click to Enlarge

Click to Enlarge

I wrapped my trip to Evans City by visiting the Bridge where the posse scenes from “Night” were filmed and the location of the Farmhouse where most of the movie was set. Both are located close together a few miles north of Evans City on Ash Stop Road. The bridge looks quite different as its missing the trusses’ it sports in the film. The farmhouse is long gone having been demolished straight after filming. You can see a newer house sitting on the same foundations from Ash Stop Road.

My final act of the day was to pay homage to the “Zombie Hunt” scene by sampling a few bottles of Iron City beer. A perfect end to a perfect day.

Me with an Iron City

Click to Enlarge

If you want to do a similar road trip then the following YouTube videos by Adam The Woo make for a good overall guide.

The first video takes in most of the locations from “Dawn”. I get the impression that they didn’t have permission for some of their filming which means they visited a few places I wasn’t prepared to trespass in (like the grounds of Monroeville Airport and the back stairwell of Monroeville Mall). The second video recreates all of the action of the “Night” cemetery scene right down to the individual headstones.

“F Weather” Pebble Watch Face

Posted March 21, 2015 by waynedgrant
Categories: Code Projects, Meteorology, Open Source, Pebble

Tags: , , ,

Hot on the heels of my Cirrus Pebble WatchApp I’ve just completed another creation for the Pebble: “F Weather”. F Weather is my homage to one of my favourite web sites: THE FUCKING WEATHER. THE FUCKING WEATHER tells the weather like it is and so does F Weather except it does so for your current location:

Click to Enlarge

Click to Enlarge

There are a few differences between F Weather and my Cirrus WatchApp. First of all this is a watch face rather than a watch app so it’s not interactive (but then again it doesn’t need to be interactive to relate the current temperature through the medium of swearing). Secondly F Weather is written in C and PebbleKit JS. This makes it much faster than the PebbleJS based Cirrus WatchApp. I haven’t written any C for 13 years or so and thoroughly enjoyed getting back into it.

Current conditions are looked up from Yahoo’s RESTful query services which involves two calls.

The first call takes the current longitude/latitude position available to the Pebble and looks up the corresponding WOEID and city name: city, woeid from geo.placefinder where text=”40.87,-74.16″ and gflags=”R”&format=json

The second call uses the WOEID to look up the current temperature: item.condition.temp from weather.forecast where woeid=12760611 and u=”c”&format=json

This process is repeated every 15 minutes.

My code is open source and hosted on github. It can be found here: pebblec-watchface-fweather. The install PBW can be found under Releases.

Cirrus Pebble WatchApp for Weather Display Live

Posted January 17, 2015 by waynedgrant
Categories: Code Projects, Meteorology, Open Source, Pebble, Weather Station

Tags: , , , , ,

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.

I coded the application in Javascript using the CloudPebble website. For a browser based IDE CloudPebble is very feature rich with syntax highlighting, github integration and logging. It also has the ability to deploy directly to a pebble watch provided you have a paired smart phone for the watch on the same wireless network as the computer running CloudPebble.

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.

Click to Enlarge

Click to Enlarge

Cirrus Android Widget for Weather Display Live

Posted December 13, 2014 by waynedgrant
Categories: Code Projects, Java, Meteorology, Open Source, Weather Station

Tags: , , , , ,

One of my recent projects was to develop an Android widget to display the values found in online WD Live clientraw.txt files. It accesses the same data as my other weather related code projects this year: a JSON Web Service for Weather Display Live and a PiFaceCAD Weather Display Console.

I’ve name the Widget “Cirrus” after the cloud genus. The widget supports 18 different weather data points (and displays the current trend for many of these) and 16 different measurement units. It also has colour coding for easy recognition of different temperature ranges (using the BBC Weather temperature colours) and UV index (using the US EPA UV Index colours).

Click to Enlarge

Click to Enlarge

I use the widget to display the current conditions for both my own weather station and others when I travel. So far I have installed and run it successfully on a Samsung Note II (Android 4.4.2), Samsung Galaxy Express (Android 4.1.2) and a 2013 Nexus 7 (Android 5.0.1).

At this time I do not have any plans to publish the widget on the Google Play Store. I have, however, open sourced the code using the MIT License and made it available via GitHub here:

See the read me for installation and use instructions.


Weather Station Winter Report

Posted November 21, 2014 by waynedgrant
Categories: Meteorology, Weather Station

Tags: , , ,

The onset of Meteorological Winter is a little over a week away here in New Jersey (it runs from 1st Dec to 1st March). Last year’s winter here represented a period of prolonged cold and quite sizeable snow fall. It was certainly more severe than anything my weather station setup experienced in the preceding years in Scotland (although note that the station was only installed there in August 2011 after the severe winters of 2009 – 2010 and 2010 – 2011).

This post relates my experiences with my weather station from last year’s winter (2013 – 2014) and is a record of what worked well and what did not work so well. I run a standard Oregon Scientific WMR200 setup and will describe how well each of the sensors stood up to the harsher than normal conditions. I have illustrated the post with pictures taken at the time and supplemented with various charts produced using my Meteo Sheeva setup.

Winter 2013 – 2014 in New Jersey

Last winter New Jersey, like many parts of the USA, was in the grip of a prolonged Polar Vortex. There were certainly colder places in the USA that winter. There were also places that got a lot more snow. Indeed, according to meteorological records, New Jersey has itself had much colder and more snowbound winters in its past. What made it unusual was how prolonged the cold was and, as a result, just how long the deep snow was able to persist.

Click to Enlarge

Click to Enlarge

As I have already mentioned it was very cold. The coldest it got according to my instruments was -15.7°C on the morning of 7th January 2014. What was really extreme was that the temperature could remain entirely below freezing for days at a time. The chart below shows the number days per month from December 2013 to February 2014 when the temperature did not rise above 0°C. January was especially gruelling with 14 of 31 days spent entirely below zero.

Click to Enlarge

Click to Enlarge

The following chart shows the minimum temperature for every day from the start of December 2013 through to the end of February 2014. Extended cold like this quickly becomes wearing on people and machines alike.

dec - feb min temperature

Click to Enlarge

Note the spike in minimum temperature on 22nd December 2013 (to 13.7°C). This is not a sensor anomaly and I remember that day well. Preceded by some rather cold days the temperature got up to 20.6°C. This made for shorts and t-shirt weather for one day in December. As we can see from the chart the warm weather did not last long and temperatures plummeted and stayed cold thereafter.

Then there was the wind chill. This dropped to a low of -21.3°C on the same morning as the lowest temperature was recorded. I suspect that the wind chill was worse than this in reality as my anemometer is not in the most exposed of locations. The graph below shows the daily minimum wind chill from late December 2013 (when the sensor was installed) through to the end of February 2014.

Click to Enlarge

Click to Enlarge

Finally there was the snow. Up to 2 feet was present on the ground for weeks at a time. The problem was not that it snowed an incredible amount. Instead what did fall remained for weeks at a time because of the consistently low temperatures.

snow depth

Click to Enlarge

Weather Station Sensor Location

The siting of my weather station’s sensors has some bearing on my experiences last winter so I will describe that briefly here.

I am not entirely happy with my weather station setup at the moment. Unlike my previous setup in Scotland I am constrained in terms of space having no garden or roof to speak of. The anemometer/wind vane and rain gauge are installed fairly low down on the makeshift box and pole arrangement pictured below (a UV sensor is also pictured but this was not actually installed until mid-2014). The Temperature/Humidity sensor is better situated and can be found round the corner on another pole in a spot well sheltered from the sun.

Click to Enlarge

Click to Enlarge


Before I turn to each sensor’s winter performance I will talk a little about batteries. Oregon’s various sensors are wireless and are therefore powered by AA or AAA batteries. Conventional wisdom in weather station circles goes that it is best to swap from alkaline over to lithium batteries when it gets cold as they perform better in such conditions. I stuck it out with normal alkaline batteries last winter and suffered no signal drop-outs from my sensors. Lithium based batteries are no doubt better for extremely cold conditions but they are an unnecessary expense for the kinds of conditions I saw last winter.

Temperature/Humidity Sensor

The WMR200 comes complete with a THGN801 temperature and humidity sensor. The sensor is a relatively small box installed within a plastic weather shield. Mine is mounted on a pole about a metre off the ground. During the winter the shield did its job well as it became heavily encrusted with ice and protected the sensor which kept reporting consistently with no signal drop-outs throughout the winter. The shield even sported a 30cm icicle at times as pictured below.

Click to Enlarge

Click to Enlarge

Ice was a real hazard generally last winter. Indeed the accumulated ice managed to bow the previously vertical trees near the sensor to be almost horizontal under its weight.

winter weather

Click to Enlarge

The only let down with the THGN801 was a strange behavior that manifested whenever the air temperature dropped to -10°C. Whenever this occurred the humidity would continue to be reported by the sensor but would not vary until the temperature rose above -10°C at which point it would start to report the true value again.The following chart shows this behavior starting at just after midnight on the 7th of January and persisting until mid-morning on the 8th of January (where the blue plot goes flat).

Click to Enlarge

Click to Enlarge

Basically the humidity reported by the THGN801 below -10°C will almost certainly be incorrect and as will the associated dew point. Various weather forum searches have informed me (for example, here) that this is not an individual sensor fault but an endemic problem with the THGN801 and other similar sensors . If I lived in an area with frequent -10°C cold I would not be relying on Oregon gear.

Anemometer / Wind Vane

The WGR800 is a combined anemometer and wind vane. Mine is mounted, less than ideally, on a relatively short pole. The sensor performed well with no signal drop-outs all winter. The only issue I had with it was with the wind vane component on top and I put this at least partly down to its low position. When heavy snow fell on it overnight it could become encrusted on the vane which froze and locked into a single fixed position. Pictured below is one occurrence of this (note the rain sensor is starting to disappear beneath the snow. More on this below).

Click to Enlarge

Click to Enlarge

While frozen the wind vane reported a constant (and incorrect) wind direction until it defrosted sufficiently to move again. This wind vane would typically only be frozen for a few overnight hours at a time when there was heavy snowfall. One such instance is charted below when there was wind but a suspiciously constant South-Easterly wind.

wind vane frozen 25 jan

Click to Enlarge

Rain Gauge

The final outdoor sensor I had last winter was the PCR800 rain gauge. There is not much to say here as it was completely buried under deep snow for much of last winter as pictured below. Once it was buried I felt it was safer (for it and for me) to leave it there insulated under the snow until it was revealed in the thaw. Despite its imprisonment it reported (understandably zero rainfall) constantly with no signal drop-outs throughout the winter.

Click to Enlarge

Click to Enlarge

Winter 2014 – 2015 in New Jersey

My setup remains the same as it did last winter apart from the addition of a UVN800 UV sensor. Customer reviews show this to be a particularly delicate sensor prone to permanent failure in colder conditions. Given that temperatures here are already falling frequently below zero and UV is already a distant summer memory I have already mothballed the sensor until spring comes around.

The rain sensor did fail the following May when it was hit by 11.5 cm/hr rain. As a result its innards got a bit wet and no amount of drying could get it to signal consistently again thereafter. I have since replaced it with a spare unit. The question is, did its icy incarceration shorten its time span? I will never know but if my replacement rain gauge starts to become entombed in the same way this winter I will fish it out and bring it inside. There is no point in risking it in conditions where there is no rain to report anyway.

With a week to go and temperatures already plummeting here I have prepared all of the deployed sensors with new batteries. All that remains now is to see what this winter will bring to my corner of New Jersey.


Get every new post delivered to your Inbox.

Join 87 other followers