Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: problem running macros Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
mcfly
Newbie
Newbie


Joined: June 19 2006
Online Status: Offline
Posts: 14
Posted: November 16 2008 at 18:31 | IP Logged Quote mcfly

Hi all. I used PowerHome for a brief period a couple of years ago, but eventually went back to my old homegrown X-10 controller. I am now determined to move away from that, as I have not the time to fiddle with it any longer, and so I am revisiting PowerHome as a solution for my home automation needs. PowerHome certainly has all the functionality I require. Having some trouble though, which I'm hoping someone can help me shed some light on.

I have a small X10 installation with about 15 devices, controlled by a CM11A. I also want to use a CM17A to get a signal into the far corner of the house where powerline signals can never seem to reach. They're all set up in Powerhome, and I can control any of those individual devices just fine.

I am now setting up macros to turn on a bunch of lights at sunset, etc. I am having a problem when some macros run. The message I get in the Event Log is:

System Message: An error occurred while processing the execution queue. Resetting execution queue and trying again.

But it never seems to try again. From this point, PH must be re-initialized to get anything going again. No further commands can be sent from PH.

The macros I have set up are all very simple - they control anywhere from 1 to 5 devices, all simple commands to turn on, off, dim, bright.

I am not sure what info might be needed to troubleshoot, so here is a start. I am using version 2.0.0, on Windows XP. At the point of the system message, the following information appears in the "Debug Info" window:

*** PowerHome Debug Information (2008-11-16 17:56:36.500) ***
ii_recursion = 7
ii_logseq = 193
ii_sequence = 17
ii_queueptr = 0
ib_exequeueservice: false
EXE Queue Rowcount = 0
EXE Queue Upperbound = 0
COMM Queue Rowcount = 0
istr_temp ---
i_mbret = 0
i_mbtype = 0
i_type = 0
l_macrojumps = 0
l_macrorow = 0
s_inputmessage =
s_inputret =
s_macroid =
s_macroreturn =
s_mbmessage =
s_submacropath =
[LOCAL1] =
[LOCAL2] =
[LOCAL3] =
[LOCAL4] =
[LOCAL5] =
[LOCAL6] =
[LOCAL7] =
[LOCAL8] =
[LOCAL9] =
[LOCAL10] =
[TEMP1] =
[TEMP2] =
[TEMP3] =
[TEMP4] =
[TEMP5] =
[TEMP6] =
[TEMP7] =
[TEMP8] =
[TEMP9] =
[TEMP10] =
*** Controller Debug Info ***
ID:
Controller Number: 0
Controller Type:
---
ib_connected: false
ib_process: false
ii_bufferptr = 0
ii_buffercurrptr = 0
ii_sendptr = 0
ii_port = 0
*** Controller Debug Info ***
ID: CM17A
Controller Number: 2
Controller Type: CM17A
---
ib_connected: true
ib_process: false
ii_bufferptr = 0
ii_buffercurrptr = 0
ii_sendptr = 0
ii_port = 1
*** Controller Debug Info ***
ID: CM11A
Controller Number: 3
Controller Type: CM11A
---
ib_connected: true
ib_process: true
ii_bufferptr = 0
ii_buffercurrptr = 0
ii_sendptr = 1
ii_port = 2

Thanks in advance for any info that may enable me to solve!
Back to Top View mcfly's Profile Search for other posts by mcfly
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: November 16 2008 at 19:49 | IP Logged Quote BeachBum

The only thought I have is why is there a null Controller Number 0? And what happened to Controller Number 1? Just thinking out loud…

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
mcfly
Newbie
Newbie


Joined: June 19 2006
Online Status: Offline
Posts: 14
Posted: November 17 2008 at 08:32 | IP Logged Quote mcfly

that is a good question, & in the Controller dropdown there is a blank first row, but in the Controller section of the Setup in Explorer there is no blank or gap in the controllers defined there. Not sure how that happened or how to fix it.

The "bad" macros usually do manage to issue a command or two before failing, however, so they must be getting the controller right at least part of the time.
Back to Top View mcfly's Profile Search for other posts by mcfly
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: November 17 2008 at 08:56 | IP Logged Quote BeachBum

