Trying to get the MetOffice DataHub binding to work, but having issues with the api key auth.
openHABian 4.3.5 running on a RPi 4
I’ve created an account with MetOffice DataHub and obtained a site specific api key.
However when the key is entered into the MetOffice DataHub binding, it fails with an auth error.
CONFIGURATION_ERROR
Check siteSpecificApiKey is correct in account - authentication failure
I’ve confirmed they key works using a call through both Postman and Metoffice’s own api explorer, so it is not the key that is at fault.
Anyone know what might be causing it?
Jim
AndrewFG
(Andrew Fiddian-Green)
2
Just a wild guess, but maybe using odd (accented) characters in credentials??
Thanks for the suggestion, but it’s not the case.
It’s a vanilla string of letters numbers , - _ and =
As I say, it works in Postman and their own API explorer, so it’s something wrong in the setup of the binding.
To help anyone diagnosing the problem, this is the config. It’s pretty simple which is why I’m head-scratching.
Further investigation…
curl works from the command line on the RPi, so it’s not being blocked.
Tried creating the thing in script (rather than the UI), same result.
Trace log doesn’t provide any clues.
Anyone able to help? I’m stuck!!!
2025-07-01 21:54:43.193 [TRACE] [edatahub.internal.api.RequestLimiter] - Limiter metofficedatahub:account:metoffice -> Restored Request Limiter count of 5 for day of year 182
2025-07-01 21:54:43.204 [TRACE] [edatahub.internal.api.RequestLimiter] - Limiter metofficedatahub:account:metoffice -> Updated limiter to new total limit 250
2025-07-01 21:54:43.206 [TRACE] [etofficedatahub.internal.api.SiteApi] - Requesting using Poll ID "validateSiteApiCheck" URL: "https://data.hub.api.metoffice.gov.uk/sitespecific/v0/point/daily?latitude=51.5072&longitude=0.1276"
2025-07-01 21:54:43.725 [TRACE] [etofficedatahub.internal.PollManager] - Daily data poll not required
2025-07-01 21:54:43.726 [TRACE] [etofficedatahub.internal.PollManager] - Hourly data poll not required
==> /var/log/openhab/events.log <==
2025-07-01 21:54:43.198 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'metofficedatahub:account:metoffice' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2025-07-01 21:54:43.204 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'metofficedatahub:account:metoffice' changed from INITIALIZING to UNKNOWN
2025-07-01 21:54:43.207 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'metofficedatahub:account:metoffice' changed from UNKNOWN to OFFLINE (CONFIGURATION_ERROR): Check siteSpecificApiKey is correct in account - authentication failure
2025-07-01 21:54:43.721 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'metofficedatahub:site:metoffice:markfieldForecast' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2025-07-01 21:54:43.727 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'metofficedatahub:site:metoffice:markfieldForecast' changed from INITIALIZING to UNKNOWN
Jim