Updating NGROK wan URL

Post Reply
jbutterfill
Posts: 4
Joined: Fri Sep 11, 2020 8:56 am

Updating NGROK wan URL

Post by jbutterfill » Fri Sep 11, 2020 9:09 am

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.
User avatar
TimG
Posts: 725
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: Updating NGROK wan URL

Post by TimG » Sat Sep 12, 2020 9:05 am

Did the write up that Thixotropic did about NGROK help at all ?
Blue Iris v5.3.3.16 | Win10 x64 version 20H2 | Dahua IPC-HDW5231R-ZE, Foscam R2, Ertech 4MP, Neos2, 2 analogue cameras on Euresys Picolo Pro 2 | Intel i5-3330 CPU, 16GB Ram, Multiple SSD and HD | TVMosaic.
jbutterfill
Posts: 4
Joined: Fri Sep 11, 2020 8:56 am

Re: Updating NGROK wan URL

Post by jbutterfill » Sun Sep 13, 2020 9:35 am

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..
tinker3433
Posts: 1
Joined: Sun Sep 27, 2020 10:14 pm

Re: Updating NGROK wan URL

Post by tinker3433 » Sun Sep 27, 2020 10:32 pm

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.
User avatar
Thixotropic
Posts: 533
Joined: Wed Sep 04, 2019 7:20 pm

Re: Updating NGROK wan URL

Post by Thixotropic » Tue Sep 29, 2020 9:49 pm

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.
Blue Iris 5.x x64 | Windows 10 Pro x64 | 16GB RAM | i7-7700 3.6 GHz | 1TB HDD | 2TB RAID NAS | 9 Cameras | Almost Dual NIC | 2KVA UPS
jbutterfill
Posts: 4
Joined: Fri Sep 11, 2020 8:56 am

Re: Updating NGROK wan URL

Post by jbutterfill » Wed Oct 14, 2020 8:53 am

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!
User avatar
Thixotropic
Posts: 533
Joined: Wed Sep 04, 2019 7:20 pm

Re: Updating NGROK wan URL

Post by Thixotropic » Thu Oct 15, 2020 4:12 pm

jbutterfill wrote:
Wed Oct 14, 2020 8:53 am
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!
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.
Blue Iris 5.x x64 | Windows 10 Pro x64 | 16GB RAM | i7-7700 3.6 GHz | 1TB HDD | 2TB RAID NAS | 9 Cameras | Almost Dual NIC | 2KVA UPS
Post Reply