Please login or register.

Login with username, password and session length

Author Topic: Activity Monitor actions  (Read 30748 times)

bret5823

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 3
Activity Monitor actions
« on: October 22, 2006, 12:31:36 PM »

Does anyone know where the actions displayed in the Activity Monitor are stored?  I have looked everywhere and in all the X10 files.  I need to write some Java code to monitor the state of each divice and the RF states being received.  Because there is no Java header for the DALL this is the only way I can see to get the information I need.  I need this to control other non X10 divices.  If there are other suggestions please let me know.

Thanks for the help,
Bret
Logged

EL34

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 278
    • My X-10 projects
Re: Activity Monitor actions
« Reply #1 on: March 24, 2008, 08:43:09 AM »

The activity monitor does not write out a log file, I wish it did.

I am wanting to get access to the x10 service and monitor x10 traffic as it happens.

No problem sending x10 commands to all the devices but now I want to monitor the x10 traffic so I can refelct mudules on/off states in my app.

Right now, I am just doing a plc query every now and then and using the data from the queries.
Of course my data is not being captured the second an x10 command goes out over the power line.

Is there any way to monitor and get access to the x10 command data instantly?
« Last Edit: March 24, 2008, 01:45:55 PM by EL34 »
Logged
W10 - CM15A - AHP 3.301 - i Witness - MyHouse online - Smart Macros - SDK using Visual Basic express 2008
My X10 page-> http://www.el34world.com/Misc/home/X10_0.htm

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10512
  • I don't work for X10, I use it successfuly!
Re: Activity Monitor actions
« Reply #2 on: March 24, 2008, 11:04:08 AM »

EL34
Using the SDK it is quite possible to capture commands as they are sent/recieved!
X10dispatcher,and PC Companion can do it and -Bill- (of wgjohns.com) has a program which shows all actions of devices you set into it!
PC Companion saves the info to a log file you can upload to a web site or print off! The only action it doesn't record is camera action from with in the program!

Using the SDK you import ActiveHomeScriptLib into your program and then declare
Code: [Select]
Public WithEvents _AHObj As ActiveHometo recieve the trafic use the  _AHObj.OnRecvAction  like this:
Code: [Select]
Public Sub ActiveHome_Received(ByVal bszAction As Object, ByVal bszParam1 As Object, ByVal bszParam2 As Object, ByVal bszParam3 As Object, ByVal bszParam4 As Object, ByVal bszParam5 As Object, ByVal bszReserved As Object) Handles ahobj.RecvAction
           'These local variables are used to convert input data to strings
            'They are initalized to prevent compiler warning about possibly using them in console.writeline
           'before setting them (it knows that the try/catch might fail and leave some unassigned)
            Dim Action As String = "", Param1 As String = "", Param2 As String = "", Param3 As String = ""
            Dim Param4 As String = "", Param5 As String = "", Reserved As String = ""

            'Since this is an ActiveX Object we should convert the objects to strings which is what they really are
           Try
                Action = CType(bszAction, String)   'recvplc, recvrf
                Param1 = CType(bszParam1, String)   'e1 on, e1 bright
                Param2 = CType(bszParam2, String)   '50 as in bright 50%
                Param3 = CType(bszParam3, String)   '?
                Param4 = CType(bszParam4, String)   '?
                Param5 = CType(bszParam5, String)   '?
                Reserved = CType(bszReserved, String)
            Catch ex As Exception
                'Since we could get floods of x10 messages its best not to put any message boxes here
                Console.WriteLine(ex.ToString())
            End Try

            Console.WriteLine("Received an Event " + Action + " " + Param1 + " " + Param2)

   
    End Sub
Hope this helps ;)
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

EL34

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 278
    • My X-10 projects
Re: Activity Monitor actions
« Reply #3 on: March 24, 2008, 11:08:42 AM »

Hey thanks Juice, wasn't aware of that program.

Only problem is I write in perl and I am not sure how to implement that using perl???
Logged
W10 - CM15A - AHP 3.301 - i Witness - MyHouse online - Smart Macros - SDK using Visual Basic express 2008
My X10 page-> http://www.el34world.com/Misc/home/X10_0.htm

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10512
  • I don't work for X10, I use it successfuly!
Re: Activity Monitor actions
« Reply #4 on: March 24, 2008, 11:17:30 AM »

I'm not familiar with Perl but someone else may jump in with the process for Perl!
There are links to thirdparty software on my site or here in SDK Created Programs
You can also read more about them in the ThirdParty  Add-on Section of the forum! ;)
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

EL34

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 278
    • My X-10 projects
Re: Activity Monitor actions
« Reply #5 on: March 24, 2008, 11:22:42 AM »

I don't think it's possible unless someone writes a perl module and makes that link to the windows API???

