Smart Meter UK - Build an app / device handler for api?

I spoke to British Gas, they would not supply a new TRIO to replace my old GEO. So I asked if I purchased a TRIO myself could I attach it, they said YES and they would help me configure it. So I managed to pick up a new one on E-bay…supplied by a different energy company. I bought a WIFI plugin …just in case it didn’t have one. It arrived 2 days ago, I think it already had the WIFI module, but I removed it used my new one to make sure. WIFI connected easy peasey but as expected it wouldn’t communicate with my meters. had chat session to BG, this time they hadn’t clue what I was talking about… But eventually agreed to send an Engineer to fit a new TRIO smart meter… Which is where I started 2 weeks ago !!!
Hopefully I’ll get a friendly engineer and I’ll find out what he has to do … If it runs Bluetooth to the meters it might just be a matter of pairing… there’s also a PIN code setting either way I’ll get something working… BG has a APP on Playstore for BG Live but I think you had to be in pilot programme but that was 2 years ago !!! Looks a bit like the GEO App.

I have been having all sorts of problems with my trio forgetting my settings, particularly my WiFi details. Really hindering the usefulness of this.

1 Like

It’s zigbee not Bluetooth, and can only be paired from the provider end

Does that mean the meter end has to connect to the TRIO ?
Can you only run one IHD at a time ?
My TRIO says NOT COMMISSIONED when connecting to meters times out
Just checked my WIFI … its perfect, cloud connection and GEO App connects OK … no problems there :slight_smile:
And my WIFI is via a TP-LINK box running as a WIFI extender through two consumer units to BT router

Update … I just found this

ds_Communications_Hub.pdf (trilliantinc.com)

Which seems to confirm what you said … but also says the TRILLANT Hub supports multiple IHD s which may be useful :slight_smile:

The bit about Commissioned by Hand Held terminal means I probably do need an engineer

Not sure about multiple IHDs, but I know the pairing can be triggered remotely by your utility provider (not sure if there is differences here between smets 1 and smets 2). Even when the engineer was at my house, the pairing was triggered remotely via his handheld device.

I wasn’t watching too closely but the engineer scans the barcode on the meter and the ihd, then sends the off, about 5 minutes later they pair

Louis

Thanks, I’ll keep you posted… but I’ve got to wait 3 weeks for an engineer now

@nayelyz @glowworm @lmullineux

For the benefit of those unaware the following is how access to Smart meters works in the UK.

The meters themselves upload data via the DCC network to the energy providers, this enables accurate billing without the need for onsite meter reading. The gas meter (if applicable) links to the smart electricity meter which links to the DCC network. If as is typical you have an in home LCD display referred to as an IHD - In Home Display it links via Zigbee to the smart electricity meter and if applicable via the fact the electricity meter is linked to the gas meter you can also get gas consumption data.

Whilst the wireless frequency used is currently the same as standard Zigbee it uses a different profile to normal Zigbee use. It is deliberately designed so as not to be accessible by standard Zigbee systems like Smartthings. There are plans to add other additional Zigbee wireless frequencies better suited to longer range or coping with thick walls. This special Zigbee network is referred to as the HAN - Home Area Network.

Note: Apparently in some countries e.g. the Netherlands a smart meter has a type of serial port which can be linked to via a cable for local read only access.
https://www.amazon.co.uk/Kaifa-Dutch-Smart-Meter-ft232r-ISKRA-ME-382-EN-MT3/dp/B07DFM2H6S

So, in the UK it is not possible to link directly via Zigbee to the smart meter, I do not know for sure but I suspect UK smart meters also do not have the serial port mentioned above.

It is possible in the UK to get a CAD - Consumer Access Device which links via the same special Zigbee profile to the smart meter but then converts it and in theory makes the data accessible to the home owner. Sadly there are a number of problems here.

  1. Not all energy providers offer CAD devices
  2. Almost no CAD makers sell direct to home owners, only one sells direct - Hildebrand
  3. Historically, energy providers have been unhelpful in allowing you to link your own CAD
  4. None, zero, CAD devices available in the UK provide local data access, they all upload to the CAD makers own private cloud system
  5. And of course each brand of CAD will have its own unique API

