Automatic historical log download

Hi all!

I’ve a Ewon Flexy configured and everything runs smooth. I need to find a way for automatically exporting the Historical Table in CSV format.

What I need is a sort of API call for downloading the file or, for example, accessing the device in FTP mode and finding the file ready to be downloaded (easy to automate).

Do you have any ideas?

Thanks in advance and I wish you a nice weekend!

Hi mrKappa27,

Have you looked into the use of DataMailbox? It is a service we offer that buffers data logged by Flexy devices in the cloud and has an API for accessing and archiving this data. You will need to register for a developer ID, but DataMailbox is free to use in most cases.

There is also already a tool in existence for exporting DataMailbox data into CSVs. You may find this useful.

hi hugh_hms,

thank you for your reply! Your solution may fit but, if possibile, I would like to keep everything offline cause this is a requirement.
Other solutions I’ve found but I still need to validate them:

Do you think that these solutions may work?


Yes, calling with curl should work fine for making requests with export block descriptors. In my testing the only catches were needing to authenticate using the -u flag and that the URL must be encased in single quotes. So for your example, you would form the command:

curl -u username:password ‘$dtHL$ftT$st20112021_000000$et_d1$fnLog.csv

Plus whatever other flags you might need, like an output file location.This has worked for me on my device. Note that the credentials are unencrypted. This shouldn’t be an issue if you’re making the call over VPN or your local network, but you should be aware in case you decide to do so over an otherwise unencrypted connection.

I believe using the task planner to store the files you want locally should work as well.

Hi @hugh_hms
I solved the task using the cURL in a local environment.

Thanks again :slight_smile:

1 Like