It may be that Controllers 0 & 1 are placeholders. Is it related to one or the other controller in a macro or when both are being used? Also is there a possibility of displaying the Event Log at the failure point?

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
mcfly
Newbie
Newbie


Joined: June 19 2006
Online Status: Offline
Posts: 14
Posted: November 17 2008 at 10:57 | IP Logged Quote mcfly

The CM17A controller is used to issue just one command, all the rest are sent to the CM11A. Below is a sample of the event log after executing my "DUSK" macro, which contains only commands destined for the CM11A (there are 6 commands in all in that macro, one executes properly, the next one fails, & the remaining 4 never get executed) :

Nov 17 2008       10:50:21      System Message      An error occurred while processing the execution queue. Resetting execution queue and trying again.
Nov 17 2008       10:50:21      Outgoing X10      CM11A controller CM11A transmission of House code: B, Unit Code: 11
Nov 17 2008       10:50:20      Outgoing X10      CM11A controller CM11A transmission of House code: B, Command: On
Nov 17 2008       10:50:20      Outgoing X10      CM11A controller CM11A transmission of House code: B, Unit Code: 2
Nov 17 2008       10:50:19      Macro      Macro DUSK executed.
Nov 17 2008       10:48:42      Incoming X10      Incoming X-10 received on CM11A controller CM11A. Byte Values: 05 0A E6 E3 E6 E3 Decode: B1 B{Off} B1 B{Off}
Nov 17 2008       10:48:41      Outgoing X10      CM17A controller CM17A transmission of House code: B, Unit Code: 1 House code: B, Command: Off
Nov 17 2008       10:48:40      Incoming X10      Incoming X-10 received on CM11A controller CM11A. Byte Values: 09 A9 E3 E3 E3 E3 E3 E3 E3 E2 Decode: B{Off} B11 B11 B{Off} B11 B{Off} B11 B{On}
Nov 17 2008       10:48:37      Execute Timed Event      Timed Event __OS-4 processed.
Nov 17 2008       10:48:18      System Startup      PowerHome System Startup.        &nbs p;   
Back to Top View mcfly's Profile Search for other posts by mcfly
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: November 17 2008 at 11:03 | IP Logged Quote BeachBum

Sounds like something is broke in PH. Have you tied to reinstall PH. Also I assume you upgraded to V2 if so is PH in a virgin directory?

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
mcfly
Newbie
Newbie


Joined: June 19 2006
Online Status: Offline
Posts: 14
Posted: November 18 2008 at 08:00 | IP Logged Quote mcfly

have not tried re-installing as yet. This was a new install of V2 on a new box, not an upgrade.
Back to Top View mcfly's Profile Search for other posts by mcfly
 
mcfly
Newbie
Newbie


Joined: June 19 2006
Online Status: Offline
Posts: 14
Posted: November 24 2008 at 15:58 | IP Logged Quote mcfly

before I re-install, and blow everything away, i am frankly curious as to how to go about troubleshooting this instead. "Reinstall" is not a great technique for addressing issues, IMHO. My view is that I am attempting to do some very basic things with PH, and it's failing in what I would consider to be a very basic area of the application (the event execution queue). How can I find out what's happening in there?
Back to Top View mcfly's Profile Search for other posts by mcfly
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: November 24 2008 at 17:19 | IP Logged Quote BeachBum

I think the problem is more internal rather than being user driven. I don’t know of any way to screw-up the Queue other than using SQL commands. My thoughts were perhaps a bad download or something went wrong with the install. He whose name I won’t mention is the only one I know who can decipher the Execution Queue. But then again I’ve been wrong before… If you backup the PH database plus the INI the reinstall is a breeze.

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: November 24 2008 at 19:31 | IP Logged Quote dhoward

Hmmm...I wouldnt think anything installed improperly. It may actually be a problem with the conversion from ANSI to Unicode and possibly something Ive missed. However, I would have expected others to have reported the problem since the CM11A is still a very popular controller. From the Debug log, I can see that the CM11A is hung up (ib_process = true) so the problem is definately happening there. It may help if you could post the DUSK macro so I can see if anything looks out of the ordinary. Also, how was the DUSK macro triggered. It didnt appear to be from a Timed Event so just wondering as this may possibly play into it.

I'll look at the code again and see if I can spot any problems and post back.

Dave.

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


