6.0 beta 2 (build 652) applescript questions
Greg Satz
satz at iranger.com
Wed May 21 14:17:18 PDT 2008
Hi James, I am just trying to assess the best approach to accomplish
some xPL/XTension integration without asking you to do anything more.
I never expected XTension to fully support the AppleScript object
model. I recall that discussion on this mailing list (a few times).
I have put together an xPL gateway for my Lutron lighting system and
my HAI Omnilink security system. This lets you discover what devices
are on either system as well as obtain status and control them. Both
devices have some "programability" but "too many cooks spoil the
soup" and I am trying to use XTension as the "master controller".
The xPL gateway is nothing more then an internet to serial line
translator. The xPL message is a generic name, value transport. The
xPL schema provides the context and meaning to the names and values.
The schema is a document that describes how xPL should perform the
actions and responses necessary for the stated purpose. Arming my
security system uses the security.basic schema with command=arm,
area=home and user=XXXX (XXXX is the secret pin).
The interesting schemas for this purpose are the lighting, security,
control and sensor. I wrote a quick xPL gateway to control my Progear
displays. The goal being to shut them off when no one is in the room
to preserve the backlight on the LCD display. I need to gather the
motion events from my HAI security panel and send an xPL
control.basic message to turn on the screen saver and blank the
screen. XTension is best suited for this. Sorry if this is a
contrived example and an over simplification but I don't want to
overload the list and bore everyone to tears with off topic chatter.
What is missing is the one-way or two-way control. I figure I would
start with telling XTension about xPL events since that is comprised
of receiving an xPL message and translating it into applescript. I
believe I have all the resources to do this. All I need to do is
figure out the mapping from one name space and control commands into
XTensions'.
Should we keep this discussion on the mailing list or move it? If
anyone else is interested let me know. Otherwise I will begin to send
email to James directly.
Thanks,
Greg
On May 21, 2008, at 12:27 PM, James Sentman wrote:
>
> On May 21, 2008, at 1:09 PM, Greg Satz wrote:
>
>> I am playing with writing some applescript C code and am looking
>> at the procedures to download data from the latest XTension. Is
>> the 6.0 beta 2 (build 652) the latest?
>>
>> There are various anomalies that work for some elements but not
>> others. For example "count every xInterface" returns the number of
>> interfaces on my system, 2. But "count every xUnit" returns
>> nothing. The applescript return data is empty. I assume this is
>> just missing code. Also "get name of every xUnit" doesn't appear
>> to be supported either.
>
> Implementing the full object model in a carbon linked app is not
> practical nor is porting xtension fully to cocoa at the moment
> because it would break everyones legacy scripts that use features
> that I can't easily duplicate in cocoa yet. So it's currently a bit
> of a hodge podge mixture of both. The regular verbs are the way to
> go for most data, see the "unit type" verb to get a list of all
> units. But how are you planning to track the XTension controlled
> movements of the units back into xPL? Or are you just sending data
> to XTension?
>
> I understand that xPL is wildly generic, but specifically what
> sorts of things are you connecting to? I'm only vaguely familiar
> with it from conversations with you in the past I think. If I had
> some concrete examples I might be able to decide how feasible it
> would be to support via an addon or plugin type affair. I can now
> create a device type plugin that would allow you to create units
> inside XTension that were linked to xPL units, but that would not
> then also expose the full range of your other devices to it. That
> could be done too though, both types of interfaces are now
> supported within XTension thanks to the multiple interfaces. It
> remains mostly a question of "do we want to go there?" and of
> course, limited resources and lifetimes ;)
>
> I am interested in learning more, but most of the faq's and
> tutorials that I see in my initial search begin with install the
> API or the Perl library or something like that and I have no
> interest in reverse engineering that, there must be specific
> documents about how to construct the XML snippets that fly around?
> Is there even an xPL hub for the Mac or do you have to run the java
> version?
>
> I believe this is about as far as we got a year or more ago when we
> last chatted about xPL, but Xtension has matured internally since
> then and really could connect to the thing now, though significant
> plugin development would still be necessary. I just need to decide
> if it can be a device type plugin which might be a fairly
> reasonable sized project, or a full target which would be a lot
> more work.
>
More information about the XTensionlist
mailing list