Please login or register.

Login with username, password and session length

Author Topic: Can I use the ActiveHome SDK in SSIS?  (Read 9635 times)

reehus

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 7
Can I use the ActiveHome SDK in SSIS?
« on: March 17, 2011, 09:52:01 PM »

I am trying to make a reference to the ActiveHome in an SSIS script task.  I cannot add it as a reference until it is in the GAC, however I get an invalid format error when I try to add the ahscript.dll to it.  I tried to load the dll using the Scripts.Referencial reference but it failed to load with the error message about a missing assembly manifest.  Can I use this in an SSIS script task?  If not, what is the next best solution if I have to get values from a database to determine whether or not to turn on a light?  Any help would be GREATLY appreciated.  Thanks in advance...
Logged

reehus

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 7
Re: Can I use the ActiveHome SDK in SSIS?
« Reply #1 on: March 18, 2011, 09:54:48 AM »

Thank God I just found a way of doing this with DOS commands thanks to previous posts!!  That totally solves my problem and is WAY easier.

Thanks anyway!!

ahcmd sendplc a2 on/off that is all I needed - whoopie!!
Logged

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1340
  • He's just this guy. You know?
    • wgjohns.com
Re: Can I use the ActiveHome SDK in SSIS?
« Reply #2 on: March 18, 2011, 09:54:38 PM »

 >!
Logged
-Bill- (of wgjohns.com)
bill@wgjohns.com

In the real world, the only constant is change.

When I'm online you can find me in the Home Automation Chat Room!

reehus

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 7
Re: Can I use the ActiveHome SDK in SSIS?
« Reply #3 on: April 06, 2011, 09:37:50 AM »

Okay, I need help again.  I used the DOS commands, but it sometimes throws an error and the debug window pops up.  I cannot have this happening because it is an automated environment and we cannot keep logging in to close the debug window (if we don't close it any commands sent do not work).

So now I am back to trying to figure out how to write the VB Script code within SSIS.

I have Microsoft Visual Studio 2005 which was installed with SQL Server - I suppose if I figure it out I can write it there?   Please help!

If anyone has any suggestions, I would REALLY appreciate it.

Thanks,
Reena
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Can I use the ActiveHome SDK in SSIS?
« Reply #4 on: April 06, 2011, 09:58:53 AM »

I have noticed the crashing with the AHCMD program, as well.
I've added it to the Bug List here:
http://forums.x10.com/index.php?topic=22373.0

I'll let the developers know about it, as well. (I had reported it to them back in January, but at the time I thought it might be limited to my system).
Logged

reehus

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 7
Re: Can I use the ActiveHome SDK in SSIS?
« Reply #5 on: April 06, 2011, 11:40:26 AM »

Hi Noam, thanks for your response.

I have tried using the vbscript (in the sample directory), it works great.  Now I need to find out how I can write a single .vbs script that turns the light on automatically without having to click on a button.

Would you be able to help me with this as I am new to standalone vbscript files.

Thanks so much!
Reena
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Can I use the ActiveHome SDK in SSIS?
« Reply #6 on: April 06, 2011, 12:28:07 PM »

Hi Noam, thanks for your response.

I have tried using the vbscript (in the sample directory), it works great.  Now I need to find out how I can write a single .vbs script that turns the light on automatically without having to click on a button.

Would you be able to help me with this as I am new to standalone vbscript files.

Thanks so much!
Reena
Unfortunately, I'm not a programmer. I'm sure others here should be able to give you some advice on that, though.
Logged

reehus

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 7
Re: Can I use the ActiveHome SDK in SSIS?
« Reply #7 on: April 06, 2011, 12:46:32 PM »

Can't believe how simple it was!  Created two scripts, one called LightOn.vbs and one called LightOff.vbs.  Called these from an Execute Process Task in SSIS and it works like a charm.   :)%

Now hopefully this will work well and not give random errors like ahcmd.

Here is the code for LightOn.vbs.

' VBScript source code

Dim ActiveHomeObj

Sub Command

        Set ActiveHomeObj = CreateObject("X10.ActiveHome")

        ActiveHomeObj.SendAction "sendplc", "a4 on"

End Sub

Call Command
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Can I use the ActiveHome SDK in SSIS?
« Reply #8 on: April 06, 2011, 01:03:32 PM »

That's great!
I may use your code as an example to replace some of my batch files (well, CMD scripts).
Logged

reehus

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 7
Re: Can I use the ActiveHome SDK in SSIS?
« Reply #9 on: April 06, 2011, 01:10:43 PM »

Good idea... good luck Noam  :D
Logged

reehus

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 7
Re: Can I use the ActiveHome SDK in SSIS?
« Reply #10 on: April 08, 2011, 01:53:59 PM »

Update.

If you are going to use VBScript (.vbs) then please add On Error Resume Next to the beginning of your code.

Also if you have Microsoft Visual Studio installed on your machine you must disable the Just in time bugger:

To enable/disable Just-In-Time debugging
1.   On the Tools menu, click Options.
2.   In the Options dialog box, select the Debugging folder.
3.   In the Debugging folder, select the Just-In-Time page.
4.   In the Enable Just-In-Time debugging of these types of code box, select or clear the relevant program types: Managed, Native, or Script.
To disable Just-In-Time debugging, once it has been enabled, you must be running with Administrator privileges. Enabling Just-In-Time debugging sets a registry key, and Administrator privileges are required to change that key.
5.   Click OK.

Good luck!
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.