Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: How to review bottom-of-window messages? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: May 14 2009 at 20:55 | IP Logged Quote jeffw_00

in PH2 I run a macro by selecting it in explorer and telling it to "Run" (top left box), or "play" (in explorer).

In the bottom status window, I notice "Syntax Errors" flagged as the macro runs, but the messages come and go VERY quickly. These messages apparently do NOT appear in Event Log, PHStatus, or ANYWHERE where I could examine them. Macro -appears- to be running properly. Are these bottom-of-screen messages captured anywhere where I can review them? They seem like a great debugging aid, if I could only see them 8-{

thanks
/j
Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: May 14 2009 at 21:58 | IP Logged Quote grif091

Under PowerHome Explorer. Setup, Logs there are various Event Log logging options.   The Formula Error option is off by default. That may give you the error entries in the Event Log you are looking for.

__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: May 14 2009 at 22:45 | IP Logged Quote dhoward

Jeff,

Lee has you covered . Be sure and reinit if you make any changes in the Setup section in order for them to take effect.

Dave.


Edited by dhoward - May 14 2009 at 22:45
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: May 14 2009 at 23:25 | IP Logged Quote jeffw_00

ok, that's a step forward - thanks!

However - I'm getting 2 types of errors:

1) On COMMENTs, i'm getting

"Syntax Error in Formula: <text of comment>".

2) I'm getting

"Syntax Error in Formula:"

Since there's nothing after the :, I can't be sure, but I believe I am getting them on
Command=Insteon
ID=<valid id>
Value=<fast On>

The insteon command IS properly executed.

Bugs (albeit benign ones) I think?
thanks!
/j


Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: May 15 2009 at 00:49 | IP Logged Quote grif091

The Insteon command syntax error message was discovered a few months ago. There are multiple posts for that error. The following post was using Off rather than Fast On. The result is the same.   See post ....

http://www.power-home.com/forum/forum_posts.asp?TID=2064&PN= 1

I do not see a syntax error on a Comment entry. Can you post the detail of the Comment entry. What do you have entered in the Send Keys field?


__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: May 15 2009 at 09:56 | IP Logged Quote jeffw_00

Does it really matter? It's the text of the comment that's in the Send Keys Field. Here it was
"If it came from a switch (LITELOCK ON) disregard FRONTLITES DISABLE"

Also - that other post is more than 3 months old - I wonder if the fix is still on Dave's list...
/j
Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: May 15 2009 at 11:53 | IP Logged Quote grif091

The reason for asking about the Comment is that I have not been able to create a syntax error on a Comment. I had tried an unquoted string, a quoted string, an unbalanced quoted string, none of which produced an error. Now I have tried the specific text from your Comment and have not been able to create an error.

Dave has a good track record for fixing the nits that have surfaced in the current release in the next release.

__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: May 15 2009 at 12:05 | IP Logged Quote dhoward

Jeff,

I created a macro with a command of COMMENT and was unable to get it to produce a syntax error. I then thought of other ways of doing comments (// and /* */) and tried this on a FORMULA line and was able to get it to error if it was ONLY a comment and nothing else. This happens because the FORMULA line is expecting a formula and if only a comment exists, the formula part is essentially null which results in an error value. But on a COMMENT line, I was unsuccessful in getting it to produce an error (comment lines are completely skipped within the macro processor).

If you have a screenshot or more details, I might be able to see what the problem is.

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


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: May 15 2009 at 12:06 | IP Logged Quote jeffw_00

I think that it's something nefarious, probably generated in the database conversion process. I just tried to enable/disable macro lines to isolate it and now I can't get it to re-produce. I'll do some more experimenting later. It's possible that some DB command that re-creates all the Comment lines might fix it.
/j
Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: May 15 2009 at 12:35 | IP Logged Quote jeffw_00

Ok Dave - here's what's going on. I don't seem to be able to reproduce the comment error anymore, though i can still see it in the event log from last night (e.g., I'm not crazy). However, what I did do, last night, to the same macro, was that I noticed a couple of formula lines that had the VALUE field blank (an artifact of the db conversion to 2.0?) anyway, I changed them to Immediate.

