UK MET Office Weather Service Binding

Hi all,

I have been using this API for a while just to pull the air temp’s as I found other services varied quite a bit.

It uses the probably not so new Data Hub now provided by the MET Office, to pull the data, and map it into OpenHab, with consideration of poll limits. (Assuming you are not constantly rebooting all the time, it should ensure you won’t exceed the daily poll rates, unless I’ve missed anything). (Our system uses less than 30 a day, I cant remember the precise number at the moment).

If anyone is happy to give it a test, the info is in the Marketplace entry here.

1 Like

Hi, David,
Thanks for posting this. I’d like to give it a test, I’m using OpenHAB 3.4.1 (openhabian). I’m fairly new to OH though, and I could do with some help about how to install the MET Office binding. Could you please point me to some guidance for this (ok if it’s not specific to this particular binding, but applies to bindings generally which are not in the community marketplace).
Thanks in advance.

Hi @AndrewJ49,

You have the same name as my old boss :slight_smile:

I’ve rebuilt the JAR against the 3.4.X snapshot and it can be downloaded here:

Once merged however it will only be available in whatever the current build version is by then so a v4 version, as new bits don’t get back-ported.

If I run on windows it would be to download the jar and copy it into the addon’s sub directory of my installation.Then after restarting the system should see if as a available binding. For openhabian - I’ll have a quick search as there must be a different location. I would imagine it would be to SFTP using WinSCP or an equivalent to the relevant location on where that directory is for openhabian. (It varies for each Linux variant generally).

Will update this once I find the details / or threads about installing addons in openhabian.

It looks like openhabian has a windows share that exposes the relevant directory: Add jar files for binding

You may need to ssh into the unit and chmod the permissions looking at the above thread, if the user it runs under does not have access.

David, Many thanks for your prompt reply. I should have mentioned that I’m running on Linux, which may make a slight difference to the exact process/locations. But even so, you’ve given me a good start there, thanks - I’ll have a dig around for my addon’s subdirectory and have a go with the jar file. And thanks for the tip about permissions.

Hi @AndrewJ49,

Our core system here is run on ubuntu. For this binding previously I would have run the two commands like below after copying the jar file to my users home directory:

sudo cp org.openhab.binding.metofficedatahub-3.4.3-SNAPSHOT.jar /usr/share/openhab/addons/
sudo chmod 777 /usr/share/openhab/addons/org.openhab.binding.metofficedatahub-3.4.3-SNAPSHOT.jar

However openhabian may have different locations to ubuntu (not sure which distro they build on).
After doing the above I would normally restart and then should see the binding available in the UI as a possible option to add. (Hopefully that helps).

Hi again @dagoodyear ,
Sorry to trouble you again. I’ve done the steps above to place the 3.4.3 .jar file in /usr/share/openhab/addons/ and changed its permissions. I restarted OpenHAB and looked for the new binding in Settings/Bindings (in both the OpenHAB distribution and Community sections for good measure) but no sign of it. I think I must be missing something but not sure what. Any ideas, please?

I just checked the 3.4 build here again. It looks like I have updated bits for v4 for the PR, so its not showing when you do add bindings, on the 3.4 build I did for you. It does work with manual file based config’s on that build, as thats how I quickly checked it by copying the v4 configs to a 3.4 build. However, I can revert the changes I think it was to the XML later for that 3.4 test build, then it should fix it for the 3.4 test build.

Thanks, David. I appreciate your help. That sounds good, but I wouldn’t want you to spend a lot of time on 3.4 as I guess your main priority is v4. I’m happy to test on 3.4.3 if it’s not too time-consuming for you though.

This looks great - should help me move away from my cobbled together ‘wrapper’ using the HTTP Binding!

Would you consider releasing the binding to the OH Marketplace whilst it is in review? As the review might take quite some time, being able to install from the Marketplace would reduce friction for users when installing and updating!

Nice work!

1 Like

Hi @AndrewJ49,

Just found what I hadn’t backported a line of XML :frowning: I have replaced the 3.4 test build if you would still like to give it a go.

Hi @hafniumzinc,

Thanks - I only found you post the other night after posting this thread (the only reason I was hesitant to approach it like you did from memory was I didn’t want to get near the poll limits of the account, and native bindings are usually easier). Usually I just let the bindings get PR’d and then flow into the system, and I guess they then get into the Marketplace as a indexed “official” binding. Will have a search on details about doing it - the more feedback the better :+1:

After finding your pdf link, the only thing I will do first is update the doc’s to include the official definitions of what the channels give :slight_smile:

This is the openHAB community marketplace


Thank you @hafniumzinc, I created a entry in there now, and deleted the other one I found previously :slight_smile:

1 Like

Hi @dagoodyear, The latest 3.4 test build is working now, I’ve been able to add the Things for the Datahub Bridge and the Forecast Data ;-)). Now to set up the items.
Many thanks for your help!

@AndrewJ49 No problem - let me know if you notice anything unexpected - although :crossed_fingers: you shouldn’t.

@dagoodyear thanks for your help with this, Items now set up and working fine.

I did notice something in the Github README (this page: ‘’‘’‘’ ) - in the table of Bridge configuration parameters, some of the names don’t look quite right against the other columns, or there may be bits missing? HTH.

Thanks again for creating this Binding, it’s a great addition to OpenHAB!

Hey this binding has been amazing - i dont suppose there’s any work ongoing to move it to the new API as it looks like the current one expires in april

Yeah I will look at as I have using at home before I pushed it. Just been a tad busy recently, to rebut the PRs for the code.

I’ll start on the adjustments this weekend - I had a look through it should be straight forward. Once I’ve got the upgrade process documented, will post here with a link to a new build, while I then work through the comments on the PR to the main repo.

I have a updated jar for snapshot 4.2 builds running, I’m guessing like myself you will need a 4.1 based build. Will try to get a revision built this week against 4.1 and double check its just the config that need’s updating for the API key on the home systems here. Other changes in the PR at the moment are basically label’s and readme updates so I don’t believe there are any breaking changes at the moment. Will update as soon as I have a 4.1 updated build.