Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Insteon macro problems Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
mmoore99
Newbie
Newbie


Joined: March 07 2006
Location: United States
Online Status: Offline
Posts: 15
Posted: March 07 2006 at 22:54 | IP Logged Quote mmoore99

Dave,

I am attempting to use PH 1.03.4.7 to control the insteon devices in my home and am experiencing problems when I attempt to execute "simple"macros.

Background info:

    1. 22 insteon devices installed
    2. Elk - M1G
    3. W800 RF receiver attached to Elk-M1
    4. Macro created to do the following:
             -Turn on insteon device 1
             -Delay 2 seconds
             -Turn on insteon device 2
             -Delay 2 seconds
             -Turn on insteon device 3
             -Delay 2 seconds
             -Turn on insteon device 4
             -Exit macro
    5. Trigger created to execute macro on receipt of
       IR keyfob (X10 address D1 - ON)

When I press the keyfob button the macro triggers and turns on the first insteon light. Then PowerHome starts using 95% - 100% of the CPU and does not finish executing the macro. Also, when the system enters this state all on/off commands from the Device Status screen are inoperable. PH stays in this state until it is shut down and restarted or reinitialized.

Prior to executing the macro everything appears to be fine. I able able to successfully control all of the insteon devices from the Device Status screen.

It appears that when the macro is being executed that PH is going into some kind of a loop and staying there.

Please advise as to what you might think is causing the problem.

Thanks.

Also, is it possible to extract all/portions of the event log into a text file?

=====================================================
Edit - Problem solved. I had inadvertantly set the trigger as "immediate." I changed the trigger to queued and now the macro executes as expected.

I would still like to know about the exporting of the info in the log file. Also, will the log show incoming insteon events?

Edited by mmoore99
Back to Top View mmoore99's Profile Search for other posts by mmoore99
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: March 08 2006 at 04:19 | IP Logged Quote dhoward

Welcome to PowerHome!

Well it looks like you've figured out the problem...yes, the trigger should be "Queued". The other thing that I would change is if you're using the Delay command with a value of 2000 (2 seconds), I would change it to a "Wait" command with a value of 2.

A Delay command halts all processing while the delay is going on and is useful if this is truly what you want to do or you're introducing fine amounts of delay usually less than a second.

The Wait command however does not halt other processing from occurring and is the preferred method for anything greater than half a second.

Yes, the log will show incoming Insteon data (if you've got it checked off in the PowerHome Explorer under Setup->Logs). If you make any changes in the Setup section of the Explorer, be sure and restart or reinitialize PowerHome in order for the changes to take effect.

You can export the eventlog as text by viewing the eventlog and going to menu File->Export. Here you can choose your export method from including CSV, Excel, Text, or others.

You can also programmatically export your eventlog with the ph_exporteventlog function. The details of this function can be found in the Help file under Help->Content. This function will also let you optionally trim your eventlog. This is a very good thing to do as the eventlog can become quite huge in a short manner of time if you're logging a lot of events (you can also trim the log without exporting with the ph_trimeventlog function).

The format for the ph_exporteventlog function with an export type of text exporting the entire log without any trimming would be:

Code:
ph_exporteventlog(1900-01-01 00:00:00,datetime(today(),now()),1,"c:\thepathandfilenametoe xportto.txt",1,0)


Hope this helps,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
mmoore99
Newbie
Newbie


Joined: March 07 2006
Location: United States
Online Status: Offline
Posts: 15
Posted: March 08 2006 at 11:06 | IP Logged Quote mmoore99

Dave,

Thanks for your quick reply. I have been reading a lot of your posts here and on CocoonTech and am very impressed with the level of support that you offer.

I am very impressed with PowerHome, especially the Insteon support. You have eliminated a lot of the pain associated with using Insteon devices. I will be registering PH shortly.

One more question...is there a way to export macro code to a text file?

Thanks.

Mike
Back to Top View mmoore99's Profile Search for other posts by mmoore99
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: March 08 2006 at 12:45 | IP Logged Quote dhoward

Mike,

Im glad you like the program and appreciate the comments .

Macros can be exported no problem. From the PowerHome Explorer, navigate to the Macro Header screen (not the details). Right-click on the macro of interest and choose "Export". This will create SQL statements for both the macroheader and macrodetail tables. This code can then be easily imported into another system or tweaked and imported into the current system (you'd have to change the ID or delete the existing one first to avoid a unique constraint) by opening the Multi-Editor and switching to SQL mode (shift-F5).

This won't export global variables, Insteon/X10 devices, etc. that are reference by the macro however. These would have to be exported separately. You can export most of the data in the Explorer using this same mechanism.

HTH,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum