Tuicemens

Pages: [1] 2

Author Topic: PCC commandline options.  (Read 9119 times)

Tuicemen

  • Administrator
  • Hero Member
  • *****
  • Helpful Rating: 26
  • Offline Offline
  • Posts: 3711
  • Making Home Automation Fun!
    • Tuicemen.com
PCC commandline options.
« on: January 09, 2011, 03:14:59 PM »

As promised in an other thread, the lists of current PCC commandline commands.
>Weather?<      Gets the current forecast and reads it.
>Time?<           Gets and reads current time.
>Calls?<           Reads the Calls log of phone calls recieved
>Reminder?<   Reads Reminders for that day
>Mail?<             Speaks current mail number , from, and subject if configured in the e-mail settings of PCC Note: Your Mail server needs to be cleared or it will report any mail still there as new.
>CD<                Plays a Music CD that is currently in the drive
>DVD<             Plays a DVD movie that is currently in the drive
>ReadText<    Removed once user created commandlines were added
>Upload<          Uploads the X10 log file to a website
>SendON<        Sends the On Command for House code set up as the Phone trigger
>SendOFF<       Sends the Off Command for House code set up as a phone trigger
>SENDPLC (housecode+Unitcode) (command)<  Sends a x10 PLC command to the address specified follow this with a space then the command EG: >SENDPLC A3 ON<
>SENDRF (housecode+unitcode) (command)<  Sends a x10 RF command to the address specified follow this with a space then the command EG: >SENDRF A3 ON<

Note: each command must be followed with a space then a value. The value indicates how
many time the command is executed. 0 is no repeats, 1 is one repeat and so on! ;)
send commands don't use the repeate value, in its place type the command to send
Square brackests may be used instead of the Carrot symbols are needed.
In A batch file the commands also need to be encased in Quotations but the batch file creator does that for you.
For WSR Macros the Quotations aren't needed.
I'm sure this Command list will grow with time
So I'll continue to update this list as it grows.
 (Chr)

List Updated:1/28/2011
« Last Edit: November 27, 2017, 12:42:23 PM by Tuicemen »
Logged
Get the inside scoop and member perks in the
Members Only Section!

Please don't email me Automation questions 
The forum is for that!

Tuicemen

  • Administrator
  • Hero Member
  • *****
  • Helpful Rating: 26
  • Offline Offline
  • Posts: 3711
  • Making Home Automation Fun!
    • Tuicemen.com
Re: PCC commandline options.
« Reply #1 on: January 09, 2011, 04:12:34 PM »

In order to get  PCC to speak a specific line of text In a batch file the command is. "your text you wish Spoken"
Note: You must use quotations both here and in WSR Macros
You also must follow this with a Value for the number of repeats you wish to hear.

Playing a sound file with a batch file is: The Sound file name & extention located in the PCC sounds folder plus a space and the value for number of repeats.
Note: no Quotations
Unfortunately Playing sound files threw PCC doesn't seem possible yet with WSR Macros But you can play them directly using a Sound macro which opens media player. Possibly using the advanced function and XML you could do this!
 (Chr)

Logged
Get the inside scoop and member perks in the
Members Only Section!

Please don't email me Automation questions 
The forum is for that!

Tuicemen

  • Administrator
  • Hero Member
  • *****
  • Helpful Rating: 26
  • Offline Offline
  • Posts: 3711
  • Making Home Automation Fun!
    • Tuicemen.com
Re: PCC commandline options.
« Reply #2 on: January 16, 2011, 11:13:17 AM »

With the newest release of AHP (3.304) it is now possible to use commandline paramiters!
Ok you could before you just had to use batch files which scared many! Not sure Why? ??? ::)
Having PCC play a sound file or any media file for that mater is simple.
In AHP select PcCompanion.exe as the start file
in the command line option type the media file name and extention followed by the number of times you wish it repeated.

Playing text or tts is a little more work.
since AHP won't allow Quotaion marks (") and PCC sees spaces as a new paramiter you need to group your whole text as one unbroken line.
But PCC will not read it correctly you say!
This is true, however if after each word you place a forward slash(/) PCC will see that as a break and read your text correctly.
As a sample
Hello/it /is/nice/to/see/you/again/Tom! 0

