Blue iris with ngrok

brad2388

Getting the hang of it
Joined
Oct 5, 2016
Messages
164
Reaction score
24
Im running ngrok on my blue iris machine because im behind att lte.

What id like to do is have blueiris pickup the ngrok link instead of the external ip. So that when the ngrok refreshes or gets a new link i dont have to manually update blueiris.

Is there a way to do that?


Sent from my iPhone using Tapatalk
 

fenderman

Staff member
Joined
Mar 9, 2014
Messages
36,902
Reaction score
21,274
Im running ngrok on my blue iris machine because im behind att lte.

What id like to do is have blueiris pickup the ngrok link instead of the external ip. So that when the ngrok refreshes or gets a new link i dont have to manually update blueiris.

Is there a way to do that?


Sent from my iPhone using Tapatalk
BI would have no way of knowing....you will have to pay the monthly ngrok fee or try to get hamachi working.
 
Joined
Jan 23, 2016
Messages
8
Reaction score
1
Im running ngrok on my blue iris machine because im behind att lte.

What id like to do is have blueiris pickup the ngrok link instead of the external ip. So that when the ngrok refreshes or gets a new link i dont have to manually update blueiris.

Is there a way to do that?


Sent from my iPhone using Tapatalk

Sorry to bring back an old thread but I was able to accomplish this using a powershell script, i am more than happy to make a tutorial for all interested.
 

Old Timer

Known around here
Joined
Jul 20, 2018
Messages
1,352
Reaction score
2,945
Location
I'm ok
Would be interesting to see how you did it.
I figured a way to take a screen shot and emailing it every day.
 
Joined
Jan 23, 2016
Messages
8
Reaction score
1
So the board wont work right now for a new topic, I assume because of my post count but here is the script in powershell:



just modify the filepaths to match as well as args

You need to download jq from stedolan.github.io/jq

As for startup:

Task manager :
Command Powershell.exe
Arguments: -ExecutionPolicy Bypass -command "c:\ngrok\ngrokfree.ps1" obviously change patch and script name to match

Run as: Admin rights

Also in Blue Iris turn off the auto renew ip where the wan settings are.

Another option if you don't want the service to restart is call the console open and closed in powershell so it refreshes.

#Set Your Ngrok Parameters Here#
$filepath = 'c:\ngrok\ngrok.exe'
$args = 'http 127.0.0.1:9880'

Start-Process $filepath $args

timeout 10
#jqwin-64 path needs to match#
cmd /c curl -s localhost:4040/api/tunnels | c:\ngrok\jq-win64 -r .tunnels[0].public_url > C:\ngrok\NgrokURL.txt ##Adjust path as needed##
timeout 5
$filecontent = [IO.File]::ReadAllText("c:\ngrok\NgrokURL.txt")
$regkey = "HKLM:\Software\Perspective Software\Blue Iris\server" #This is correct for version 5#
$regprop = "ip"
$NewString = $filecontent -replace ".*/"
$NewString = $NewString.Trim()
if(Test-Path ($registryPath + "\" + $regprop))
{
New-ItemProperty -Path $regkey -Name $regprop -Value $NewString
}
else
{
Set-ItemProperty -Path $regkey -Name $regprop -Value $Newstring
}
Restart-Service -Name BlueIris #Optional if this process runs before blue iris
 

Attachments

ibrujo

n3wb
Joined
May 22, 2019
Messages
8
Reaction score
3
Location
usa
Hi:
I just saw your post
Is ngrok working? I am with AT&T fiber.
I had everything working with ngrock and since 3 weeks ago I my ios app doesn't load, it just keeps trying to open, no error message.
I am not to use my public IP to login either.
Thank you
Mario
 
Top