myUplink Token Renewal Issues

At noon on Thursday 18th December the data for the NIBE Ground Source Heat Pump stopped updating onto heatpumpmonitor.org. Some of this data is sourced from the Heat Pump Controller, which only uploads it to NIBE’s myuplink.com so the required parameters need to be downloaded from there. The remainder of the data is sourced ‘locally’ – from heat meters and electricity meters – then all the data required by heatpumpmonitor.org is uploaded together.

HeatpumpMonitor.org graph not updating after noon on 2025-12-18

There are a few possible reasons for the lack of updates so once I’d noticed the issue I did a few checks:

  • Was my heatpumpmonitor ‘uploader’ script still working?
    • Yes and no: it was being invoked every minute as expected but it was failing to find any recent myUplink data to upload – which suggested a problem with the download from myUplink.
  • Was the myUplink ‘downloader’ script still working?
    • It was running but it was failing, with an error message (from the Python code that handles the OAuth2 Authentication):
oauthlib.oauth2.rfc6749.errors.TokenExpiredError: (token_expired)

The myUplink website and app were working fine, indicating that the heat pump was ‘online’ and showing recent data and graphs – so the data was getting to myUplink OK but the script that calls the myUplink API to download the data wasn’t successfully Authenticating, because it was presenting an ‘expired’ token.

Expiry of the tokens used for OAuth2 Authentication is perfectly normal; they have a relatively short lifetime of 3600 (seconds, i.e. 1 hour) and need to be renewed once they expire. Renewal is normally automatic, using the auto_refresh_url and the refresh_token to do that.

I had a vague recollection of this happening before, which led me to go through the process of creating and authenticating new application ‘secrets’ but I thought that didn’t help with having the tokens auto-renew. After a few days everything started working again so I assumed there had been a fix applied at the myUplink server end. However, it’s now been three days since the download API calls worked which feels like enough time for the myUplink administrators to have spotted an issue – although half of that time has been on the weekend.

Maybe trying to Authenticate a new Application will highlight a wider issue – or alternatively, if that works, it will show that re-Authenticatng the existing application will also work?

Using a new Application (i.e. with a different Client ID and Client Secret) worked OK – but that’s not actually testing token renewal so I need to wait for the token to expire and test it again.


Two hours later and the new Application happily renewed its (by then) expired token. Swapping the existing script over to the new Application credentials has made those spring into life and now data is flowing again.

So it looks like the Application credentials need refreshing periodically. Perhaps the refresh_token has its own expiry period? Looking back at some old files, there is a suspicious-looking date stamp of 18 Dec 2023 on one of the saved token files, which hints at a 2-year expiry period for the refresh_token.

If that’s the case, it should stop working again on 21 Dec 2027.

Car Care Facilities

A day of dry and not-too-cold weather provided a long-overdue opportunity to wash the worst of the building site mud off the BMW i3 and to give it a coat of Autoglym Extra Gloss Protection to try to stop it getting too dirty too quickly again over the Winter.

The outside space works very well for washing the car, with two outside taps (fed from the rainwater harvesting tank) and the permeable block paving draining the water away.

Even with the boot and bonnet open the car still looks small inside the garage, with plenty of room all around for access – and scope to accommodate much larger vehicles. (The i3 is exactly 4m long whereas larger estate cars can easily be 5m – but the garage is more than 6m, at the insistence of the original Architect.) The lighting works well, with four pairs of outdoor-grade Philips LED fittings – each pair being switchable independently. Each light fitting draws 42.9W so that’s 343W if they’re all on – which seems like a huge wattage for LED lights but the illumination level seems about right (and will improve once the walls get painted white).