Tutorial

How do Smart Meters get smarter? A guide to smart meter firmware updates

  • 15 June 2021
  • 4 replies
  • 236 views
How do Smart Meters get smarter? A guide to smart meter firmware updates
Userlevel 7
Badge +4

What is Smart Meter firmware?

 

Have you ever wondered how Smart Meters get their “smart” capability from? Part of that is through the special programs that run on them, which is often known as firmware. It’s a specially designed kind of software that’s developed for the specific purpose of making smart meters work. It’s a bit like the Operating System on your computer, but a little bit more lightweight and more streamlined. This also gives the smart meter the brains that makes everything work.

 

Where does the firmware come from?

 

The same place as the meters themselves - the meter manufacturer. Your energy supplier doesn’t get involved with this stuff. :wink:

 

I’m using Aclara as an example for this guide as I’ve got access to the 108 page long SMETS2 Aclara User Manual via SmartMe which makes this possible. I have more plans for this monster of a user manual too! Credit to both for the provision of the content that helped towards this guide. It is also made easier by the fact Raichu is an Aclara SGM1411-B and I know it well as a result.

 

Can I get a copy of the firmware or the source code?

 

Sorry, but I’m afraid that’s not possible unfortunately. The firmware and underlying source code is pretty sensitive stuff which forms part of critical infrastructure. As such, it’s always kept private and is not publicly available.

 

While I did request permission to publish this guide and it has been reviewed by OVO for security and legal reasons to make sure I don’t accidentally reveal anything secret, this guide is probably about as close as you’d be able to get.

 

For security reasons, Smart Meter firmware is always developed in-house by the meter manufacturers and is closed-source. This means that you cannot obtain a copy of the source code and they won’t accept external contributions towards it. Doing so would also breach the copyright and license terms, but that’s beyond the scope of this forum - you may want to chat to a friendly lawyer if you’d like to learn more about that stuff. :sunglasses:

 

What firmware do Smart Meters come with?

 

Good question. I’m able to answer that one to a degree, but I won’t be going really deep into the details. Exactly what’s on each smart meter can vary, but the basics are pretty common and there’s usually at least three different firmware components. Let’s break this down a little.

 

Metrology Firmware

 

This firmware is absolutely critical to the meter being able to do the basic job of any energy meter. It’s designed to accurately monitor and record your usage based on how much electricity or gas is detected as passing through the point of measurement and works in conjunction with the hardware sensors to do this. Because the Metrology Firmware forms part of the Meter Certification, it never changes once a particular meter model has been Certified as doing so would break the approval and would have to be Recertified all over again. However, future models can use newer versions and have them included as part of the Certification. :innocent:

 

To help ensure that other firmware upgrades don’t interfere with Certification, the Metrology Firmware is completely isolated off from everything else and runs on a dedicated processor, which is also isolated from everything else.

 

Bootloader Firmware

 

The Bootloader Firmware is another critical component of smart meters. It does not get modified after it is installed on a meter for security reasons and it is also isolated from everything else. This firmware component is primarily responsible for ensuring integrity and correct operation of the meter.

 

The main jobs performed by the Bootloader Firmware relate to starting up the entire device when powered up, performing integrity checks on a continuous basis and error detection. It is also responsible for handling firmware upgrades where needed. If the meter attempts to perform any kind of firmware upgrade any fails for any reason, the Bootloader Firmware will recover the meter back to a working state and send an alert to the supplier about the error. The firmware upgrade can then be re-attempted at a later date or diagnostics can be run as appropriate.

 

Application Firmware

 

The Application Firmware is where most of the actual magic happens and it can be upgraded freely when new versions are released.

 

The Application Firmware is primarily responsible for day to day running of the meter, providing a way for the user to interact with the equipment and a few other magic tricks. On top of this, it also handles tasks such as Time of Use tariffs, controlling the relays for things like Economy 7 and to help with communicating with other devices on the Home Area Network.

 

Is the firmware reliable? How can I be sure firmware updates won’t fail?

 

Yup, very much so. In actual fact, there are so many checks, balances and safeguards in place that it's almost impossible for a smart meter to get completely bricked by a failed update or corrupted firmware. And even if it does, there's always the failsafe of switching to the backup firmware.

 

If a new firmware update is downloaded and the meter identifies possible signs of firmware tampering or corruption in the new firmware image, it will reject the new version and remain on the existing running version.

 

These checks run from the moment the meter begins to power up and remain active at all times. If the meter loses power for any reason, then it will additionally run further integrity checks on top of the standard set when the power is restored.

 

On top of this, smart meters also perform a ton of verifications and validations of not only the firmware, but also the stored data and even the meter hardware itself on a constant basis. They also run automated self-tests on the metrology hardware every so often and attempts to self-heal if the test fails. In the event that the meter cannot self-heal or self-recover from errors or faults, it notifies the supplier for further investigation. Pretty smart, huh? This alone is one of the things that makes smart meters actually smart. They can still do these checks even if there’s no comms too.

 