PCC will see it as "Hello it is nice to see you again Tom!" and not repeat as the zero tells it to speak the text only once.

Why go to the bother of switching from Batchfiles (if your useing them)
The simple answer is it's a smoother operation (the CMD window doesn't open)

As for sending commands to fetch weather and such AHP won't See less then greater then characters(<>)
So I may need to make some changes to the code.
Don't worry the changes I make won't affect anything you've already created in batch files!
Logged
Get the inside scoop and member perks in the
Members Only Section!

Please don't email me Automation questions 
The forum is for that!

Tuicemen

  • Administrator
  • Hero Member
  • *****
  • Helpful Rating: 26
  • Offline Offline
  • Posts: 3711
  • Making Home Automation Fun!
    • Tuicemen.com
Re: PCC commandline options.
« Reply #3 on: January 24, 2011, 12:56:22 PM »

PCC as of version 3.0.8.0
Can now make use of the AHP commandline options for tasks like fetching the weather,mail,callers....
To do this replace the > with [ and the < with ].
your command line paramiter for weather spoken once will now look like this:
[Weather?] 0

Why would you want to do this?
Using Batch files the CMD screen pops up taking the focus away from what ever else is open.
This way focus isn't changed from what you have open in Windows.
 (Chr)
Logged
Get the inside scoop and member perks in the
Members Only Section!

Please don't email me Automation questions 
The forum is for that!

Tuicemen

  • Administrator
  • Hero Member
  • *****
  • Helpful Rating: 26
  • Offline Offline
  • Posts: 3711
  • Making Home Automation Fun!
    • Tuicemen.com
Re: PCC commandline options.
« Reply #4 on: January 24, 2011, 02:35:19 PM »

Using command line options to send X10 commands is now possible!
The paramiters  are >SENDPLC (housecode)< command
replace SENDPLC with SENDRF inorder to send a radio frequency command.
Note: you can use Square Brackets or the less then/greater then symbols
A command to turn on module A3
would look like this:
>SENDPLC A3< ON
or
[SENDPLC A3] ON

Why would you wish to use these?
There probably are lots of instances where this could be used.
One that comes to mind is using WSR Macros.
 (Chr)
Logged
Get the inside scoop and member perks in the
Members Only Section!

Please don't email me Automation questions 
The forum is for that!

Tuicemen

  • Administrator
  • Hero Member
  • *****
  • Helpful Rating: 26
  • Offline Offline
  • Posts: 3711
  • Making Home Automation Fun!
    • Tuicemen.com
Re: PCC commandline options.
« Reply #5 on: January 28, 2011, 12:49:50 PM »

With the addition of the SendPLC and SendRF command line paramiters most RF and PLC  X10 commands are now possible.
If you find one that isn't that you'd like to use post it here and I'll see if I can add it! ;)
 (Chr)
Logged
Get the inside scoop and member perks in the
Members Only Section!

Please don't email me Automation questions 
The forum is for that!

Tuicemen

  • Administrator
  • Hero Member
  • *****
  • Helpful Rating: 26
  • Offline Offline
  • Posts: 3711
  • Making Home Automation Fun!
    • Tuicemen.com
Re: PCC commandline options.
« Reply #6 on: February 01, 2011, 12:15:53 PM »