I -guess- that's what fixed the comment problem as one of the fixed lines came just before the offending comment line. If you want me to try anything else, let me know
/j

PS - one thing I notice now that I have Formula Errors enabled in the log:

Some places, I have Jump statements of the form:

if(<condition>,"NEXTLINE","DONE")

Where the label "NEXTLINE" isn't defined, but since it isn't, the control flow drops through to the next line anyway, which is what I want. These are now all flagged as errors.   I suppose in a perfect universe it would be good to differentiate between (harmless) warnings and harmful errors? (or provide a legal way to do what I coded above - having to put an actual label on the next line makes the code less readable). I admit it's really a tiny nit though.

/j


Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: May 15 2009 at 13:30 | IP Logged Quote grif091

Perhaps you just finger checked and meant Goto Label rather than Jump.   A Jump statement specifies the number of macro lines to move forward. A Goto Label statement says go to a specific Label. Regardless of that point, I do not get an error if the Label name on the Goto Label is not defined. Perhaps this is another case where you are seeing errors logged where others are not. Perhaps doing the same thing to the Goto Label statement that you did with the Comment statement would resolve the problem.

__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: May 15 2009 at 13:50 | IP Logged Quote dhoward

Jeff,

The functionality that you desire is indeed allowed. I do this all the time but instead of using "NEXTLINE" or something else that doesnt exist, I just use and empty string "". However, like Lee, I just tried to duplicate this error and was unsuccessful. As Lee pointed out, I think you intended the "Goto Label" command rather than the "Jump" command.

As you suggest, there may be something else going on here such as a DB conversion issue but at least with the Formula Errors enabled we can try to isolate what the problem is.

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


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: May 15 2009 at 13:56 | IP Logged Quote jeffw_00

I did mean "goto label" - sorry. As for the error itself. Ummmm, well, cockpit-error on this one. Sorry, Never Mind. 8-}

the "Insteon command syntax error message" is real though but not affecting anything now...

/j
Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 
bmwragtop
Newbie
Newbie
Avatar

Joined: March 30 2008
Location: United States
Online Status: Offline
Posts: 27
Posted: May 15 2009 at 17:10 | IP Logged Quote bmwragtop

Hi All,

I want to chime in here and say I am seeing exactly what Jeff is seeing. If I enable the formula error logging, I seem to be getting errors flagged for comments (of the form "This is a comment") and/or the goto label conditional where one label does not exist.

I'll have to take a closer look when I get home. This behavior actually caused me to turn off formula error logging because it was more of a nuisance than help in my case.

I'll look for formula commands that are missing values also.

-Tom

Edited by bmwragtop - May 15 2009 at 17:11
Back to Top View bmwragtop's Profile Search for other posts by bmwragtop
 
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: May 15 2009 at 17:13 | IP Logged Quote jeffw_00

in my case, the syntax error was real. Upon closer examination, I was missing a ".
Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: May 15 2009 at 17:43 | IP Logged Quote grif091

bmwragtop,   were you a release 1 Powerhome user and used the DB utility to migrate the version 1 database to the version 2 format. Try checking the Skip column for the Comment line and the lines before and after the Comment. Save the Macro, then uncheck the Skip column and see if that resolves the Comment syntax error message when the Macro runs. Neither Dave nor I receive syntax errors on Comment statements in general but there is some question about what the DB migration utility may have done with those entries. You will have to check the Formula Error option and reinit before running the test.

You can also create a Macro from scratch, using a Comment statement, and see if that process results in the Comment statement giving a syntax error.

__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
bmwragtop
Newbie
Newbie
Avatar

Joined: March 30 2008
Location: United States
Online Status: Offline
Posts: 27
Posted: May 15 2009 at 19:21 | IP Logged Quote bmwragtop

