Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Dashboard, Now and Gauges does not work using ngrok

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
atcgt
Posts: 7
Joined: Tue 16 Mar 2021 4:37 am
Weather Station: Davis Vantage 2 Pro
Operating System: Raspberry

Dashboard, Now and Gauges does not work using ngrok

Post 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
User avatar
HansR
Posts: 5957
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Dashboard, Now and Gauges does not work using ngrok

Post by HansR »

Well, never heard of ngrok before but some reading got me up and running. Nice and interesting tool :D 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.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
freddie
Posts: 2473
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Dashboard, Now and Gauges does not work using ngrok

Post 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.
Freddie
Image
User avatar
ConligWX
Posts: 1618
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: Dashboard, Now and Gauges does not work using ngrok

Post by ConligWX »

are you using ngrok with anything else (other websites) and it is working?
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir • CumulusMX v4.0.0

Image
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Dashboard, Now and Gauges does not work using ngrok

Post 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?
freddie
Posts: 2473
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Dashboard, Now and Gauges does not work using ngrok

Post 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.
Freddie
Image
atcgt
Posts: 7
Joined: Tue 16 Mar 2021 4:37 am
Weather Station: Davis Vantage 2 Pro
Operating System: Raspberry

Re: Dashboard, Now and Gauges does not work using ngrok

Post 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
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Dashboard, Now and Gauges does not work using ngrok

Post by mcrossley »

Actually the web sockets use the same port as the HTTP (8998 by default), but obviously they use a different protocol.
atcgt
Posts: 7
Joined: Tue 16 Mar 2021 4:37 am
Weather Station: Davis Vantage 2 Pro
Operating System: Raspberry

Re: Dashboard, Now and Gauges does not work using ngrok

Post 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?
atcgt
Posts: 7
Joined: Tue 16 Mar 2021 4:37 am
Weather Station: Davis Vantage 2 Pro
Operating System: Raspberry

Re: Dashboard, Now and Gauges does not work using ngrok

Post 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 ?
freddie
Posts: 2473
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Dashboard, Now and Gauges does not work using ngrok

Post by freddie »

atcgt wrote: Fri 07 May 2021 1:42 pmHow do you publish your personal weather station?
See the relevant Wiki article.
Freddie
Image
atcgt
Posts: 7
Joined: Tue 16 Mar 2021 4:37 am
Weather Station: Davis Vantage 2 Pro
Operating System: Raspberry

Re: Dashboard, Now and Gauges does not work using ngrok

Post by atcgt »

Thanks @freddie I will be review the article.
atcgt
Posts: 7
Joined: Tue 16 Mar 2021 4:37 am
Weather Station: Davis Vantage 2 Pro
Operating System: Raspberry

Re: Dashboard, Now and Gauges does not work using ngrok

Post 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!!!
User avatar
HansR
Posts: 5957
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Dashboard, Now and Gauges does not work using ngrok

Post by HansR »

Nice, the sockets, just what I thought :)
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
atcgt
Posts: 7
Joined: Tue 16 Mar 2021 4:37 am
Weather Station: Davis Vantage 2 Pro
Operating System: Raspberry

Re: Dashboard, Now and Gauges does not work using ngrok

Post by atcgt »

Yeap! That was the key when I was researching, thank!
Post Reply