Switch to desktop version  
Simple Store & Forward:How to send missed data from a text file after WAN restoration - Printable Version

+- Ewon Technical Forum (https://techforum.ewon.biz)
+-- Forum: Development (https://techforum.ewon.biz/forum-50.html)
+--- Forum: BASIC Script (https://techforum.ewon.biz/forum-52.html)
+--- Thread: Simple Store & Forward:How to send missed data from a text file after WAN restoration (/thread-2862.html)



Simple Store & Forward:How to send missed data from a text file after WAN restoration - leekhilk@ithena.ai - 23-04-2026

Hi everyone,

I am currently using a Flexy 205 to collect data from PLCs via Modbus and OPC UA. I have a BASIC script that builds a JSON payload and sends it to my IoT platform using the REQUESTHTTPX command.

The Challenge:
Everything works well when the internet is connected. However, when the internet goes down, the REQUESTHTTPX command fails and the data is lost. I need a "Store and Forward" solution that is simple to manage.

My Required Logic:
  • I want to avoid complex system tools and handle this directly in my script using basic file logic:
  • Detection: If REQUESTHTTPX fails due to a network error, the script should identify that the internet is down.
  • Local Storage: Instead of losing the data, the script should append the JSON string to a simple text file on the Ewon (e.g., /usr/buffer.txt).
  • Restoration: Once the internet is back, the script should read that text file line-by-line and send the stored payloads to the server.

I want to keep this as manual and clear as possible so I can easily maintain the code. Any help or logic flows would be greatly appreciated!


RE: Simple Store & Forward:How to send missed data from a text file after WAN restoration - leekhilk@ithena.ai - 23-04-2026

Hello Everyone,
I received some reference programs from the support team, which can be accessed at https://tools.ewonsupport.biz/BASIC_Repository/
Using these examples, I was able to create a script that meets my requirements.


RE: Simple Store & Forward:How to send missed data from a text file after WAN restoration - simon - 24-04-2026

Thx for updating your thread!! :-)