After a decent start to the year, the second half of this season hasn't exactly gone to plan for me.

After completing the Olympic road race in Brazil last month, I started feeling a bit of discomfort in my ribs and chest area at the dinner table the following night but put it down to the effort of a really tough race which had been contested in tropical conditions.

The pain was worse the next day but as I was on board a flight home, there wasn't much I could do about it until I landed in Nice on Tuesday evening.

By then the stabbing pain in my chest was so bad I thought I was having a heart attack so I went directly to hospital, where I was diagnosed with bacterial pneumonia.

Apparently there are two types of bacterial pneumonia, one which takes around 10 days to manifest itself and the other just 48 hours, so until I get the test results back, I'm still not sure whether I caught the bug in Rio or before I left.

The biggest blow for me was the fact that after missing the Tour de France in July, I was also forced out of the Vuelta a Espana, my favourite race of the year.

The Vuelta is a race where I always seem to go well. I've finished fifth overall, won a couple of stages and have worn every classification jersey on the race, including the red jersey of race leader.

Ironically, skipping the Tour meant that I would have been going into the Vuelta with fresh legs for the first time and I was really looking forward to seeing what I was able to do this year.

Instead though, I was forced off the bike for 10 days and ordered to rest.

With the season slowly drawing to a close, I knew that if I wanted to be competitive again for the end-of-season races I would have to stay focused to stay lean and not lose all the benefits of the hard work I had put in before the Olympics, so there was no gorging on big meals or going out partying.

After 10 days, the pain in my chest had subsided and the specialist gave me the all clear to gently get back on my bike.

With a week of easy training under my belt, I was able to do four-hour spins most days in the second week and was pencilled in to ride the Tour of Britain, which began last Sunday.

As I hadn't done many hard intervals in the period leading into the eight-day race, the opening stage was a bit of a shock to the system and I felt I lacked a bit of leg speed and rhythm but with our sprinter Ben Swift and climber Wout Poels the protected riders beginning stage two, I was told to try and infiltrate the early breakaway group, especially if a big group got clear on such a difficult stage.

As it happened, I was one of three Paddys in the 15-man move, with JLT Condor's Conor Dunne and Ryan Mullen of Cannondale also up there.

We built up a lead of four minutes but a bit of rainstorm in the last hour or so made the racing that little bit harder as we hit the climbs.

With 30km to go we hit the aptly named 'The Struggle' and by the top there were only five of us left but my lack of training meant I started cramping with 20km to go.

Luckily there were a few descents where I could stretch my legs and the cramp eased off a little bit as a small group containing Swifty and my cousin Dan Martin got across to us shortly after.

Steve Cummings and Julien Vermote pulled away to contest the stage win but with no power left I couldn't really lead out Swifty for third, so I attacked with a kilometre to go in an effort to force the others to ride behind.

As expected, I completely blew and finished 11th as the others flew past me.

If it had been any other day I would have been disappointed but looking back at my last month I was happy with my day.

Having finished stage two level on points with Belgian Xandro Meurisse in the King of the Mountains competition, the following day I tried to snatch the jersey by contesting the sprints at the top of each climb but despite being just a single point off the Belgian after stage three, I realised that I wasn't going to be able to take the jersey off Meurisse as he was much quicker than I was.

On Thursday I tried to save my legs for Friday's stage in the hope that I could move up the overall standings and was delighted when my team-mate Ian Stannard went clear in a small breakaway group and won the stage. 'Yogi' is one of the hardest-working riders in the pro peloton and it was nice to see him take his chance of glory.

Friday's summit finish saw a lot of teams expecting us to ride for Ben or myself but the plan was to play Wout's card on the finishing climb of Haytor, which worked out well for us as Wout soloed clear to win the stage and I finished sixth, moving up to seventh overall with two days and three stages to go.

Wearing the Irish time trial champion's jersey gave me some extra motivation for Saturday morning's 15km time trial and the short, lumpy stage suited me really well. I gave it everything and was delighted with eighth place on the stage and a move up to sixth overall that I held to today's final stage into London.

When I lined up for the start in Glasgow last Sunday I had no idea how things were going to go, so to finish the race in sixth place overall is a nice bonus.

With two stage wins and victory in the team classification, it's been a good week for my Sky team-mates and me.

For me though, there is lots of racing to look forward to yet and next week Ryan Mullen and I will ride the time trial in the inaugural European championships in France.

After that I hope to tackle the Italian end-of-season classics, the Tour of Piedmonte, Milan-Turin and the Tour of Lombardy as well as the world championship in Doha, Qatar, in October.

Before that though, I'm back in Dunboyne, Co Meath, for the annual Nicolas Roche Classic on September 24. As usual we will have two longer spins of 100km (9am), 60km (10.30) followed by a 12km family spin at 12.30. All you need is a bike and a helmet, so hopefully I will see some of you there.