Hi Lee,

I'll give it a shot. I did migrate from 1 to 2 using the db upgrade utility.

Thanks,

Tom

Edited by bmwragtop - May 15 2009 at 20:55
Back to Top View bmwragtop's Profile Search for other posts by bmwragtop
 
bmwragtop
Newbie
Newbie
Avatar

Joined: March 30 2008
Location: United States
Online Status: Offline
Posts: 27
Posted: May 15 2009 at 20:45 | IP Logged Quote bmwragtop

Hi All,

I identified when one class of my "Syntax Error in Formula: " errors occurs.

I have a simple macro that turns on a light. This macro is called by a motion detection trigger.

Anyway, I use an "Insteon" command to turn on the light. "FRONT_PORCH_LIGHTS" is a 2466D ToggleLinc Dimmer.

If I use the "Fast On" command, I get a syntax error right before this command is logged in the log file.

If I change that same Insteon command to an "On" command with a Send Keys value of 255, I do not get the syntax error.

I can reproduce this consistently.

This is the version that creates a formula syntax error:


insert into macroheader values ('PORCH_ON','Turn on porch lights',0,0,1);
insert into macrodetail values ('PORCH_ON',1,37,'',NULL,'Only turn on the porch lights at night',0,'');
insert into macrodetail values ('PORCH_ON',2,38,'',0,'ph_killmacrowait("PORCH_OFF")',0,'');
insert into macrodetail values ('PORCH_ON',3,27,'',NULL,'if(ph_getglobal_s("NIGHTTIME") = "YES","","SKIP")',0,'');
insert into macrodetail values ('PORCH_ON',4,32,'FRONT_PORCH_LIGHTS',18,'',0,'');
insert into macrodetail values ('PORCH_ON',5,26,'',NULL,'SKIP',0,'');
insert into macrodetail values ('PORCH_ON',6,39,'',NULL,'',0,'');


This is the version that does NOT produce a syntax error:

insert into macroheader values ('PORCH_ON','Turn on porch lights',0,0,1);
insert into macrodetail values ('PORCH_ON',1,37,'',NULL,'Only turn on the porch lights at night',0,'');
insert into macrodetail values ('PORCH_ON',2,38,'',0,'ph_killmacrowait("PORCH_OFF")',0,'');
insert into macrodetail values ('PORCH_ON',3,27,'',NULL,'if(ph_getglobal_s("NIGHTTIME") = "YES","","SKIP")',0,'');
insert into macrodetail values ('PORCH_ON',4,32,'FRONT_PORCH_LIGHTS',17,'255',0,'');
insert into macrodetail values ('PORCH_ON',5,26,'',NULL,'SKIP',0,'');
insert into macrodetail values ('PORCH_ON',6,39,'',NULL,'',0,'');

Can anyone see why the first produces a syntax error while the second does not?

Thanks!

Tom




Edited by bmwragtop - May 15 2009 at 20:47
Back to Top View bmwragtop's Profile Search for other posts by bmwragtop
 
bmwragtop
Newbie
Newbie
Avatar

Joined: March 30 2008
Location: United States
Online Status: Offline
Posts: 27
Posted: May 15 2009 at 20:55 | IP Logged Quote bmwragtop

I also seem to be getting the "Syntax Error in Formula: " error for all my Insteon "dim" commands in other macros.

If I comment out the "dim" commands, the syntax errors go away.

I'll see where else I am getting this type of formula error.

I am presently running version 2.1b.

Thanks,

Tom
Back to Top View bmwragtop's Profile Search for other posts by bmwragtop
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: May 15 2009 at 20:56 | IP Logged Quote grif091

The Insteon command syntax error is a known PH problem. It was identified in this Post topic as well as two or three others a few months back. Any command code, such as Off, Fast On, etc that does not accept a value in the Send Keys field results in a syntax error being logged. The Insteon command works. The assumption is this will be fixed in the next release.

__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 

Page of 2 Next >>
  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