API connection down

thewolf56

Getting the hang of it
Joined
Mar 31, 2017
Messages
101
Reaction score
60
Location
AZ
Inspired by @Chris Moore, I've created a script that illustrates how you can extract additional weather variables from the Open-Meteo API, like...
  • condition description,
  • hourly precipitation,
  • relative humidity,
  • dew point,
  • cloud cover
  • sunrise, sunset
  • daily precipitation.
See Weather Forecast API | Open-Meteo.com for more variables you can extract.

To customize the script (see the attached *.zip file) for your location, simply edit the variables in the USER SETTINGS section.

Tip: If you install Windows Terminal (link), this will make the URLs in the output clickable (ctrl-click).
Thank you very much for this @jaydeel and @Chris Moore . My weather has not updated through BI Tools since 04/11/2022 (last modified date in my txt folder) and I had taken off the video overlay a while back because of the outdated information. While I was able to get this script working pretty easily for my location thanks to the well-defined variables, setting up the script to run every 15 minutes was a different challenge (task scheduler would manually run, but would not re-run at the defined intervals), but I finally figured that out today.
 

thewolf56

Getting the hang of it
Joined
Mar 31, 2017
Messages
101
Reaction score
60
Location
AZ
Please share your solution.
It might help someone else.
Will do. I also modified your script to add the current UV Index as well and I might add the daily max UV Index, but I'm already out of macro slots in BI.
 

TonyR

IPCT Contributor
Joined
Jul 15, 2014
Messages
16,777
Reaction score
39,041
Location
Alabama
Will do. I also modified your script to add the current UV Index as well and I might add the daily max UV Index, but I'm already out of macro slots in BI.
According to @jaydeel..."You can only edit 9 macros (1-9) using the Blue Iris app. You can add macros up to 999 by directly editing the registry." ==>> here.
 

djangel

Pulling my weight
Joined
Aug 30, 2014
Messages
336
Reaction score
149
Inspired by @Chris Moore, I've created a script that illustrates how you can extract additional weather variables from the Open-Meteo API, like...
  • condition description,
  • hourly precipitation,
  • relative humidity,
  • dew point,
  • cloud cover
  • sunrise, sunset
  • daily precipitation.
See Weather Forecast API | Open-Meteo.com for more variables you can extract.

To customize the script (see the attached *.zip file) for your location, simply edit the variables in the USER SETTINGS section.

EDIT (2023-03-27): Updated script to V2 (Updated $conditions variable).

Tip: If you install Windows Terminal (link), this will make the URLs in the output clickable (ctrl-click).

View attachment 154613
Thanks for the script!

For anyone getting the following error when running the script:
Invoke-RestMethod : The request was aborted: Could not create SSL/TLS secure channel.

The problem is that by default PowerShell uses TLS 1.0 and the site security requires TLS 1.2

Add this to the script before the $webData variable:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
 
Top