Text to x10?

Started by davideinmd, November 30, 2009, 10:22:26 AM

Previous topic - Next topic

davideinmd


davideinmd

This shouldn't be so hard I would think for you buffs out there. I tried using Tuiceman's AlertDialer to accomplish a similar goal but I can't get that program to work. What I need:
I am on my way home and I want to use my phone to send an x10 command. How can I do it?

Tuicemen

Sorry to here AlertDialer won't work for you!
It's to bad they never set a standard for modems!

SMS is basically short email messages.
I can SMS my phone via outlook (Phone#)@(Phone serviceProvider)
If you can send email  you could configure outlook to fire a x10 code and a confirmation text back. Of coarse you'd want to pull off the road (If behind the wheel) to text! rofl
I suspect you'd have hit & miss luck with the wireless modem as well! :(
>!
Please Read Topic:
General Forum Etiquette
Before you post!

Knightrider

Remote control is cool,
but automation rules!

davideinmd

QuoteSMS is basically short email messages.
I can SMS my phone via outlook (Phone#)@(Phone serviceProvider)
If you can send email  you could configure outlook to fire a x10 code and a confirmation text back. Of coarse you'd want to pull off the road (If behind the wheel) to text!
I suspect you'd have hit & miss luck with the wireless modem as well!

Except this communication is going the wrong way...

Quotesee also:

http://forums.x10.com/index.php?topic=18256.0

I read this post and sent a message to see if he was still working on it but didn't get a reply.
I did, however find a program called GCALDaemon. http://gcaldaemon.sourceforge.net/usage14.html

However after a few hours of tweaking I was unable to get a batch file to run upon recieving the text message.

davideinmd

Now I have tried two other programs. RemoteByMail www.runtime.org and Tweet My PC http://tweetmypc.codeplex.com/ . With both these programs I get a response that says the command has been executed, but in reality it wasn't.  >*<

davideinmd

Ok, here we go. I found a program here http://www.gianniamato.it/grc/
This program requires almost no setup and I can text an email to gmail and it will run the batchfile that will turn my driveway lights on while I am on ,y way home. There are quirks. But if anyone wants the specifics, reply here and I will tell all! Weeeeeeeeeee! It works!!!!!!!

Knightrider

Not sure if SMS is my thing, but for education's sake, please share!
Remote control is cool,
but automation rules!

davideinmd

The link I posted has a link for a program called GMail Remote Command 1.0. It's a simple program that checks your Gmail account once per minute. The instructions for program are there too. I've made batch files with simple (short) names and put them in the c:\ drive root directory. Quoting Bill (of wgjohns.com):
Quoteahscript_setup.exe is a file provided in the AHP SDK that installs the basic ActiveX / COM scripting object and maybe the basic CM15A drivers (not so sure about that).

If you have installed the AHP SDK or even AHP itself already, ahscript_setup.exe won't do much for you.

ahcmd.exe is the command line interface for programs that can't handle ActiveX / COM to use to send X10 commands to the CM15A.  It is normally found in the "Program Files\Common Files\X10\Common" folder (or on 64 bit Windows, the "Program Files (x86)\Common Files\X10\Common" folder).
An example of the use of ahcmd.exe is: "ahcmd.exe sendplc a1 on"

That should help you create a simple batch file but I don't know where all the commands can be found. My purpose it that I need my driveway lights on when I get home and it's dark or I can't even see the driveway. So a few minutes before I get home I text the command to run the batch file to turn the lights on in the subject line. The text area remains blank. Downsides include that you have to delete the email when you get home. Also I think restarting the app is needed too. But once you do that you just can leave it on. It will only respond to subjects that start and end with the characters that you designate.

Tuicemen

davideinmd:
I believe the commands are in the SDK\help folder, Filename: ahscript.chm
problem is the ahcmd file is a little flaky not 100% reliable (just so you know).
>!
Please Read Topic:
General Forum Etiquette
Before you post!

davideinmd

Quoteproblem is the ahcmd file is a little flaky not 100% reliable
Ok, that may be true. Right after reading that, I fooled with it and A1 kept sending an RF OFF command. I unplugged my signal repeater/extender thing and do you know those lights just stayed lit! For almost a half hour, unplugged! I took the thing outside but that still didn't help. I tired for a half hour to fix it because nothing else would work. Then it just quit doing it and everything was normal again. I didn't enter the script for the new .bat file I was making and I think I caused a problem like that. But other than that it seems to work great! The value is like telling the house you are on your way home so turn on the outside lights and the lights in the kitchen. I keep as much turned off as possible when I am gone because with all these computers and the fish tank and the turtle pond and the chest freezer...ya know, electric is expensive! So anyway since I couldn't get a remote to work from the road and I needed the driveway lights to come on to find the driveway enterance and a motion sensor would be useless if it could reach because other traffic passing would keep turning them on, this was the best solution I could find. It just costs me a text message and a small amount of hassle with the program. But a better written program could make this a piece of cake. Anyhow, I'll try to post a step-by-step in the next reply. All of this makes me think of the S.A.R.A. project. Not only can the house know you are home, but it can know you are on your way! >!

HA Dave

Quote from: davideinmd on December 14, 2009, 01:21:50 AM
... I'll try to post a step-by-step in the next reply. All of this makes me think of the S.A.R.A. project. Not only can the house know you are home, but it can know you are on your way! >!

I like that!!!
Home Automation is an always changing technology

Tuicemen

QuoteBut a better written program could make this a piece of cake
So true!

If you only use one X10 HC command with your SMS (turn on\off drive way lights) there is a way around using the AHCMD and its flakiness!
Few use this option because it's not widely known, PCC can fire  a X10 signal via a batch file.
I added this when I first coded the Phone call options.
Go to Options\Event Triggers\Phone Ring triggers.
In the line send with ring choose the send option(PLC or RF), HC and UC
click OK
Now create a batch file Syntax is (path to PCC) (space) (">SendON<") (space) (number of times to send)
You can  send a Off command with ">SendOFF<"
Number of times to send you'd want 0
If you save the Batchfile to PCCs batchfile folder the bat file would look like this:

@ echo off
cd..
PcCompanion ">SendON<" 0


Not sure if this will help you!
Note: this option is available in the trial (locked) version of PCC
>!
Please Read Topic:
General Forum Etiquette
Before you post!

davideinmd

#13
Step 1: Download the GMail Remote Controller from http://www.gianniamato.it/grc/
Step 2: Extract the file. There is no installation. It's just a simple, stand-alone program
Step 3: Setup a GMail account. (You may want a special account just for X10 but that's optional)
Step 4: Create a batch file using notepad to execute the desired commands. Mine is called on.bat and looks like this:
d:\Users\David\Desktop\ahcmdmods\ahcmd.exe "sendplc" "b10 on"
d:\Users\David\Desktop\ahcmdmods\ahcmd.exe "sendplc" "b12 on"
d:\Users\David\Desktop\ahcmdmods\ahcmd.exe "sendplc" "b13 on"
* Be sure to save this in your c:\ root directory! (or E or F or whatever drive letter you use)
Step 5: Open the GRC.exe file
Step 6: Click 'Settings'
Step 7: Change the Subject Tag Left/Right to something easy (I use a hyphen for both)
Step 8: Click Login, fill out the blanks and click the 'Sign in' button
Step 9: Text an email to your GMail account. The command goes in your subject line. Do not put text in the body. (Ex: -c:\on-)
Step 10: Wait about 1-2 minutes and the commands will execute
Step 11: Delete the email from GMail and close GRC.exe
Step 12: Repeat steps 5-11 to reset the process.

Note: Since I am unable to make a text template insert in the subject field, I save a copy of the text message in my phone and forward it to GMail when I want it to run. This causes the subject to insert 'FW: ' so I make my Subject Tag Left 'FW: -'

Also note that d:\Users\David\Desktop\ahcmdmods\ahcmd.exe is just telling the bat file where ahcmd.exe is.

Good luck!

davideinmd

QuoteSo true!

If you only use one X10 HC command with your SMS (turn on\off drive way lights) there is a way around using the AHCMD and its flakiness!
Few use this option because it's not widely known, PCC can fire  a X10 signal via a batch file.
I added this when I first coded the Phone call options.
Go to Options\Event Triggers\Phone Ring triggers.
In the line send with ring choose the send option(PLC or RF), HC and UC
click OK
Now create a batch file Syntax is (path to PCC) (space) (">SendON<") (space) (number of times to send)
You can  send a Off command with ">SendOFF<"
Number of times to send you'd want 0
If you save the Batchfile to PCCs batchfile folder the bat file would look like this:

Code:
@ echo off
cd..
PcCompanion ">SendON<" 0

Kudos! If the ahcmd gives me (or anyone else real trouble, that will be the fix! Thanks Tuice!

SMF spam blocked by CleanTalk