Traditional meters were never capable of doing this to anywhere near the same extent. Even when some of them were capable of fault or tamper detection, it was rarely noticed or reported unless it was either a Pay-As-You-Go/Prepayment Meter that was causing issues with topping up or had gotten into a seriously bad state.

 

What do I need to do to install a new firmware update on my meters?

 

Simple. Go grab some lunch and relax. :wink:

 

Firmware updates take place automatically in the background without needing you to do anything. There’s no need for an engineer visit or a Meter Exchange either, since it can all be done remotely. The electricity meter can be updated pretty quickly, since it’s able to simply download and install the new firmware directly. The gas meter may take longer due to the fact it only checks in with the Communications Hub in short heartbeats every 30 minutes, but the Gas Proxy within the Comms Hub will ensure that the gas meter gets updated. Once the full firmware image is transferred over, the gas meter commences the firmware upgrade process as usual.

 

Even if the update fails, your supplier will be alerted and they’ll take care of fixing the issue so you don’t have to.

 

Will my supply be interrupted or my bill get messed up by firmware updates?

 

Nope! That’s pretty much impossible. On top of the safety measures that basically prevent bad firmware from bricking the meter, there’s loads of safeguards in place that prevent bad data from messing your account up and causing invalid bills. If your smart meter suddenly started submitting impossible readings, these would fail validation almost immediately and your supplier would investigate what’s going on.

 

Part of the trick here is related to the fact that the Bootloader and Metrology Firmware are isolated from the Application Firmware. This means they will always remain stable no matter what. In addition, the update and reboot processes are usually pretty quick so there’s not much time for the meter to not track usage at all.

 

What can the updates deliver?

 

This can vary between SMETS1 and SMETS2 meters, since they’re both very different from each other. S1 meters will always have S1 firmware of some kind, while S2 meters will always have S2 firmware of some kind. It's not possible to mix and match S1 and S2 hardware/firmware combinations. Everything at a particular Site must either be completely S1 or completely S2.

 

However, in both cases firmware updates can be used to implement bug fixes, security improvements and potentially add new features to the meter, depending on the contents of the update.

 

In addition to this, SMETS1 meters are currently in the process of getting firmware updates that will enable them to be managed via DCC and enrolled into the National Smart Meter Network. This will allow them to gain some of the capabilities of an S2 meter (such as being able to work across all suppliers), but they will always be physically S1 hardware until the meter(s) are replaced at the end of their service life.

 

Do I need to pay to get these firmware updates?

 

Nope! They’re completely free of charge in that it’s already included as part of the services. Your Daily Standing Charge already covers this kind of thing, so there’s nothing more to pay.

 

But I don’t want automatic updates! Can I have them turned off and disabled?

 

Sorry, but I’m afraid not. On is the default setting and it cannot be modified. This isn’t Windows 10 after all! :joy:

 

The reason for this is because Smart Meters form part of critical national infrastructure and there are extremely strict rules about what’s allowed. There’s no exceptions to these rules either. The rules in question require Smart Meter firmware to be updatable to address things like security vulnerabilities that may come up and you can’t opt-out. I can assure you that it’s much, much better to get these things patched quickly than it is to leave equipment vulnerable.

 

How did you find out all this info? Is it allowed to be posted?

 

Well, a small portion of it comes from my own knowledge that I’ve built up over the last seven months, but most of it comes from the SMETS2 Aclara User Manual linked above that I have a copy of. The Community Moderators have reviewed this post  for legal and moderation purposes prior to making it public. It would not have been published without this taking place first. :wink:


4 replies

Userlevel 7

Here’s the latest offering from one of the community’s Plan Zero Legends, @Blastoise186

 

Talking about one of their areas of interest, the lovely, quirky world of firmware...

 

Nice one blaster!

Userlevel 5
Badge

> The firmware and underlying source code is pretty sensitive stuff which forms part of critical infrastructure. As such, it’s always kept private and is not publicly available.

I know that is the usual excuse, but I do not buy the argument. Closed source is no safer than open source, and in fact it is usually riddled with security issues. For a metering device, the source code should be publicly available for review. 

On the plus side, the upgrade of SMETS1 units to DCC is a great step forward, and it should help to make smart meters much more useful. 

Userlevel 7
Badge +4

I agree with you there as well, open source can sometimes be more secure too. Especially because anyone trying to sneak malicious code into the codebase will often be detected by someone else and the malicious commits rolled back or reverted. I don’t personally have a problem with such commits remaining in the commit history with stuff like Git of course, as long as they’re reverted. After all, if they’ve been yanked from the current codebase, they’re gone.

Sadly, I don’t make the rules on these things…

And yeah… SMETS1 was an absolute nightmare and in some ways a bit of a disaster. It kinda proves that you just can’t trust everyone to play nice with each other, especially when they all go off in completely different directions and pay no interest at all into stuff like interoperability or cross-compatibility. “SMETS1+” will at least help with that though, which is better than nothing. Having now gone through all of S1, S1+ and S2 I can definitely say with absolute confidence that I much prefer S2 as it’s far more reliable overall.

Userlevel 7

Lifting the lid on the mysterious inner-workings of the Smart Meter again, @Blastoise186?

 

Great work! :thumbsup:

Reply