The perl module could then be used.

I do simple stuff with perl, someone that is more versed in windows/perl programming may have some info.
I'll go check out the links you gave.
Thanks juiceman
« Last Edit: March 24, 2008, 01:47:19 PM by EL34 »
Logged
W10 - CM15A - AHP 3.301 - i Witness - MyHouse online - Smart Macros - SDK using Visual Basic express 2008
My X10 page-> http://www.el34world.com/Misc/home/X10_0.htm

EL34

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 278
    • My X-10 projects
Re: Activity Monitor actions
« Reply #6 on: March 26, 2008, 03:06:17 PM »

Hey Juiceman,
Coming from a perl background, so VB is a bit foreign to me.

I am guessing that to run a VB program like yours, I need to install VB?

What Visual basic runtime do I need?
I found four versions on this page
http://www.karenware.com/powertools/runtimes.asp#Download

Once the VB is installed, do I just click on name.vb files to execute them?
Or do you start a cmd.exe console and execute the .vb program in the console?
Logged
W10 - CM15A - AHP 3.301 - i Witness - MyHouse online - Smart Macros - SDK using Visual Basic express 2008
My X10 page-> http://www.el34world.com/Misc/home/X10_0.htm

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10512
  • I don't work for X10, I use it successfuly!
Re: Activity Monitor actions
« Reply #7 on: March 26, 2008, 03:50:18 PM »

You don't need vb to use a program like mine just to build it! ;)
Since your new to VB I'd suggest getting the free VB tool from Microsoft.
Microsoft Visual basic 2008 Express Edition
 BVC, AlertDialer and X10WavPlayer were designed with the 2005 Express Edition and PC Companion was built with 2008 Express Edition.
The program is very easy to use and has plenty of support!
You'll also need net frame work if not already installed but if you have one of the above created programs you already have it! ;)
Microsoft has plenty of free tutorials to help you get started.

Once you feel comfortable you can open the sample file in C:\Program Files\AHSDK\samples\vbapp\VBActiveHome using the open project button under file! ;)
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

EL34

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 278
    • My X-10 projects
Re: Activity Monitor actions
« Reply #8 on: March 26, 2008, 03:54:48 PM »

yeah, I was at the ms site looking at the vb 2008 express just now. :)
I was alos watching som video tutorials on the msdn site about using 2005 express.

I'm gonna dl it now and get some VB happening

thanks for the info
Logged
W10 - CM15A - AHP 3.301 - i Witness - MyHouse online - Smart Macros - SDK using Visual Basic express 2008
My X10 page-> http://www.el34world.com/Misc/home/X10_0.htm

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10512
  • I don't work for X10, I use it successfuly!
Re: Activity Monitor actions
« Reply #9 on: March 26, 2008, 04:00:25 PM »

Quote
Once the VB is installed, do I just click on name.vb files to execute them?
Or do you start a cmd.exe console and execute the .vb program in the console?
Chances are you already have a vb runtime file it just may not be the latest  if not install vb 6 runtime.
some of the programs are command line ( run from cmd.exe console) only like the one in the SDK others have an interface.
 
Quote
I'm gonna dl it now and get some VB happening
cool best of luck!
Cheers!
 
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

EL34

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 278
    • My X-10 projects
Re: Activity Monitor actions
« Reply #10 on: March 26, 2008, 04:39:34 PM »

Thanks juice
that really long line in your code up above, is that correct and complete.
look all the way over to the right end

Code: [Select]
ByVal bszReserved As Object) Handles ahobj.RecvActionnot sure if that handles lne is a comment????
Logged
W10 - CM15A - AHP 3.301 - i Witness - MyHouse online - Smart Macros - SDK using Visual Basic express 2008
My X10 page-> http://www.el34world.com/Misc/home/X10_0.htm

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10512
  • I don't work for X10, I use it successfuly!
Re: Activity Monitor actions
« Reply #11 on: March 26, 2008, 04:55:42 PM »

Yes it is correct and commplete, the handles ahobj.RecvAction tells the program what to use for that sub! in this case the RecvAction not the SendAction ;)
"handles ahobj.RecvAction" is not a comment! ;)
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

EL34

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 278
    • My X-10 projects
Re: Activity Monitor actions
« Reply #12 on: March 26, 2008, 09:04:41 PM »

ah, ok, thanks, wasn't sure since I saw the ) after object
I thought maybe if it was a statement it would be on the next line beow.

perl and vb are a bit different.

hope you don't mind me bugging you with vb questions once in a while.:)
You can ask me perl questions. LOL
Logged
W10 - CM15A - AHP 3.301 - i Witness - MyHouse online - Smart Macros - SDK using Visual Basic express 2008
My X10 page-> http://www.el34world.com/Misc/home/X10_0.htm
 

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