Author |
|
smarty Super User
Joined: May 21 2006 Location: United States
Online Status: Offline Posts: 728
|
Posted: November 04 2006 at 13:40 | IP Logged
|
|
|
See the Caller ID macro pasted in below. This has stopped working since I upgraded to version 3.49. I have not fooled with the modem or com ports......I not sure why this is happening (or even a decent way to trouble shoot it).
The first macro is the STARTUP macro (to open the com port). It fires at PH startup....it seems OK (no errors on PH start up).
The second macro is where I think the problem is. After the phone rings and rings and rings, I check the events log and I can see where the macro has fired, but it seems that the macro does NOT make it ALL the way through the command sequences (it never calls the PHONELOG_WRITE macro at the end).
It seems like some of the behavior of the commands has changed slightly (a guess).
STARTUP:
insert into macroheader values ('STARTUP','STARTUP CALL ID MACRO',0,0,0);
insert into macrodetail values ('STARTUP',1,38,'',1,'ph_comopen(4,4,115200,"N", 8, 1, 1, 0, 0, 1, 0, 1, 1, "?","PHONELOG_CHECK")',0,'');
insert into macrodetail values ('STARTUP',2,38,'',1,'ph_comsendstring(4, "AT+VCID=1\013")',0,'');
PHONELOG_CHECK:
insert into macroheader values ('PHONELOG_CHECK','CID MACRO',0,0,0);
insert into macrodetail values ('PHONELOG_CHECK',1,15,'[TEMP1]',NULL,'""',0,'');
insert into macrodetail values ('PHONELOG_CHECK',2,26,'',NULL,'Next',0,'');
insert into macrodetail values ('PHONELOG_CHECK',3,15,'[LOCAL1]',NULL,'ph_comrecvchar( 4 )',0,'');
insert into macrodetail values ('PHONELOG_CHECK',4,15,'[LOCAL2]',NULL,'string( "[LOCAL1]" )',0,'');
insert into macrodetail values ('PHONELOG_CHECK',5,16,'',NULL,'if( "[LOCAL2]" = "-3", 3, 1)',0,'');
insert into macrodetail values ('PHONELOG_CHECK',6,15,'[TEMP1]',NULL,'"[TEMP1]" + char( integer( "[LOCAL1]" ))',0,'');
insert into macrodetail values ('PHONELOG_CHECK',7,27,'',NULL,'"Next"',0,'');
insert into macrodetail values ('PHONELOG_CHECK',8,15,'[TEMP1]',NULL,'ph_replaceall( "[TEMP1]", "RING", "")',0,'');
insert into macrodetail values ('PHONELOG_CHECK',9,16,'',NULL,'if(match("[TEMP1]","DATE"),1,999)',0,'');
insert into macrodetail values ('PHONELOG_CHECK',10,37,'',NULL,'Get rid of all <CR><LF>''s',0,'');
insert into macrodetail values ('PHONELOG_CHECK',11,15,'[TEMP3]',NULL,'ph_replaceall( "[TEMP1]", char(13) + char(10), " " )',0,'');
insert into macrodetail values ('PHONELOG_CHECK',12,10,'CID FULL',NULL,'string("[TEMP3]")',0,'');
insert into macrodetail values ('PHONELOG_CHECK',13,15,'[TEMP1]',NULL,'pos( "[TEMP3]", "NAME = " ) + 7',0,'');
insert into macrodetail values ('PHONELOG_CHECK',14,15,'[TEMP2]',NULL,'pos( "[TEMP3]", "NMBR = " )',0,'');
insert into macrodetail values ('PHONELOG_CHECK',15,37,'',NULL,'Get Name',0,'');
insert into macrodetail values ('PHONELOG_CHECK',16,15,'[LOCAL1]',NULL,'mid( "[TEMP3]", [TEMP1], [TEMP2] - 2 - [TEMP1] )',0,'');
insert into macrodetail values ('PHONELOG_CHECK',17,37,'',NULL,'Get Number',0,'');
insert into macrodetail values ('PHONELOG_CHECK',18,15,'[LOCAL2]',NULL,'mid( "[TEMP3]", [TEMP2] + 7, 10 )',0,'');
insert into macrodetail values ('PHONELOG_CHECK',19,37,'',NULL,'Replace name sent w/ name listed in CID.ini file if it exists, if not use name sent',0,'');
insert into macrodetail values ('PHONELOG_CHECK',20,15,'[TEMP1]',NULL,'profilestring( "c:\program files\powerhome\cid.ini", "names", "[LOCAL2]", "" )',0,'');
insert into macrodetail values ('PHONELOG_CHECK',21,15,'[LOCAL1]',NULL,'if( "[TEMP1]" = "", "[LOCAL1]", "[TEMP1]")',0,'');
insert into macrodetail values ('PHONELOG_CHECK',22,37,'',NULL,'Announce call',0,'');
insert into macrodetail values ('PHONELOG_CHECK',23,38,'',1,'ph_tts("call from " + "[LOCAL1]" + " call from " + "[LOCAL1]")',0,'');
insert into macrodetail values ('PHONELOG_CHECK',24,10,'CID NAME OR SUBNAME',NULL,'string("[LOCAL1]")',0,'');
insert into macrodetail values ('PHONELOG_CHECK',25,38,'',1,'ph_setccbtn("TELEPHONE", 1, string( "Call from " + "{CID NAME OR SUBNAME}" ), -1, -1, -1, -1, 0, 255, -1)',0,'');
__________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: November 04 2006 at 16:35 | IP Logged
|
|
|
I'm seeing this too. ph_comrecvchar is returning 0's and then the -3.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: November 06 2006 at 12:56 | IP Logged
|
|
|
Tony and Steve,
A small change was made in the 1.03.4.9 version to eliminate a critical error that Noel was receiving. This shouldnt have affected you guys, but apparently did. Ive put together a patch for the phuo.pbd module to try to solve the problem for everyone using a different route. Test it for me and let me know how it goes.
Download this file: http://www.power-home.com/download/phuo.zip. Shutdown PowerHome and rename your existing phuo.pbd file. Unzip the one in the download into your PH directory. Restart PowerHome.
Let me know if this fixes you or not. Noel, if you're reading this, please do the same as I'd like to make sure that this doesnt break what we just fixed for you.
Thanks,
Dave.
|
Back to Top |
|
|
smarty Super User
Joined: May 21 2006 Location: United States
Online Status: Offline Posts: 728
|
Posted: November 06 2006 at 21:01 | IP Logged
|
|
|
Tried it. Looks like there are some bugs still in it. I sent you some "Critical Error" e-mails.
Steve
__________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: November 13 2006 at 15:08 | IP Logged
|
|
|
Guys,
Got all the emails and such. Definately need to rename the original file back.
Anyways, appreciate the testing, I think Ive got the problem fixed. It's definately a problem I created in the last version. As a temporary fix, you can try changing the datatype parameter in the COMOPEN function from binary to character. It might be get you going until I get a patch out.
HTH,
Dave.
|
Back to Top |
|
|
smarty Super User
Joined: May 21 2006 Location: United States
Online Status: Offline Posts: 728
|
Posted: November 21 2006 at 19:52 | IP Logged
|
|
|
It appears that by changing the data type parameter, the above macro now works.
Thanks!
__________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: November 21 2006 at 21:21 | IP Logged
|
|
|
Cool! I forgot about this fix! Lucky I saw this again.
|
Back to Top |
|
|
nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: December 19 2006 at 18:09 | IP Logged
|
|
|
Tony and Smarty,
I just purchased a USB external modem so I could TSS caller id. Tony your macro(s) work well, except for the name. Which data type parameter do you have to change so that you get the name instead of -3?
Thanks.
Noel
P.S. You should post your complete macro in Dave's new macro section. It is a worthy addition.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 19 2006 at 20:46 | IP Logged
|
|
|
You need to change the ph_comopen line to this...
ph_comopen( 4, 3, 9600, "N", 8, 1, 1, 0, 0, 0, 0, 1, 1, "?", "CID2" )
Replace CID2 with the name of your CID macro.
I'm still trying to figure out a good way to move all of my macros and such in there.
|
Back to Top |
|
|
nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: December 19 2006 at 21:13 | IP Logged
|
|
|
Thanks, Tony. I had thought that was the parameter that needed to be changed and I had already changed that, but to no avail. I do get the phone number,date and time in the log but I don't get the name. I'm not a programmer so I just have to go through the code line by line and see if I can figure out something. But I have to wait until tomorrow so I can keep calling the phone in question without it constantly ringing.
|
Back to Top |
|
|
nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: December 20 2006 at 16:55 | IP Logged
|
|
|
Just wanted to report that I got it to work. The formula on line 150
('CID',15,15,'[LOCAL1]',NULL,'mid( "[TEMP3]", [TEMP1], [TEMP2] - 2 - [TEMP1] )',0,'');
Did not import correctly - the last 7 characters of the formula didn't make it into the macro for some reason. Anyway, once I figured it out, all worked well. It's a very kool macro.
Thanks.
|
Back to Top |
|
|
|
|