Blue Iris Tools - Weather Overlay, Watchdog & more!

Blue Iris Tools - Weather Overlay, Watchdog & more! 1.6.0

May 15, 2018
Reaction score
Ok, I've included my procedure for adding weather overlay on to my BI Camera's.. The procedure once setup is pretty simple but if you haven't done this before, I hope my procedures help you.

How to insert Weather Data into BI Camera overlays

I use the “ ” double quotes within this procedure to denote what to expected and the quotes should not be added to the text enclosed, however there is an exception and that's associated with the PowerShell Script file, it uses double quotes within the code, so instead I used "* " (star) character delimiter to denoted items between * xyz * star character that needs to be changed to reflect your circumstances, once you've update the file ensure that you've remove all of the (star) character(s).

Setting up the Necessary Directories
  1. You need to create a two directories' one for your “My BI Overlay.Bat” and “Pulling the weather data script for BI.ps1” PowerShell script files and the second for your updating weather Info text file.
  2. Open file explorer and navigate to This PC > C: (your C: drive).
  3. Using your mouse right click on the explore screen to get "New" option > Folder, Rename the new folder to "BI"
  4. Double click the "BI" directory, you should have a empty folder
  5. Using your mouse right click on the explore screen to get "New" option > Folder, Rename the new folder to "TXT" (this is where your updated weather text file will be stored).
  6. Place both “My BI Overlay.Bat” and “Pulling the weather data script for BI.ps1” files within the C:\BI directory.
  7. Make the necessary changes within the “Pulling the weather data script for BI.ps1” file, look for the * (star) characters this is where you will have to change the contents between * * (star) characters with your particulars and make sure to delete the * (star) characters as they are only visual delimiters for you.

Run PowerShell
From the Windows Start Menu

  1. Click Start, type PowerShell, and then click Windows PowerShell,
  2. You should now have a "Windows PowerShell" Window open with the cursor waiting for input.
  3. Manual Go/NO-GO testing: enter the following text below, followed depressing "Enter" or Return key.
& 'C:\BI\Pulling the weather data script for BI.ps1'
  1. You should get the following message displayed "The operation completed successfully." along with scrolling weather-related information if so then you're working!! proceed to Run Task Scheduler, otherwise...
  2. I have an Error Message (you can scroll up/down) displayed, try to determine if it's 1) "Unable to run PowerShell scripts or 2) Can't find "Condition" command that is used within the Scrapper code for Weather Condition.
  3. If you have determined that its Error 1) then proceed to PowerShell Error type I resolution.
  4. If you have determined that its Error 2) then proceed to PowerShell Error type II Resolution.

PowerShell Error type I

Note: If this is your first-time running PowerShell you will most likely not be able to run Scripts (you will get an error message letting you know) as Windows is turned off by default, to fix this you must do the following (one-time event);
  1. First, Open PowerShell with Run as Administrator
  2. Then, run this command (below) within the command line and depress enter:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
  • After that Type “Y” and Press Enter
  • You will now be able to run PowerShell scripts.
  • Proceed to "Run Task Scheduler" process.
PowerShell Error type II

Download a new copy of PowerShell and "Bob's your Uncle!" it worked as advertised.. the many mysteries of Windows.....

To install or update the PowerShell app using Microsoft Store, use the following steps:
  1. Open the Microsoft Store app (icon) on your PC.
  2. Use the search bar at the top to locate the PowerShell app on the store.
  3. Click the Update / Get button to update / Get the PowerShell app.
  4. Proceed to "Run Task Scheduler" process.

Run Task Scheduler
From the Windows Start Menu

Click Start, type Task Scheduler, and then click Task Scheduler.

You should now have a Task Scheduler Panel. On the right side in the action panel select “Create Task” you should now have a Create a Task dialog screen
  • Enter “BI Weather Overlay” in the Name: field,
  • Select “Next”, you will now have “Task Trigger” select “New”
  • You should now have “New Trigger” screen, make sure that “Daily” is selected.
  • Select “Repeat task every:” and change the drop down to “15 minutes”
  • Select “for a duration of:” and change the drop down to “Indefinitely”
  • Select “OK”, you should have a newly created Trigger.
  • Select Actions Tab followed by “New” you should have a New Action with Action: set to “Start a program” selected if not change to reflect it.
  • In the Program/Script: field enter “C:\BI\My BI Overlay.bat”
  • You now have a working Task Scheduler that will execute your bat file every 15 minutes which will run your PowerShell script to create a new Weather.txt file output to be used in Blue Iris Overlays

