Page 1 of 1

Updating NGROK wan URL

Posted: Fri Sep 11, 2020 9:09 am
by jbutterfill
I have Blue Iris up and running sucessfully. As I have a 4G connection so the site standard DDNS and IPs do not work so I have used the IP tunnelling service NGROK. This works great too. I do have a couple of issues though.

Firstly the NGROK URL changes everytime I restart the machine so I have a written a script that gets the new WAN URL from NGROK and copies it to a text file and clipboard. At the moment I have to manually open the Blue Iris settings, select the Webserver tab and paste the NGROK URL into the Remote, external (WAN/Intern) access box. Is there a config file with Blue Iris where I can use a script to automatically update this field? - Its a pain having to do it manually all the time.

Secondly, this is related to the first. When I use the IOS app, it has a "Lookup key" option with the ability to update the WAN (NGROK) URL automatically, presumably taken from the WAN box mentioned above. The app always appends a :81 port onto the end of the URL, trying to explain to my wife to remove this every time she uses the app is not easy - and to be honest its not particularity user friendly.

If anyone knows how to fix these minor issues I've love to know. thanks.

Re: Updating NGROK wan URL

Posted: Sat Sep 12, 2020 9:05 am
by TimG
Did the write up that Thixotropic did about NGROK help at all ?

Re: Updating NGROK wan URL

Posted: Sun Sep 13, 2020 9:35 am
by jbutterfill
Read all that and got it all working. It’s just taking it to the next step and getting the ngrok url auto updating the blue iris software.

I’ve done all the hard steps in using curl to extract the ngrok url to clipboard/text file, so just need this final step..

Re: Updating NGROK wan URL

Posted: Sun Sep 27, 2020 10:32 pm
by tinker3433
I am really interested to see if you can get this to work.
I had no luck with getting the VPN stuff to work, and there are computers I will need to have access from that I will not be able to set up and vpn stuff even if I did get it working. not to mention trying to get the wife to mess with another step if she needs to see BI from her phone.
I know NGROK is not the perfect solution but it is at least better than port forwarding.
Getting the Ngrok ip to autoupdate in BI would make it workable for the phone situation at least.

Re: Updating NGROK wan URL

Posted: Tue Sep 29, 2020 9:49 pm
by Thixotropic
I never manually updated anything in BI, the NGROK client should grab a new URL automatically when it starts. Then I would just go to the ngrok URL to login to BI.

I started writing an AutoIt script to grab the new ngrok URL out of the ngrok dashboard, but then a bunch of stuff happened and I never finished it. The script was going to post the URL to a public location or text it to me on startup so I always find it remotely without going to the dashboard in the ngrok site.

Re: Updating NGROK wan URL

Posted: Wed Oct 14, 2020 8:53 am
by jbutterfill
I have written this script in a cmd file - it runs ngrok and then extracts the url and copies it into a text file

-----------------
start c:\ngrok\ngrok.exe http 192.168.1.32:81
timeout 30
cd c:\ngrok
curl -s localhost:4040/api/tunnels | jq -r .tunnels[0].public_url > C:\ngrok\NgrokURL.txt
-----------------

this runs in my task scheduler and leaves the new url in the text file each time the computer starts

I just need to figure out a way of getting it into Blue Iris automatically, I was hoping there was a config file I could edit but not found one.. so 95% there!

Re: Updating NGROK wan URL

Posted: Thu Oct 15, 2020 4:12 pm
by Thixotropic
jbutterfill wrote: Wed Oct 14, 2020 8:53 amI just need to figure out a way of getting it into Blue Iris automatically, I was hoping there was a config file I could edit but not found one.. so 95% there!
I wonder if this setting is in the Windows registry; if so it would probably be fairly straightforward to write the new value to it.

Re: Updating NGROK wan URL

Posted: Tue Nov 24, 2020 6:49 pm
by montman2k
It is indeed in the registry with one caveat,

if the automatic key lookup is set in the app, it will not connect, if you do manual key lookup it works . What I found is if you go in and delete and re add a character in the wan section in the blue iris ui, then it works on auto...so it may be worth a support email to have them do whatever function that is called when I click ok and it updates to happen at service start.

I made a powershell that pulls and modifies the reg key. This has to be done before blue iris starts or if it is running, the console needs to be opened or service restarted so that it pulls it into blue iris and it propagates on a manual key lookup in the app.