Page 1 of 1
Numerical Expressions. **solved**
Posted: Tue Feb 20, 2024 3:47 pm
by Empire24
Hello,
I want to upload the exported data for Wswin via FTP.
If I use: /export/EXP[MM]_[YY].csv
Then the following file arrives on the web space: EXP02_24.csv
However, this actually represents the previous month, January. So the file should be named EXP01_24.csv.
Unfortunately, it seems that a corresponding template like: /export/EXP[MM@M1]_[YY].csv is not working.
The following also does not work: /export/EXP{*[MM] * 1 -1}_[YY].csv
Is there any other way?
Re: Numerical Expressions
Posted: Mon Feb 26, 2024 1:16 pm
by admin
when you let the export create with "before each new month" periodicity and trigger the FTP upload event by this export generation event and make use of "lastexport" as source in the FTP upload event, the time stamps should be evaluated as you intend.
Re: Numerical Expressions
Posted: Wed Feb 28, 2024 10:33 am
by Empire24
Thank you for the feedback. I've tried, but unfortunately, the data for the new day is still being written. This means that the data from February 27, 2024, is being written as February 28, 2024.
What am I doing wrong?

- export.jpg (87.27 KiB) Viewed 1349 times
Re: Numerical Expressions
Posted: Wed Feb 28, 2024 7:53 pm
by admin
Can you please post the file names of the export files? As you do not delete them (which will btw run you into trouble in the long end) they still should be in the /data/export folder. timestamps in this names are expected to be evaluated for determining the data being taken.
Re: Numerical Expressions
Posted: Thu Feb 29, 2024 1:01 am
by Empire24
Here is the directory:

- file.jpg (24.02 KiB) Viewed 1331 times
"I have now activated the deletion. However, I suspect that it will not solve my issue with the correct date."
Re: Numerical Expressions
Posted: Thu Feb 29, 2024 9:52 am
by admin
I meant the name of the export files (not the ones given via upload on your server). They are named according the used template and have timestamps in their names. You have to look on the Meteobridge for those (can connect via SMB from your PC).
If you still don't understand what I am asking for, then it may be easier to give me remote access? You can send credentials (URL and temporariry password) to "info(at)meteobridge.com".
Re: Numerical Expressions
Posted: Thu Feb 29, 2024 11:10 am
by Empire24
Do you mean that?

- wswin.jpg (117.04 KiB) Viewed 1322 times
Re: Numerical Expressions
Posted: Thu Feb 29, 2024 11:20 am
by admin
Nope. This is the wswin export definition in templates folder that is used to generate the export data. I asked for the file names of the generated exports which are in /data/export/ folder. There should be tons of it as you don't delete after upload.
May be it is easier when you give me remote access?
Re: Numerical Expressions
Posted: Thu Feb 29, 2024 11:34 am
by Empire24
Okay, that was the upper screenshot. I've only had it running for a few days. And I've also deleted it manually a few times. By now, the folder is empty. I've deleted everything.

- Screenshot 2024-02-29 104424.jpg (129.18 KiB) Viewed 1318 times
Re: Numerical Expressions
Posted: Fri Mar 01, 2024 10:37 am
by admin
As there is nothing in the exports folder, I cannot inspect anything.
I tried myself on my PRO2 and I found the root cause.
The used WSWIN export definition contains the following pragma to define the output filename.
Code: Select all
#pragma exportfile=EXP[MM]_[YY].csv
Doing so the Meteobridge FTP upload cannot make use of the timestamp in the filename as it does no longer contain the expected information.
When you make a copy of your WSWIN template and remove the above mentioned pragma you can use this for export and ftp upload (please select delete option to avoid filling up your SD card).
Re: Numerical Expressions. **solved**
Posted: Sat Mar 02, 2024 4:19 pm
by Empire24
Thanks for the help. Now it works perfectly.