Page 1 of 1

VARIAS SESIONES ABIERTAS CUMULUS MX

Posted: Sat 03 Aug 2024 2:49 pm
by ajimemar
Al objeto de enviar los datos a distintos alojamientos web, no se si es posible tener varias sesiones abiertas cada una con un ftp distinto o hay otra manera de hacerlo. Gracias.

Re: VARIAS SESIONES ABIERTAS CUMULUS MX

Posted: Sat 03 Aug 2024 3:58 pm
by freddie
Translation: In order to send the data to different web hosts, I don't know if it is possible to have several sessions open, each one with a different FTP server, or if there is another way to do it. Thanks.

Re: VARIAS SESIONES ABIERTAS CUMULUS MX

Posted: Sun 04 Aug 2024 4:41 am
by flort
You could have multiple instances of Cumulus each with its own FTP settings, or something I use to do was a single instance of Cumulus with FTP details for one hosting company and then use LFTP to upload data to another host. LFTP was controlled by a Cron job with realtime data uploaded every 2 minutes, standard json files uploaded every 15 minutes and NOAA Reports/Dayfile uploaded once per day.

Script for LFTP standard json files looked something like this:

Code: Select all

lftp ftp://{hosting location & password} -e "mirror --reverse --only-newer /home/pi/CumulusMX/web/ /htdocs/weather; quit"
Script for LFTP realtime data (including websitedata.json):

Code: Select all

lftp ftp://{hosting location & password} -e "put -O /htdocs/weather /home/pi/CumulusMX/web/realtimegauges.txt; put -O /htdocs/weather /home/pi/CumulusMX/web/websitedata.json; put -O /htdocs/weather /home/pi/CumulusMX/web/realtime.txt; quit"
Script for LFTP reports:

Code: Select all

lftp ftp://{hosting location & password} -e "mirror --reverse --only-newer /home/pi/CumulusMX/Reports/ /htdocs/weather/NOAA-reports; put -O /htdocs/weather /home/pi/CumulusMX/data/dayfile.txt; quit"
Cron job

Code: Select all

	# m h  dom mon dow   command
	*/2 * * * * /home/pi/Scripts/ftpRealtime.sh
	1,16,31,46 * * * * /home/pi/Scripts/ftpWeb.sh
	15 0 * * * /home/pi/Scripts/ftpReports.sh
There may be a better way to achieve this but that's what worked for me.

Regards,
Trevor

Re: VARIAS SESIONES ABIERTAS CUMULUS MX

Posted: Sun 04 Aug 2024 9:31 am
by mcrossley
Thanks Trevor, I think that is what they were after.

Instead of cron you could also try the "External Programs" in Internet Settings?

Re: VARIAS SESIONES ABIERTAS CUMULUS MX

Posted: Sun 04 Aug 2024 5:29 pm
by ajimemar
Muchas gracias a todos pero ya he encontrado la solución, se crean las distintas instalaciones cada una en una carpeta distinta, se hacen un enlace directo al ejecutable pero a este se le añade -port 899X detras del cumulusMX.exe es decir CumulusMX.exe -port 899x y así se pueden tener varias sesiones abiertas con la misma estación y enviado vía ftp cada una a un servidor distinto.

Re: VARIAS SESIONES ABIERTAS CUMULUS MX

Posted: Sun 04 Aug 2024 6:10 pm
by freddie
Translation: Many thanks to everyone but I have already found the solution, the different installations are created each one in a different folder, a direct link is made to the executable but to this -port 899X is added after the cumulusMX.exe i.e. CumulusMX.exe -port 899x and thus you can have several sessions open with the same station and each one sent via ftp to a different server.