Blue Iris Overlay Process
  1. In the Blue Iris app, goto Blue Iris Settings > Macros where you will see Macro %1 thru %9, change the first one “%1": and add "file:/C:\BI\Txt\Weather.txt" (not the " " characters)
  2. Goto the camera that you want to insert the overlay by right clicking the camera in question and selecting “Camera settings… > Video",
  3. Ensure that “Display overlays live” is selected,
  4. Goto “Edit overlays” select “Add text/time” at the top of Text overlay input field enter “%1”, you can change alignment to Left and set the Font Color to Yellow or whatever, depress enter.
  5. You can now move the "Weather overlay" to your desired placement by dragging with mouse and stretching to enlarge or reduce text size.

File content (Details), I've also attached the two files in question within a zipped file.

My BI Overlay.Bat” contains the following command (it runs PowerShell with the appropriate Script);

@echo off
PowerShell -command "& 'C:\BI\Pulling the weather data script for BI.ps1'"
Pulling the weather data script for BI.ps1” contains the following commands: (Note: you will have to change the contents between * * characters with your particulars and make sure to delete the * as they are only visual delimiter for you)

# /Pulling the weather data from two sources: Weather Underground, and, a string is formed with the requested data points.
# /wunderground is being html scraped for the condition shown on the site.
# / runs the API for Wunderground. It is pulling the time, temp, and wind conditions from the at-home wx station.
# /Create a registry value that should accept the silly cookie warning from it gets deleted at the end of the script
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /t REG_DWORD /v 1A10 /f /d 0
$UrlWUCond = "*Your State Abv*/*Your City*/*Your PW Station ID*"
$searchClass = "condition-icon small-6 medium-12 columns"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 <# using TLS 1.2 is vitally important #>
$req = Invoke-Webrequest -URI $UrlWUCond
$Condition = $req.ParsedHtml.getElementsByClassName($searchClass)[0].innertext;
$UrlWU = "*Your PW Station ID*&format=json&units=e&apiKey=*Your WU API Key*"
$CurrentWeather = Invoke-RestMethod "$UrlWU"
$CurrentWeather | ConvertTo-Json -depth 100
# (i.e., wind out of the East will show an arrow pointing West, and the Cardinal direction):
if ($CurrentWeather.observations.winddir -gt 22.5 -and $CurrentWeather.observations.winddir -lt 67.5) {$arrow = $([char]0x2199)}
elseif ($CurrentWeather.observations.winddir -gt 67.5 -and $CurrentWeather.observations.winddir -lt 112.5) {$arrow = $([char]0x2190)}
elseif ($CurrentWeather.observations.winddir -gt 112.5 -and $CurrentWeather.observations.winddir -lt 157.5) {$arrow = $([char]0x2196)}
elseif ($CurrentWeather.observations.winddir -gt 157.5 -and $CurrentWeather.observations.winddir -lt 202.5) {$arrow = $([char]0x2191)}
elseif ($CurrentWeather.observations.winddir -gt 202.5 -and $CurrentWeather.observations.winddir -lt 247.5) {$arrow = $([char]0x2197)}
elseif ($CurrentWeather.observations.winddir -gt 247.5 -and $CurrentWeather.observations.winddir -lt 292.5) {$arrow = $([char]0x2192)}
elseif ($CurrentWeather.observations.winddir -gt 292.5 -and $CurrentWeather.observations.winddir -lt 337.5) {$arrow = $([char]0x2198)}
else {$arrow = $([char]0x2193)}
if ($CurrentWeather.observations.winddir -gt 11.25 -and $CurrentWeather.observations.winddir -lt 33.75) {$CardinalDir = "NNE"}
elseif ($CurrentWeather.observations.winddir -gt 33.75 -and $CurrentWeather.observations.winddir -lt 56.25) {$CardinalDir = "NE"}
elseif ($CurrentWeather.observations.winddir -gt 56.25 -and $CurrentWeather.observations.winddir -lt 78.75) {$CardinalDir = "ENE"}
elseif ($CurrentWeather.observations.winddir -gt 78.75 -and $CurrentWeather.observations.winddir -lt 101.25) {$CardinalDir = "E"}
elseif ($CurrentWeather.observations.winddir -gt 101.25 -and $CurrentWeather.observations.winddir -lt 123.75) {$CardinalDir = "ESE"}
elseif ($CurrentWeather.observations.winddir -gt 123.75 -and $CurrentWeather.observations.winddir -lt 146.25) {$CardinalDir = "SE"}
elseif ($CurrentWeather.observations.winddir -gt 146.25 -and $CurrentWeather.observations.winddir -lt 168.75) {$CardinalDir = "SSE"}
elseif ($CurrentWeather.observations.winddir -gt 168.75 -and $CurrentWeather.observations.winddir -lt 191.25) {$CardinalDir = "S"}
elseif ($CurrentWeather.observations.winddir -gt 191.25 -and $CurrentWeather.observations.winddir -lt 213.75) {$CardinalDir = "SSW"}
elseif ($CurrentWeather.observations.winddir -gt 213.75 -and $CurrentWeather.observations.winddir -lt 236.25) {$CardinalDir = "SW"}
elseif ($CurrentWeather.observations.winddir -gt 236.25 -and $CurrentWeather.observations.winddir -lt 258.75) {$CardinalDir = "WSW"}
elseif ($CurrentWeather.observations.winddir -gt 258.75 -and $CurrentWeather.observations.winddir -lt 281.25) {$CardinalDir = "W"}
elseif ($CurrentWeather.observations.winddir -gt 281.25 -and $CurrentWeather.observations.winddir -lt 303.75) {$CardinalDir = "WNW"}
elseif ($CurrentWeather.observations.winddir -gt 303.75 -and $CurrentWeather.observations.winddir -lt 326.25) {$CardinalDir = "NW"}
elseif ($CurrentWeather.observations.winddir -gt 326.25 -and $CurrentWeather.observations.winddir -lt 348.75) {$CardinalDir = "NNW"}
else {$CardinalDir = "N"}
$Time = get-date -format "MM/dd HH:mm:ss"
# checks rainfall. Rain accumulation less than .05" is ignored. Finally, the string is combined to form the weather.txt file output.
if ($CurrentWeather.observations.imperial.precipTotal -ge 0.05) {$json = Write-Output "PWS:$($CurrentWeather.observations.stationID) `nCond:$($Condition) `nTemp: $($CurrentWeather.observations.imperial.temp)°F `nWind Chill: $($CurrentWeather.observations.imperial.windChill)°F `nHumidity: $($CurrentWeather.observations.humidity)% `nWind Speed: $($arrow)$($CurrentWeather.observations.imperial.windSpeed) mph $($CardinalDir) `nRainfall: $($CurrentWeather.observations.imperial.precipTotal)"" `nPressure: $($CurrentWeather.observations.imperial.pressure)"" `nUltraviolet (UV): $($CurrentWeather.observations.uv) `nLast Updated: $($Time)"}
else {$json = Write-Output "PWS:$($CurrentWeather.observations.stationID) `nCond:$($Condition) `nTemp: $($CurrentWeather.observations.imperial.temp)°F `nWind Chill: $($CurrentWeather.observations.imperial.windChill)°F `nHumidity: $($CurrentWeather.observations.humidity)% `nWind Speed: $($arrow)$($CurrentWeather.observations.imperial.windSpeed) mph $($CardinalDir) `nRainfall: $($CurrentWeather.observations.imperial.precipTotal)"" `nPressure: $($CurrentWeather.observations.imperial.pressure)"" `nUltraviolet (UV): $($CurrentWeather.observations.uv) `nLast Updated: $($Time)"}
$json | Out-File -FilePath "C:\BI\TXT\weather.txt" -Encoding UTF8
clv -Name Condition
# Delete the registry value
reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v 1A10 /f


Last edited:


Young grasshopper
Jun 21, 2018
Reaction score
Impressive & appreciated that you share your work. My quandary is that my WU broke so long ago I have just gotten use to it no longer around. If this script was around when it first broke, I would have been all over this.


Young grasshopper
Oct 9, 2022
Reaction score
Blue iris tools problem with new blueiris server update
I have learned to steer clear of the updates. sometimes things break when otherwise was working fine. you can downgrade to an earlier version. the only reason to update would be if something isn't working properly.

always test out the updates on a separate PC, when running network IP cameras, you can connect to them all making a duplicate system for testing purposes.