X10 Community Forum

🖥️ActiveHome Pro => SDK => Third Party Add-Ons & Software => Topic started by: jimpster on October 15, 2010, 08:20:57 PM

Title: Google Voice SMS to control X10 devices
Post by: jimpster on October 15, 2010, 08:20:57 PM
I coded up a program that monitors my google voice account and sends x10 commands based on my predefined macros.  In other words I now have a (free) way to control my house devices via text message!  

I've only used it to send text msgs but in theory voice msgs should work too depending on how well google can translate  :P

Since google voice is now free for those in the US more you out there might be interested in playing with it.  There's no client program requirement -- you just need to be able to send a text msgs (or leave a VM).  The program runs on your computer and currently uses a com port interface (CM17A, firecracker).  If anyone out there wants a copy,  let me know and I'll find a place post/host the code.

EDIT: I made a site for the software: www.starbotcontrol.com.  I'm in the process of making a better version: GUI, usb (CM19A) support, etc.  To anyone out there who really wants to use this, I'm open to enhancement requests.    

EDIT: A USB version is now available at starbotcontrol.com download area.


 
Title: Re: Google Voice SMS to control X10 devices
Post by: pconroy on October 15, 2010, 08:37:10 PM
Way cool!!!




I've been on Grand Central (Google Voice) for a while now.
Sometimes the translations it makes are hilarious!  :)
Title: Re: Google Voice SMS to control X10 devices
Post by: spectroil on October 31, 2010, 10:00:50 PM
Hi,
I'm interested in your program... Please PM me a download site for test your idea..
Regards, :angel:
Title: Re: Google Voice SMS to control X10 devices
Post by: JMac on October 31, 2010, 10:11:52 PM
I am interested also.............
Title: Re: Google Voice SMS to control X10 devices
Post by: jimpster on October 31, 2010, 11:26:25 PM
Updated first post where to get the code.  Cheers!  >!
Title: Re: Google Voice SMS to control X10 devices
Post by: systemdm on November 01, 2010, 06:56:15 PM
jimpster,

The program sounds great.  Are you planning support for the CM15A?
Title: Re: Google Voice SMS to control X10 devices
Post by: jimpster on November 01, 2010, 08:18:23 PM
Working on it as we type...

I just need to get my hands on the h/w to test it.

Title: Re: Google Voice SMS to control X10 devices
Post by: IPS on November 01, 2010, 09:00:41 PM
Hi Jimpster

I too am interested how can I get it?
Thanks

IPS
Title: Re: Google Voice SMS to control X10 devices
Post by: jimpster on November 01, 2010, 09:59:49 PM
Hi IPS,

I updated the first post where you can get it.  www.starbotcontrol.com

Let me know how it works for you.


Title: Re: Google Voice SMS to control X10 devices
Post by: HA Dave on November 01, 2010, 11:15:42 PM
I updated the first post where you can get it.  www.starbotcontrol.com
Let me know how it works for you.

These user created programs... really make X10!!! The phone control idea has been around since X10 beginnings: http://www.x10.com/products/x10_tr16a.htm  And now X10 has introduced NEW software. Keep at it!

I myself use Voice Control (a great user created program)... using BVC (http://www.davesdomainonline.com/bvc/bvc.htm).
Title: Re: Google Voice SMS to control X10 devices
Post by: IPS on November 02, 2010, 08:36:51 PM
Thanks jimpster

unfortunately Google voice is not yet available in Canada.
Title: Re: Google Voice SMS to control X10 devices
Post by: jimpster on November 03, 2010, 11:12:04 AM
Thats more motivation to integrate twitter, ;)

BTW I got usb support working, just a few more kinks to work out then I'll update the download.
Title: Re: Google Voice SMS to control X10 devices
Post by: jimpster on December 02, 2010, 11:54:29 PM
Has anyone tried the download and got it to work.  It'd be great to hear feedback.  Or at least if anyone got it setup alright.
Title: Re: Google Voice SMS to control X10 devices
Post by: orcusomega on May 12, 2011, 02:30:30 PM
I just stumbled on this - will it work with the CM15A?

Thanks!

