PDA

View Full Version : Some Examples


ranger_ut
Oct 02, 2009, 08:34 PM
Here is what I have been messing with.
My goal is to use vb on my complex or something I can loop through instead of doing alot of test elements.

I know these do work. FYI you can run them from outside of HCA.
ex. c:\hca\cscript turnoff.vbs

Dim HCA
Set HCA = GetObject(,"HCA.Object")

HCA.device.off("Devices - Office Light")
HCA.group.off("Groups - Office")
HCA.group.off("Groups - Hall")

Set HCA = Nothing
What I can not figure out is Insteon devices.
single or KPL switchs.
HCA.device.off("insteon - Kitchen") nothing....
what about turning group 99 off.. Should this be done in a sceen, then call the sceen?


Thanks for any help.

Brett:)

KHarms
Oct 05, 2009, 01:05 PM
Hi Brett.

What you are encountering is a hold over from previous versions that we should have fixed but didn't. If you remember back in previous versions of HCA, the world was split into "devices" and "controllers". Devices received and controllers sent. Of course this was a mess with things that both send and received.

To solve this in V9 we made the UI just talk about Devices. Internally we still had the split but it was hidden in the UI.

However, when using the object model you still have to know about what is or is not a controller if you want to control them. For example, using a KeypadLinc and wanting to control the load you have to use HCA.Controller.Off("Kitchen - KeypadLinc") rather then HCA.Device.On

Yes, I know this isn't right but that is the way it is for V9.0

Really the only issue you may find is the KeypadLinc.

Have you looked at the 2 sample scripts in the HCA Samplers folder? It shows how to do something similar to what you are doing.

Also, take a look at the Object Model Appendix in the user guide. It documents all the objects and method. You can see where you can use invoke scenes.

Hope this helps