well it looks like I'll need to add some code for PCC to speek a line of text!
I'm not sure why noone reported this!
Guess I'm the only one that uses that option with AHP commandline Paramiters.
The forward slash between words works for Windows 7 but fails in XP ::) :`)  (cB)
I'll add that to the next release!
 (Chr)
Logged
Get the inside scoop and member perks in the
Members Only Section!

Please don't email me Automation questions 
The forum is for that!

hpdrifter

  • Jr. Member
  • *
  • Helpful Rating: 0
  • Offline Offline
  • Posts: 14
Re: PCC commandline options.
« Reply #7 on: February 01, 2011, 07:41:44 PM »

I tried using the Command line "PCCompanion.exe" and the file name parameter; it no worky.

I get a flash of robot in the corner, but no execution.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • *****
  • Helpful Rating: 26
  • Offline Offline
  • Posts: 3711
  • Making Home Automation Fun!
    • Tuicemen.com
Re: PCC commandline options.
« Reply #8 on: February 01, 2011, 08:11:01 PM »

what OS are you using?
And what command did you try?
Logged
Get the inside scoop and member perks in the
Members Only Section!

Please don't email me Automation questions 
The forum is for that!

hpdrifter

  • Jr. Member
  • *
  • Helpful Rating: 0
  • Offline Offline
  • Posts: 14
Re: PCC commandline options.
« Reply #9 on: February 01, 2011, 09:06:36 PM »

Running XP Home with SP3.

------------cmd line------------C:\Program Files\PcCompanion\PcCompanion.exe
------------arguement----------PorchWarn.wav 0

without the ---cmd line--- and -----arguement------- of course.

The cmd line was entered via the "browse" button in the cmd line box in AHP macro.

The wav file is one I recorded on Sound Recorder.

The wav file is in PcCompanion folder\Sounds
« Last Edit: February 01, 2011, 09:27:42 PM by hpdrifter »
Logged

Tuicemen

  • Administrator
  • Hero Member
  • *****
  • Helpful Rating: 26
  • Offline Offline
  • Posts: 3711
  • Making Home Automation Fun!
    • Tuicemen.com
Re: PCC commandline options.
« Reply #10 on: February 01, 2011, 09:20:40 PM »

Okay your missing the repeat value!
with out it the commandline will fail.
the argument should be:
PorchWarn.wav 0
The zerro tellsl PCC to play the file only once if you want it repeated replace the zero with the value for the number of repeats you wish the file to be played!
 (Chr)


« Last Edit: October 25, 2011, 09:34:12 AM by Tuicemen »
Logged
Get the inside scoop and member perks in the
Members Only Section!

Please don't email me Automation questions 
The forum is for that!

hpdrifter

  • Jr. Member
  • *
  • Helpful Rating: 0
  • Offline Offline
  • Posts: 14
Re: PCC commandline options.
« Reply #11 on: February 01, 2011, 09:29:16 PM »

I had it on there, just forgot to include it in my descripton to you.
« Last Edit: February 01, 2011, 09:49:45 PM by hpdrifter »
Logged

Tuicemen

  • Administrator
  • Hero Member
  • *****
  • Helpful Rating: 26
  • Offline Offline
  • Posts: 3711
  • Making Home Automation Fun!
    • Tuicemen.com
Re: PCC commandline options.
« Reply #12 on: February 01, 2011, 09:48:50 PM »

humm never tested a wav file with the new AHP build since they added the commandline arguments(on XP) my XP machines were out of comission, Maybe they changed something!
I know the TTS files are screwed up you can use a forward slash in win7 but not in XP.
looks like I'll be busy coding tomorrow! (RoFL)
For now you can use a comma between words no space and it is understandable (somewhat)
Can you play a sound file from the PCC interface?
Is the volume in PCC set up by defalt it loads on some machines as a setting of zero.
Volume setting is in the options setup for voices.
 (Chr)
« Last Edit: February 02, 2011, 09:32:57 AM by Tuicemen »
Logged
Get the inside scoop and member perks in the
Members Only Section!

Please don't email me Automation questions 
The forum is for that!

hpdrifter

  • Jr. Member
  • *
  • Helpful Rating: 0
  • Offline Offline
  • Posts: 14
Re: PCC commandline options.
« Reply #13 on: February 01, 2011, 09:52:21 PM »

volume is set at 99 and yes, the interface will play the sound.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • *****
  • Helpful Rating: 26
  • Offline Offline
  • Posts: 3711
  • Making Home Automation Fun!
    • Tuicemen.com
Re: PCC commandline options.
« Reply #14 on: February 01, 2011, 10:05:52 PM »

okay just tested a sound triggered with AHP using the command line argument.
do you have PCC set to run only one instance?
and is PCC open when you try to trigger a commandline argument  or batch file?
If you wish too have PCC open and to have command line triggers this option must be unchecked!
Logged
Get the inside scoop and member perks in the
Members Only Section!

Please don't email me Automation questions 
The forum is for that!
Pages: [1] 2