Author |
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: September 14 2007 at 10:27 | IP Logged
|
|
|
All,
Ive taken TonyNo's CID macro code and used it as the basis of a CID plugin for PowerHome. You can download it here: http://www.power-home.com/download/ph_cid.zip.
The Launch Data (ActiveX Classname) is: PH_CID.phcid. The plugin takes 3 initialization parameters separated by a single space. The port, the settins, and an Initialization string. You can leave the Init string blank if one is not required. The Initialization parameter for my particular voice modem on COM3 is:
Whenever CID information is available, the plugin will fire a generic plugin trigger on Command 1, option 1. The CID number will be available in [TEMP5] and the CID name will be available in [TEMP10].
I have not yet incorporated TonyNo's Name substitution INI, but plan to do so. What Im looking for is feedback on any other features that should be added to the plugin as well as any other CID formats that are not currently supported by the plugin. I'd like this plugin to be completely generic, able to work with any CID format, but am not aware of any others than the one Tony posted which is the same format that my modem uses.
Let me know,
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: September 14 2007 at 12:35 | IP Logged
|
|
|
Would there be any reason to pass the date and time sent by the CID device via TEMP's also?
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: September 14 2007 at 13:32 | IP Logged
|
|
|
Tony,
How've you been?
I thought about that and couldnt think of a good reason to do it. The modem is essentially just sending the system time which is already available within the trigger. If it's something you want though, I could add it. They would either have to be passed using numbers (such as seconds after midnight and days since a certain date) or be concatenated to either the number or name fields.
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: September 14 2007 at 17:48 | IP Logged
|
|
|
Dave,
Been OK! You?
Doesn't the date and time get transmitted from the telco?
|
Back to Top |
|
|
twomble Groupie
Joined: January 07 2007 Location: United States
Online Status: Offline Posts: 45
|
Posted: September 15 2007 at 11:38 | IP Logged
|
|
|
Dave here’s an addition feature you could add. I’m currently using Tony’s macro and love it. I’ve changed the name substitute ini file and macro a bit to add an additional feature. What I’ve done is added an auto hang-up for telemarketing calls. Any time we receive a new telemarketing call I just add the phone number and the name “telemarketer” in the ini file. The next time we get a call from that number the macro sends the command to take the modem off hook, wait 1 second, and then hang up. Using TTS I also announce over the house intercom that a telemarketing call was just hung up on. This has been working great and makes everyone in the house laugh when it happens. I have over 50 telemarketing numbers in the ini file now and it grows by a few every week.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: September 15 2007 at 12:59 | IP Logged
|
|
|
Wow! Nice addition!
One of these days, I'll add some hardware to not even ring the phones when those calls come in.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: September 15 2007 at 16:54 | IP Logged
|
|
|
Tony,
Hmmm...you may be right about the date and time coming from the telco. I never though of that. I'll run some tests and confirm and if it's different then I'll parse the data and add it to the trigger.
In the meantime, Ive made some changes to the CID plugin and we're now up to version 1.7. Same download link as above. Ive incorporated Tony's name substitution and Twombles hangup code. Nice features!!
The plugin still has the same launch data: PH_CID.phcid but the Init data is changed. The Init data should now contain the full path and filename of the phcid.ini file (now included in the latest zip). You should just extract both the ph_cid.ocx and phcid.ini files to the plugins directory beneath the PowerHome directory. Be sure and edit the phcid.ini file and enter the proper values for your particular modem. In addition to supporting hopefully MOST voice modems, the plugin now also supports the NetCallerID box. Be sure and set the format=2 for the NetCallerID box. Most of the settings in the phcid.ini file should be self-explanatory, ask if you have any questions or problems.
Also, I forgot to mention it, but after you've extracted the plugin to the plugins directory, you must also register it before use. If you extracted to the default directory, the command to do this is:
Code:
regsvr32 "c:\program files\powerhome\plugins\ph_cid.ocx" |
|
|
Just copy and paste this code into the command box launched from your windows Start->Run.
Let me know how it goes,
Dave.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: September 15 2007 at 17:02 | IP Logged
|
|
|
Oopps, almost forgot. With the new CID plugin, if a call is hungup on, in addition to the standard command 1, option 1 trigger announcing the CID, you'll also get a command 1, option 2 trigger with the same info for hungup calls.
Dave.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: September 15 2007 at 17:54 | IP Logged
|
|
|
Dohh!! I forgot one other thing. I also enabled command 1 so that you can actually send commands to the voice modem. I use this with timed events to automatically have PowerHome trigger Vonage's Do Not Disturb on the weekends when my wife and I sleep in.
For those interested, these are the functions I use with my CID plugin identified with an ID of "CID"
To enable DND:
Code:
ph_picmd(5,"CID",1,0,0,"atdt *78,,,1\013","") |
|
|
This disables DND on Vonage:
Code:
ph_picmd(5,"CID",1,0,0,"atdt *79,,,1\013","") |
|
|
The command 1 for the plugin allows you to use the escape character "\" to prefix a 3 digit decimal ASCII code. You can also use "\x" to prefix a 2 digit hex ASCII code.
Ive also enabled command 2 which will send the string with no binary interpretation and automatically follow it with a carriage return. The enable DND command above using the command 2 method would be:
Code:
ph_picmd(5,"CID",2,0,0,"atdt *78,,,1","") |
|
|
Hope this helps,
Dave.
|
Back to Top |
|
|
nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: September 15 2007 at 22:29 | IP Logged
|
|
|
I wanted to get in on the CID fun. Unfortunately, my PC crashed and burned in the middle of the night last night. After many hours of work I determined it's the motherboard and ordered a new one. I took out a very old laptop and am configuring it for email and hopeful PH by tomorrow.
Anyway, I am also a happy user of Tony's CID macro with some modifications. But, I'd like to try the plugin just to see how plugins work. I have a couple of questions.
After the the phone rings and the trigger/plugin executes it is not clear to me how you access the data in Temp5 and Temp10 variables. Can someone spell this out for me? Since I don't have PH to look at at the moment, does the trigger fire and then execute a macro? I'm guessing that's it. But it was unclear to me.
Also, a more generic question. I understand how the plugin is easier to setup then the CID macro and executes in its own thread thus not taking PH resources, other than those 2 things is there any other advantage to using the CID plugin rather than the CID macro? (Just curious).
Hopefully I will be able to run PH on this old laptop and figure out these answers myself, but as I said, I wanted to get in on the CID 'fun'.
THANKS!
Noel
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: September 15 2007 at 23:54 | IP Logged
|
|
|
Noel,
Sorry to hear about your machine . Hopefully you didnt lose your database because I know you've invested alot of work.
After the phone rings, the plugin will fire a generic plugin trigger. If you don't have a trigger defined, then the plugin won't do anything. Under triggers, just define a "Generic Plugin" trigger with "Command 1", "Option 1". You can make the action be a macro or a formula or whatever you like. When the trigger is called, the plugin will "stuff" the caller ID number and the caller ID Name in the [TEMP5] and [TEMP10] variable respectively which will then be available for use in the macro or formula that the trigger calls.
Other than the two reasons listed above, no real other advantages. The separate thread is a biggie though because if something was to hang with the COM port, then PowerHome would continue on unaffected. Being a plugin, you could get alot more sophisticated in the code, more so that you probably could in a PowerHome macro.
Good luck and I hope you get your system back up soon.
Take care,
Dave.
|
Back to Top |
|
|
nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: September 16 2007 at 08:01 | IP Logged
|
|
|
Thanks Dave.
PH is up and running on my laptop! I do have a DB which I recovered from an email I sent to you several weeks ago. So I'm good for now. I don't have the RS232 part because the laptop has no RS232 ports but the Insteon stuff works great. When I shut down PH on the laptop the SDM remains open. This occurs on my PC as well.
Thanks again.
Noel
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: September 16 2007 at 20:31 | IP Logged
|
|
|
So, both triggers fire on an identified telemarketer?
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: September 17 2007 at 10:17 | IP Logged
|
|
|
Essentially, yes. The Command 1, Option 1 trigger fires on ALL incoming CID's. The Command 1, Option 2 trigger will fire ONLY on the CID's that were hungup on. Just in case you wanted some extra processing such as special logging or a TTS announcement.
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: September 17 2007 at 14:43 | IP Logged
|
|
|
OK, thanks. I just added a line of code to my macro to drop out on a telemarketer call.
|
Back to Top |
|
|
sharby Groupie
Joined: May 13 2007 Location: United States
Online Status: Offline Posts: 50
|
Posted: September 23 2007 at 02:40 | IP Logged
|
|
|
Is it possible to attach the telemarketer phone # list? I'd like to add my spamming numbers to it also. Thank you.
-=*Sharby*=-
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: September 23 2007 at 11:36 | IP Logged
|
|
|
Interesting! The idea was to use your own numbers, but I like the angle of sharing.
I can see one problem, though, and that is if the list gets too big with numbers that may never call you.
Here are my numbers...
8009010795=***Telemarketer
6512566181=***Telemarketer
8009272291=***Telemarketer
8006790336=***Telemarketer
8663960388=***Telemarketer
8007304645=***Telemarketer
Dave: One thing I just noticed, is that I format my numbers for display/logging with dashes. Can the plugin handle numbers with them in the ini file?
Edited by TonyNo - September 23 2007 at 11:38
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: October 03 2007 at 15:08 | IP Logged
|
|
|
Tony,
With the creation of the xPL plugin and the patch to allow [LOCAL] variables to contain data on a trigger, I should be able to include the date and time if you're still interested.
Also, wasnt quite sure by what you meant about the display/logging with dashes. I currently just use the formula: string("[TEMP5]","@-@@@-@@@-@@@@") to format the number for display within PowerHome. Are you asking if the plugin can do the formatting internally?
Thanks,
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: October 03 2007 at 17:56 | IP Logged
|
|
|
Don't worry about the date/time. Not a big deal since no one seconded it!
I'm being lazy!
I format call data on a web page with the dashes so it's easier to read. I'm hoping to be able to just copy and paste certain numbers into the INI file without deleting the dashes.
|
Back to Top |
|
|
UpstateMike Senior Member
Joined: February 18 2006 Location: United States
Online Status: Offline Posts: 142
|
Posted: October 30 2007 at 13:27 | IP Logged
|
|
|
Just curious, if I was to hook up 4 NetcallerID units would they all write to TEMP5 and TEMP10? Don't think this would be a problem, just wondering that is how it works?
|
Back to Top |
|
|