It would be both legal and technically possible for a CAD to provide local data access. The benefits of this are that in the event of a loss of Internet access it would still work, it potentially would provide faster response, and most importantly if the CAD maker stops providing their cloud service it would still work. Sadly they all insist on locking you in to their proprietary cloud systems.

There is a US maker of a CAD which does allow local access but they have not made any effort to get UK approval.
https://rainforestautomation.com/rfa-z114-eagle-200-utility/

Therefore currently in the UK if you do manage to get a CAD the flow of data is -

  • Smart meter to CAD
  • CAD to CAD maker cloud server
  • Cloud maker server API to your app running in Smartthings cloud
  • Your app to Smartthings client app on your phone

Note: As mentioned earlier your smart meter uploads data via the DCC to your energy provider. This process does not happen as frequently as it is possible to do so via a CAD however it does mean that your energy provider does have some data that you can access. Therefore some energy providers also provide their own API via which this data can be retrieved without needing a CAD. Octopus is one example of this.

Finally, a company has managed to provide a means to access data from the DCC network that your meter uploads. This should work with a fair number of energy providers.
https://data.n3rgy.com/consumer/home

3 Likes

It strikes me that most energy suppliers are fitting GEO TRIO II IHDs, and most seem to come with the WIFI module … So the data passed over ZIGBEE from the meters to the IHD can be accessed over your home WIFI network from the IHD ( and not the meter network). The GEO APP seems to work OK communicating with the TRIO II . British Gas have an APP called BG Live ( but is seems to have become defunct since the pilot) . British Gas documentation on the new IHD refers to the WIFI connection so I don’t see why they should block it … but I’ll find out in a few weeks :slight_smile:

Hi,

I haven’t tried to run your app yet but I’ve been trying to login to their API via Curl and all I can get back is “403 Forbidden” :frowning_face:

Can I ask if this is still working for you? If it is I just need to “POST” my username and password to /usersservice/v2/login right?

Can I also ask how you figured out all these API endpoints? My only thought is trying to decompile the Android app or something…

Thanks!

Hi,

Just want to say thanks!

I’ve been able to adapt this to integrate this now into my Openhab setup via a simple python script. Seems pretty stable although only using the electricity readings at the moment.

Still work in progress but couldn’t have got this fair without your work.

To cablespagetti - the API’s are still working for me if that helps.
I had similar issues issues with that as well - the data package has to be { ‘identity’ : USERNAME , ‘password’ : PASSWORD}

2 Likes

I too am using openHAB. I can’t get the Glitch app to work - I’m not sure what to put in the token variable - Does your python script pull from the API or SmartThings

Just thought that this is a red herring for me. The data I want is probably available at the Trio II so I just need to find the port and try to work out how to get the data.

Hi, sorry I have missed your other post, I haven’t looked at this in a while as my trio isn’t working properly.

I’ll try and help though, are you trying to run the glitch app or trying to do something different?

Which token value are you looking for?

The Glitch app. The first item in the environment variables is ‘token’ and I’m not sure what to put in there

BTW what are you using as your REST API client? I can’t find one that will allow me to log in.

Ah ok, that was there to make sure nobody else could use my glitch instance - it’s the token that is generated when smartthings auths. If you configure everything else first, connect smartthings and then look in the log you will see an error with the token in, then you can add to the env variables. If your not using smartthings or just want to disable this check its the IF at the top of the app.post function that checks it

Louis

I used soapui, not sure if anything changed since I last tried but it should work.

I used httpcanary app to create a fake VPN on my phone. Paired with another app called parrarel space It allows you then to examine traffic of an individual app to see all of its network requests and responses, even the Https ones.