Numerical Expressions. **solved**

This section covers the Meteobridge PRO, PRO2, NANO SD, Raspberry Pi and VM platforms exclusively

Moderator: Mattk

Post Reply
Empire24
Fresh Boarder
Fresh Boarder
Posts: 12
Joined: Mon Feb 12, 2024 2:11 am

Numerical Expressions. **solved**

Post 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?
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re: Numerical Expressions

Post 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.
Empire24
Fresh Boarder
Fresh Boarder
Posts: 12
Joined: Mon Feb 12, 2024 2:11 am

Re: Numerical Expressions

Post 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
export.jpg (87.27 KiB) Viewed 1346 times
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re: Numerical Expressions

Post 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.
Empire24
Fresh Boarder
Fresh Boarder
Posts: 12
Joined: Mon Feb 12, 2024 2:11 am

Re: Numerical Expressions

Post by Empire24 »

Here is the directory:
file.jpg
file.jpg (24.02 KiB) Viewed 1328 times
"I have now activated the deletion. However, I suspect that it will not solve my issue with the correct date."
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re: Numerical Expressions

Post 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".
Empire24
Fresh Boarder
Fresh Boarder
Posts: 12
Joined: Mon Feb 12, 2024 2:11 am

Re: Numerical Expressions

Post by Empire24 »

Do you mean that?
wswin.jpg
wswin.jpg (117.04 KiB) Viewed 1319 times
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re: Numerical Expressions

Post 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?
Empire24
Fresh Boarder
Fresh Boarder
Posts: 12
Joined: Mon Feb 12, 2024 2:11 am

Re: Numerical Expressions

Post 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
Screenshot 2024-02-29 104424.jpg (129.18 KiB) Viewed 1315 times
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re: Numerical Expressions

Post 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).
Empire24
Fresh Boarder
Fresh Boarder
Posts: 12
Joined: Mon Feb 12, 2024 2:11 am

Re: Numerical Expressions. **solved**

Post by Empire24 »

Thanks for the help. Now it works perfectly.
Post Reply