Page 1 of 1
Dashboard, Now and Gauges does not work using ngrok
Posted: Thu 06 May 2021 5:25 am
by atcgt
Cumulus DX Dist 3117 / Raspberry PI
I am having the problem that the Dashboard, Now and Gauges tabs does not work using ngrok in order to make public over internet. It works fine through localhost or IP address.
Any idea will be appreciated.
Best Regards
Douglas
Re: Dashboard, Now and Gauges does not work using ngrok
Posted: Thu 06 May 2021 11:11 am
by HansR
Well, never heard of ngrok before but some reading got me up and running. Nice and interesting tool

Some dangers as well
Could it be that CumulusMX is not really a webserver?
It handles dedicated ports on dedicated sockets. But that's about it.
Maybe you should talk to @mcrossley to get detailed info but it would not surprise me if it stopped at some basic handshaking in the HTTP protocol.
Re: Dashboard, Now and Gauges does not work using ngrok
Posted: Thu 06 May 2021 12:50 pm
by freddie
AFAIK MX is a web server. I proxy calls from my Apache web server to it and it handles the HTTP requests okay.
Re: Dashboard, Now and Gauges does not work using ngrok
Posted: Thu 06 May 2021 1:59 pm
by ConligWX
are you using ngrok with anything else (other websites) and it is working?
Re: Dashboard, Now and Gauges does not work using ngrok
Posted: Thu 06 May 2021 2:32 pm
by mcrossley
Dashboard, Now and Gauges all use a web sockets connection to CMX - I know nothing about ngrok, but is it handling the web sockets ports as well?
Re: Dashboard, Now and Gauges does not work using ngrok
Posted: Thu 06 May 2021 2:38 pm
by freddie
Ngrok is used to expose resources to the internet. I personally wouldn't do this, as anybody would be able to access your settings page including passwords.
Re: Dashboard, Now and Gauges does not work using ngrok
Posted: Fri 07 May 2021 12:52 pm
by atcgt
Hi and thanks to all of you.
@HansR, I suspect due to internal behavior some mechanism does not work, even more when you mentioned that is not a web server.
@freddie could you please help me in how you can attach to Apache? Maybe If a use ngrok with Apache the problem could be solved.
@ConligWX, Yes, it works very well with other sites.
@freddie It is supposed that you can use ngrok securely, several big companies like atlassian, Twilio and others propose the use to solve calls through web hooks and other type of integrations. They have plans so you can have your own domain to publish if you do not want to use the free tier.
@mcrossley, I am not sure, where I can found more detailed info about web sockets connections used to connect to CMX?
Thanks and Best Regards
Douglas
Re: Dashboard, Now and Gauges does not work using ngrok
Posted: Fri 07 May 2021 1:07 pm
by mcrossley
Actually the web sockets use the same port as the HTTP (8998 by default), but obviously they use a different protocol.
Re: Dashboard, Now and Gauges does not work using ngrok
Posted: Fri 07 May 2021 1:25 pm
by atcgt
How works that part, as I understand searching in other topics the dashboard, now and gauges read directly the *.txt files updated, others topics found changed the configuration through settings -> Extra web files and link as I understand the logical name with the physical txt file. I tried to change but it leave working well, so I made a rollback this configuration.
How the .txt files are read, is made through these web socket connection?
Re: Dashboard, Now and Gauges does not work using ngrok
Posted: Fri 07 May 2021 1:42 pm
by atcgt
@mcrossley How do you publish your personal weather station?
https://weather.wilmslowastro.com/
In summary that is I want to do, publish to internet... I see that there is an option to feed data to other weather sites in settings -> internet settings, so taking advantage of this discussion, is there any way to feed directly to Davis Weather Link ?
Re: Dashboard, Now and Gauges does not work using ngrok
Posted: Fri 07 May 2021 1:50 pm
by freddie
atcgt wrote: ↑Fri 07 May 2021 1:42 pmHow do you publish your personal weather station?
See the relevant
Wiki article.
Re: Dashboard, Now and Gauges does not work using ngrok
Posted: Fri 07 May 2021 2:11 pm
by atcgt
Thanks @freddie I will be review the article.
Re: Dashboard, Now and Gauges does not work using ngrok
Posted: Wed 02 Jun 2021 5:51 am
by atcgt
Regarding this issue... After researching a lot, found a setting in .js files to change from web socket to ajax, just change it and the three tabs works fine!!!
Re: Dashboard, Now and Gauges does not work using ngrok
Posted: Wed 02 Jun 2021 6:47 am
by HansR
Nice, the sockets, just what I thought

Re: Dashboard, Now and Gauges does not work using ngrok
Posted: Wed 02 Jun 2021 6:58 am
by atcgt
Yeap! That was the key when I was researching, thank!