Bob
Title: Re: Google Voice SMS to control X10 devices
Post by: jimpster on May 12, 2011, 02:39:32 PM
It works with USB devices -- in the next version.  Although I don't have the CM15A, i have the cm19a which is usb.  I overhauled the lower level code to work with a generic x10 device driver, so it should work.  Any one want to donate a CM15A for testing?

As a side note, I haven't been able to devote much time to the project.  But if theres more interest, maybe that will like a fire under my fundillo...
Title: Re: Google Voice SMS to control X10 devices
Post by: joeperegrin on May 15, 2011, 08:22:55 AM
I can't speak for others but I am personally waiting eagerly for the updated release.  I have installed the application in December on the off chance that it would work with the USB device that I have.  My disappointment was apparent because I believe that this concept is awesome.  Home control via Google Voice.  Internet is nice, but this is Uber-Geekdom at its finest.  I know of many fellow geeks that I can impress with the fact that my home has its own phone number.

I wish I had a spare USB controller to help you test. 

Looking forward to the updated software release.  This is where I toss in an obligatory "if there is anything that I can do to help," knowing full well that that won't be possible until at least the second week of July due to professional demands.  But the offer is there.  :)
Title: Re: Google Voice SMS to control X10 devices
Post by: jrwhit on May 15, 2011, 05:08:59 PM
jimpster,
Consider me yet another X10'er interested in your CM15A support. I was sorely disappointed when I couldn't control my setup via Windows Messenger using X10Dispatcher any longer. This software sounds like it may be able to do this. Please keep us posted.
Title: Re: Google Voice SMS to control X10 devices
Post by: shuggins on May 19, 2011, 02:05:42 PM
Jimster,

