Page 1 of 1

[ANSWERED]Loading data to a virtual device

PostPosted: Sun Oct 26, 2014 9:34 am
by ddomotics
Hello
I am looking for an example to load data into a virtual device.
I would like to integrate one ECODEVICE to indigo.
My idea is to use xml file from ECODEVICE to load regularly data to INDIGO.
I am newbie on INDIGO.
Thank you for your help

Re: Loading data to a virtual device

PostPosted: Mon Oct 27, 2014 9:13 am
by jay (support)
I wouldn't recommend using AppleScript - XML parsing would be quite difficult since there are no built-in XML libraries in AppleScript. There are several ways to accomplish this task however - here are a couple of options:

  1. Write a Python script to fetch the XML file, parse out the relevant/interesting data, and insert it into variables. You don't mention controlling the device, but if they have a control API also you could write scripts to send the appropriate messages to the device.
  2. Write an Indigo Plugin to communicate with the device (this would be a more reusable solution that could be easily shared with the community). We have an easy-to-use API and lots of examples of building plugins to do various things.

Check out the Technical Documentation section of the website for scripting and plugin development information. You can also download the SDK for a variety of sample plugins that you can use as the starting point for your own plugin.