Joined: June 19 2006
Online Status: Offline
Posts: 14
Posted: November 25 2008 at 14:13 | IP Logged Quote mcfly

thanks Dave. Not sure what the best way to post a macro is - here's a screen shot of the config in the Explorer:



the macro is set up to be triggered via a timed event. When dusk rolled around and the lights didn't go on, I started investigating. In the event log example above it was run manually, shortly after re-initializing PH.
Back to Top View mcfly's Profile Search for other posts by mcfly
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: November 25 2008 at 14:23 | IP Logged Quote BeachBum

Question.. Why one “ON” and all the others BRIGHT to different modules? I normally send an ON then a BRIGHT to the same module.

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
edtude
Groupie
Groupie
Avatar

Joined: July 26 2006
Location: United States
Online Status: Offline
Posts: 64
Posted: November 25 2008 at 14:50 | IP Logged Quote edtude

BeachBum wrote:
Question.. Why one “ON” and all the others BRIGHT to different modules? I normally send an ON then a BRIGHT to the same module.


I was wondering that exact same thing myself Pete, but it has been so long since I used X10 exclusively I could not begin to say.
Back to Top View edtude's Profile Search for other posts by edtude
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: November 25 2008 at 15:02 | IP Logged Quote BeachBum

Here I go again thinking out loud but I wonder if PH is getting hosed with X10 commands and no module address first?

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: November 25 2008 at 16:26 | IP Logged Quote dhoward

Well, that screenshot was immensly helpful as I traced the code and found the problem.

I'll give you the quick fix first...change the Bright 200 to Bright 100 (don't ever go over 100).

The long reason...not sure if this affects other X10 controllers or not, but it definately affects the CM11A. The CM11A is different from most X10 controllers as the commands to tell it to dim or bright is based upon a percentage from 0 to 100 inclusive. You can't tell the CM11A to dim less than 0 or more than 100. Other controllers are told to dim/bright and they will dim/bright a single step, usually about 3.8%. To dim/bright more than that amount requires the command to be repeated multiple times. But the CM11A is different and can be told to dim anywhere from 0 to 100 in a single command. Based upon the CM11A protocol, this number needs to be equated to a value from 0 to 21 steps. There is basically some more math to match the protocol, etc. but ultimately what was happening in your case was that the bright value of 200 was being converted into an equivalent CM11A character value of 350 (character values can only range from 0 to 255). This value was being looked up in an array with only 255 members which is obviously beyond out of range and generating a run-time subscript out of range error. This was ultimately caught by the try/catch routines for the execution queue resulting in the error message. The exe queue was reset and recovered from the error, but the CM11A is basically hung because it's in the middle of processing with no way to get back. You *may* have been able to recover without reiniting by doing a Controller Disconnect followed by a Controller Connect (this *should* reset the CM11A module) but the real fix is to not try to dim/bright beyond 0 thru 100 with a CM11A. If you want 200%, then just run the 100% command a second time.

I'll put some form of error checking into the code to catch this situation as well.

Hope this helps,

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


Joined: June 19 2006
Online Status: Offline
Posts: 14
Posted: November 25 2008 at 18:27 | IP Logged Quote mcfly

Thanks All for this info, it's very helpful. Will try this out as soon as I get home and report back.

In answer to some of the questions in the last couple of posts:

* I use On and Off commands exclusively for my landscape lights, which are not dimmable. All other devices in that macro are dimmable, so I use Bright with a level. Never tried using both On and Bright though.

* I was using a Bright value of 200 because a value of 100 never seemed to bring the device to anywhere near full brightness. And I thought I had tested that out on a single device before changing them all, and I was sure that it had worked without a problem, but after seeing Dave's explanation I don't imagine it ever could have worked.

I'll try changing all these commands to send an On and then a Bright/100 - maybe that will solve all the problems.

Thanks again for your help!
Back to Top View mcfly's Profile Search for other posts by mcfly
 
mcfly
Newbie
Newbie


Joined: June 19 2006
Online Status: Offline
Posts: 14
Posted: November 25 2008 at 21:57 | IP Logged Quote mcfly

Success! All devices/macros/etc working as they should!

Thanks again for all the input & help, much appreciated!
Back to Top View mcfly's Profile Search for other posts by mcfly
 

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