I d/l'ed the software and got it all set up.  I can text my Google Voice phone number, and I see your program picking up the text as "lights on" just fine!!!  Alas, I have a CM19a (usb) so nothing happens.  IF you'd like, I can send you a cm19a in the mail (I have two extras I don't use) to test with.  Shoot me pm if interested.

This rules and I can't wait for next release!!

Scott
Title: Re: Google Voice SMS to control X10 devices
Post by: Tuicemen on May 19, 2011, 05:10:49 PM
Both the CM15A and CM19A will work for the program if using the SDK.
The only difference is the Cm15A will also send and recieve PLC.
 >!
Title: Re: Google Voice SMS to control X10 devices
Post by: Fan of Zappa on May 19, 2011, 11:06:11 PM
I installed starbotcontrol. I could not get it to work with CM15a. although I did find the following:
The log works! It logged correctly each and every time I text my Google voice number!
The Starbotcontrol matched my text only for lights on and lights off. I added another entry to the starbotconfig.csv file, where I found the lights on and lights off.  it did not recognize it.


It did not connect to com3 at all.
The error was "unable to open serial port com3".

Do I need to change the com3 port?
This looks like a great app!

Bob
Title: Re: Google Voice SMS to control X10 devices
Post by: shuggins on May 19, 2011, 11:25:19 PM
Guys-  in it's current state StarbotControl will ONLY work with the CM17A firecracker device.  It plugs into Com1, Com2, Com3, etc.   You can get them for $4.95 in a lot of cases on eBay.  X10 pretty much quit on that thing and went with the USB stuff (CM15A, CM19A).

So.....if you use CM15a, CM19a.....out of luck.  You need to have CM17A.

PS: You can use CM17A on your same computer that has the CM19a (or Cm15a) hooked up.....since it uses the Com port (which no one uses for anything anymore).

Software was written in Python (bizarre)....but it works....very well...

Think about this.... ANY cell phone...you text your Google Vm #, and bingo....  lights, cameras, anything..  Setting up a Google Vm acct (and phone #) was free for me.  I can help anyone needing to know what to do to get set up.

Good lord I like the possibilities of this thing....   
Title: Re: Google Voice SMS to control X10 devices
Post by: Noam on May 20, 2011, 07:00:42 AM
Guys-  in it's current state StarbotControl will ONLY work with the CM17A firecracker device.  It plugs into Com1, Com2, Com3, etc.   You can get them for $4.95 in a lot of cases on eBay.  X10 pretty much quit on that thing and went with the USB stuff (CM15A, CM19A).

So.....if you use CM15a, CM19a.....out of luck.  You need to have CM17A.

PS: You can use CM17A on your same computer that has the CM19a (or Cm15a) hooked up.....since it uses the Com port (which no one uses for anything anymore).

Software was written in Python (bizarre)....but it works....very well...

Think about this.... ANY cell phone...you text your Google Vm #, and bingo....  lights, cameras, anything..  Setting up a Google Vm acct (and phone #) was free for me.  I can help anyone needing to know what to do to get set up.

Good lord I like the possibilities of this thing....   

What about a CM11A? That ran off the serial port, too.
Title: Re: Google Voice SMS to control X10 devices
Post by: jimpster on June 27, 2011, 03:12:04 PM
Hey guys...

Sorry I haven't been around -- I wasn't getting these forum updates in my email inbox.  The next version is taking a while because I'm adding a lot of new features -- that and I haven't had much free time.  I'm happy to say my dev version works with USB devices.  I'm using a different way to communicate to the computers X10 device which restricts this to a Windows only product.  Out of curiosity, do most of you use Windows?

I also found that querying google voice needs to be throttled (like 1 every 10 seconds).  More reason for twitter support but thats not in the upcoming version.

Anyways, I'll keep you posted and will let you know when the next version is ready.  Meanwhile, let me know what platform you guys use, Mac, Windows, Linux, pogoplug??

Cheers
Title: Re: Google Voice SMS to control X10 devices
Post by: Knightrider on June 27, 2011, 05:42:42 PM
....  Meanwhile, let me know what platform you guys use, Mac, Windows, Linux, pogoplug??

Cheers


Win XP and OSX, but mostly XP.  I'd love to jump into the Linux world, but haven't worked up the nerve yet.  Been mulling it for the last decade.
Title: Re: Google Voice SMS to control X10 devices
Post by: HA Dave on June 27, 2011, 10:00:40 PM
.....Been mulling it for the last decade.

No reason to jump into anything too quick.
Title: Re: Google Voice SMS to control X10 devices
Post by: dbemowsk on June 27, 2011, 10:37:24 PM
....  Meanwhile, let me know what platform you guys use, Mac, Windows, Linux, pogoplug??

Cheers

My main computer that I use daily is a Fedora Linux box, but my HA PC is an XP box. 

Software was written in Python (bizarre)....but it works....very well...

I have not yet looked at the program but will soon.  Being that it is written in Python though could mean that it could be ported to work for the Linux/Heyu users out there.  Cross platform software...Gotta love it.
Title: Re: Google Voice SMS to control X10 devices
Post by: dbemowsk on June 28, 2011, 12:59:44 AM
OK, here is my feedback on this from what I had tested so far.  I luckily had a CM17A and an MR26A from years ago.  I plugged it into com1 on my HA PC.  I then edited the comport.txt file to read "com1" (no quotes) and saved it. Next I ran the StarBotControl.exe file and tried entering my GV username and password.  I apparently typed my password wrong, because I got the message below:

Code: [Select]
Traceback (most recent call last):
  File "StarBotControl.py", line 9, in <module>
  File "StarBotControl.py", line 5, in main
  File "Star10Bot.pyc", line 43, in Run
  File "googlevoice\voice.pyc", line 78, in login
googlevoice.util.LoginError

So we'll start here.  In this instance I would do some checks here in your code and provide some sort of error message with a return to the "Enter your Google Voice username:" prompt so that the user can make another attempt. 

Next, once the software successfully logged on to google voice, there was no prompt letting me know it was ready.  I just made the assumption that it was, so here you may want to prompt the user that the software is "Listening..." or something to that effect. 

I then texted "lights on" to my GV number and bingo bango within about 20 seconds I saw:
Code: [Select]
matched lights on
Trying to send command a4 on

This did nothing for me since I do not use HC A, so I edited the starbotconfig.csv file and set "bar lights on,i4 on",  and when I texted "bar lights on", voila, my bar lights came on.  You may want to send a text message response indicating that the command completed, or at least give the user that option with a configuration file.

All in all, the program needs some tweaks, but it has much potential.  It reminds me a bit of this YouTube video for project jarvis (http://www.youtube.com/user/ProjectJarvis?blend=3&ob=5#p/u/22/z-wFXv8tDX4) which is someone that has integrated a Mac mini into his twitter account and can do similar things.

Keep up the good work
Title: Re: Google Voice SMS to control X10 devices
Post by: jimpster on June 28, 2011, 09:49:26 PM
OK, here is my feedback on this from what I had tested so far.  I luckily had a CM17A and an MR26A from years ago.  I plugged it into com1 on my HA PC.  I then edited the comport.txt file to read "com1" (no quotes) and saved it. Next I ran the StarBotControl.exe file and tried entering my GV username and password.  I apparently typed my password wrong, because I got the message below:

Code: [Select]
Traceback (most recent call last):
  File "StarBotControl.py", line 9, in <module>
  File "StarBotControl.py", line 5, in main
  File "Star10Bot.pyc", line 43, in Run
  File "googlevoice\voice.pyc", line 78, in login
googlevoice.util.LoginError

So we'll start here.  In this instance I would do some checks here in your code and provide some sort of error message with a return to the "Enter your Google Voice username:" prompt so that the user can make another attempt. 

Next, once the software successfully logged on to google voice, there was no prompt letting me know it was ready.  I just made the assumption that it was, so here you may want to prompt the user that the software is "Listening..." or something to that effect. 

I then texted "lights on" to my GV number and bingo bango within about 20 seconds I saw:
Code: [Select]
matched lights on
Trying to send command a4 on

This did nothing for me since I do not use HC A, so I edited the starbotconfig.csv file and set "bar lights on,i4 on",  and when I texted "bar lights on", voila, my bar lights came on.  You may want to send a text message response indicating that the command completed, or at least give the user that option with a configuration file.

All in all, the program needs some tweaks, but it has much potential.  It reminds me a bit of this YouTube video for project jarvis (http://www.youtube.com/user/ProjectJarvis?blend=3&ob=5#p/u/22/z-wFXv8tDX4) which is someone that has integrated a Mac mini into his twitter account and can do similar things.

Keep up the good work


Thanks for the feedback.  I captured them in the feedback forum of starbotcontrol.com so that I won't lose them!

Title: Re: Google Voice SMS to control X10 devices
Post by: jimpster on June 29, 2011, 09:24:06 PM
USB version of starbotcontrol:

Instead of waiting to jam pack the next build with a GUI, etc., I built an interim version of starbotcontrol with usb support instead of com. 

Try it out:
http://starbotcontrol.com/index.php?option=com_phocadownload&view=category&id=1&Itemid=5 (http://starbotcontrol.com/index.php?option=com_phocadownload&view=category&id=1&Itemid=5)

After you unzip

1. Edit the macros in .\utilities\starbotcontrol.csv
2. Launch the exe from a command window.  You can double click the exe too, but you may not get to see all the messages if it exits unexpectedly.
3. Don't delete or move the utilities folder
4. Enjoy and give me some feedback, enhancement requests, beer, $, prayers

Cheers
Title: Re: Google Voice SMS to control X10 devices
Post by: shuggins on June 29, 2011, 09:57:49 PM
Jim,

Awesome to hear!  I willl give it whirl tonight.  I assume this ONLY uses usb and we cannot use CM17a at all anymore?   Was just curious...

I will give feedback soon.


EDIT:  Nevermind, I noticed you have BOTH (com and usb) versions on your download page.
Title: Re: Google Voice SMS to control X10 devices
Post by: dbemowsk on June 30, 2011, 06:58:19 PM
I have a suggestion for an add-on to this.  Being able to text a status request for a module and have it text back the status.  I have an app called Drive Safely on my BB curve and it will read text messages and e-mails to me as they come in.  The two together would be KICK A**.
Title: Re: Google Voice SMS to control X10 devices
Post by: shuggins on June 30, 2011, 11:20:12 PM
Jim,

Alright, the past 24 hours I have had some good times with StarbotControl.  First of all, what a brilliant idea...  The set up was a cinch and the first time it worked I just went bonkers....   so cool!   But after that....several anomalies....  some of which might not be the software's fault.


Again, bravo...and I sure hope you continue to work on this.  I have a case of beer in your name!

Scott
Title: Re: Google Voice SMS to control X10 devices
Post by: jimpster on July 01, 2011, 02:13:43 AM
I got a handle on the issues you mentioned.  The repetition of all your command history has to do with the way that gvoice remarks the entire conversation as Unread -- hence causing all commands in prior messages from the same sender to behave as if they were never read.  The lower case issue should be easy -- who texts in all caps?? :P

Some of the enhancements will be in the bigger update I'm working on.  Meanwhile give me a day or weekend to fix the bugs you mentioned.   Bravo back for the feedback!

BTW, my real name is John.  Jimpster is a random username I use. Hehe.
Title: Re: Google Voice SMS to control X10 devices
Post by: shuggins on July 01, 2011, 04:15:06 PM
John,

One more thing that might help in debugging - it seems to work a lot better if you send the text and then immediately get out of text mode on phone.  On my iPhone I open up the text sender, send my text macro and immediately send.  My thoughts are that the text app is immediately marking it as read on GOOGLE SMS server upon receiving the text.  Just an idea....
Title: Re: Google Voice SMS to control X10 devices
Post by: dbemowsk on July 03, 2011, 07:30:13 PM
If you have your phone set up to receive your GV texts, that may be the issue.  IF your phone picks up the text before StarBot does, that could be part of the issue.
Title: Re: Google Voice SMS to control X10 devices
Post by: shuggins on July 04, 2011, 08:33:42 AM
Ahhhh...    that might be part of the issue.  Good catch.  Let me check on that.   If I text and then exit the text app, it works a bit better....   Hey dbemowsk, you still doing RemoteWatch X10?  I remember that app and it was good- did you get more done on it?
Title: Re: Google Voice SMS to control X10 devices
Post by: dbemowsk on July 04, 2011, 09:43:39 AM
Not to completely hijack this thread for RemoteWatch, but I want to get back into it soon.  I have some new ideas I want to try.  I am going to see if I can juggle it in between the other app I am working on.
Title: Re: Google Voice SMS to control X10 devices
Post by: jimpster on July 06, 2011, 12:00:06 AM
I updated the USB version with a fix to the multiple commands issue mentioned by shuggins.  Now messages are moved to the trash if they are recognized to have a starbotcontrol macro.  In the future there will probably be an option to decorate your macros with a keyword, for example: x10:lights on  or >>lights on<<.  This would make it better for starbot to identify real commands rather than responding to an SMS that might happen to have a special phrase.

Note: starbotcontrol upon bootup marks all messages in your SMS inbox read -- this is to avoid blasting stale commands waiting in your inbox. This will probably change for the better in the future.

Cheers!

Title: Re: Google Voice SMS to control X10 devices
Post by: jimpster on July 06, 2011, 12:01:55 AM
I have a suggestion for an add-on to this.  Being able to text a status request for a module and have it text back the status.  I have an app called Drive Safely on my BB curve and it will read text messages and e-mails to me as they come in.  The two together would be KICK A**.

This can be done with queryplc right?  Right now I don't have the device to test this, but certainly is doable.  I'll keep it on the list of enhancements.
Title: Re: Google Voice SMS to control X10 devices
Post by: shuggins on July 06, 2011, 08:04:44 PM
jimpster,

Installed new version and gave it a try (lots of tries, heehee....).     This works much better and much more consistently.  It was good at marking older texts as read and not repeating the same commands over and over.  Also, I noticed it is completely case "insensitive now".  So if I mix case, it certainly still recognizes it if the macro in the startbotcontrol.csv is all lower case, for example.  I LIKE THAT A LOT actually, as iPhone (and many smart phones) try to upper-case letters it thinks it should do so for.

WELL DONE, jimpster!  I can see me using this a ton.  Can't wait to see what else you come up with.  I still think a config entry of some sort would be nice to be able to throttle the amount of time (currently at 10 seconds) it waits before checking google voice inbox.  Just my 2 cents....
Title: Re: Google Voice SMS to control X10 devices
Post by: Aquadeveloper on August 04, 2011, 01:52:34 PM

Hi,

Can the  program using an X10 - CM17 (etc) SEND a text message to a google voice number?   I want to get alarm alerts using GV.

Thanks for any info!! >! >!