Transfer sdata xml to FTP

Hi,

I use openremote.
To know the status of a device, I create a Xpath request on the http link:

http://<Vera_IP>:3480/data_request?id=sdata&output_format=xml

To relieve my VERA, I wish transfer this XML file (sdata) info my Syno by FTP for example every 5 sec.

I’ve seen this topic :

http://forum.micasaverde.com/index.php/topic,10871.msg76673.html#msg76673

I can use os.execute I guess but : How can I create or find this sdata xml file?

Thank you

You’ll have to generate it via the http link as the native format is json and the link will convert it to xml.

  • Garrett

If you run the URL above, the output is dynamically generated. It’s not a file. Running it every 5 seconds would be fairly aggressive.

Curl can be used to retrieve it, via http, and another curl option lets you FTP stuff. “curl --help” will show the options, or you can use google to familiarize yourself with the tool.

So, I can use curl to retrieve the dynamic output. Output is a xml file here?

10 sec is a good choice?

Yes, [tt]curl [/tt]will turn the dynamic URL into a XML file. Play with the timings, as you will see the impact on Vera.

Most of the control points are getting “the whole” XML once, at startup, and then only getting increments afterwards. This happens using a mechanism that only gives them the delta’s after the initial call, and only when stuff changes, so it’s much lighter weight than what you’d be doing.

Anyhow, try it with various timing delays and see what you get. It’ll be easy enough to see the impact.