Wow! They made this WAY more complicated than when I wrote the driver originally. My current ID and Secret still pull in data (I have a location near Uxbridge I base it on).
I am using the "Site specific forecast" section (metoffice.apiconnect.ibmcloud.com/metoffice/production) where you select the Configure Spot API, then register an application. In my case I made an application for WSM4Hubitat.
Trying to figure out the whole other section for the "Atmospheric data service" but there are WAY more options in there than someone really needs.
After much messing around I think I managed to figure out where I was going wrong and I fully agree this seems way more complex than it needs to be even although the mistake was my end.
When you are creating the order and it comes to select location I was selecting UK and Ireland, I didnt realise you could zoom in on the map and make the area smaller, I have done this and it has reduced the data usage significantly, it has allowed me to add every option and the subscription is now showing active.
however upon checking the app it seems I still get no data in the WSM5Hubitat app.
When I check the log files it is showing an invalid APi key dev:20312021-02-02 00:30:57.046 traceUK Weather (Met Office) - Invalid API credentials provided
Maybe it just needs to settle overnight, at least that's what I am telling myself now, will keep digging tomorrow after work appreciate the help so far and the fact you create an app for this, thanks!
Good to hear! If you do not mind (since it is fresh for you) can you jot down the steps you did to get it working? I can add those into the driver so the next user has an easier time of it.
IMPORTANT STEP's After registering it will take you to the screen where you get your client and secret ID's (press show to get your ID and save it for the WSM app)
Note above the box can only be made a certain size, if I make it smaller you cannot continue and it shows red highlights round the size and location boxes
At this point I got an error saying I had no subscriptions, I then went back to the main page and selected API usage plans, I again choose the free plan capped to 60GB data
you can probably complete above step with subscribing to to the Atmospheric api earlier in the process so you dont get the error on creating the order!
At this point I put the Client\Secret ID into the WSM device I created from the driver and it started polling the information.
There may be a quicker\better way to do above but it took me a couple of hours to figure it all out with your help so the least I can do is share and it hopefully save someone else the extra pain that I went through trying to figure it out.
As you can see its not just a few steps and felt adding screenshots would really help the next person out.
WOW! I will have to figure out a decent way to put this into steps for people if I want it in the driver, but at the very least it is nice and fresh in the thread here! Thanks for taking the time to document it all AND for the screenshots.
Ha! Well, there are some Snells out there and (in my case) it does come from ancestors from the UK.
Glad the Met Office comes in handy. I went around trying to find various weather APIs because people outside the US seemed to have more trouble getting weather integrated with their Hubitat. Unfortunately I did not find that many but what I did, I tried to put in here.
Is it at all possible to pull the indoor information off the displays or is this not broadcast by the station? I don't need the indoor temp sensor but could always use another humidity sensor to average with the Ecobee.
When does "today" start? I know on others i can choose when today starts but i prefer this driver. Like i would like to be able to set today starting at sunrise...
From how I have been handling it, it generally starts at midnight, because that is when the APIs return their data for. I am only looking at the "whole day" values returned by the APIs, not breaking it out by hour or performing any calculations on them in the driver (besides Imperial/Metric conversions type of stuff).
If you do not mind my asking, which weather service are you using? I can try to take a look if they have any form of configurable request (so that I can tell it to return data based on a particular timeframe). Cannot guarantee anything... but I can at least look.
I will have to look into the data they provide back and check then. The fact it is such an arbitrary time... I will have to see if they just calculate it based on when the data request happens.
This one will likely be a bit slower to deal with, I will probably have to do it on the weekend, but I will still try to take a look before that...
Added ValidTime attributes to indicate when the API said the weather was valid as of (only applicable to WeatherUnderground at this time). Unfortunately WU does not appear to be able to have their forecast requested based on a particular time and it just returns the 5 day forecast as is. It DOES have a "valid as of" type of time included with that data for each day. So I have added attributes for Today_ValidTime and Tomorrow_ValidTime to display the time that WU returned for each of those days.
Added a 5 minute refresh option
Changed logging at data retrieval to be info level, so it will put an "info" log item each time data was successfully retrieved from any of the current weather services.
Thanks for the update. I built rules around the day starting at 4am. It appears 4am is the start of the day. So it works out quite nicely. Knowing the time helps.
" 2021-04-30T07:00:00-0400" 7-4? 3am? Now I wonder is the day 3am. I bet it's possible cause I have my light checking it on the hour. Hmmmm. Basically they consider the day to begin at 7am GMT. So it's not exactly arbitrary other than it being 7am...
Actually... I was wondering if it was 7am and the -0400 was the timezone for me (since right now I am -0400 from GMT). So I was thinking it was 7am local time, showing the timezone as well.
If you are in a different timezone than EST... then it could mean something different.