UK MET Office Weather Service Binding

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.
Andrew.

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: https://github.com/dag81/vesyncOpenhabPyPort/raw/main/manual%20builds/MetOfficeDH-TestOnly-3.4.X/org.openhab.binding.metofficedatahub-3.4.3-SNAPSHOT.jar

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

2 Likes

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!
Andrew.

@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: ‘’‘https://github.com/dag81/openhab-addons/blob/personal/bindings/metofficedatahubV4/bundles/org.openhab.binding.metofficedatahub/README.md’‘’ ) - 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!
Andrew

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.

The new build can be found here: This is built against 4.0.5 as the 4.1 branch builds against 4.1.2 but Im currently running 4.1.1 on my primary systems and test bed. This build is against the latest version, currently undering PR review, and has the support for the new API. Anyone upgrading will if using configuration files will now need a bridge configuration file like this:

Bridge metofficedatahub:bridge:metoffice [siteSpecificRateDailyLimit=350, siteSpecificApiKey=“”] {

}

@aaronwints please see above.