X10 Community Forum

🖥️ActiveHome Pro => SDK => Third Party Add-Ons & Software => Topic started by: dbemowsk on July 06, 2011, 12:45:14 AM

Title: text2x10, Text messaging to operate your X10 devices.
Post by: dbemowsk on July 06, 2011, 12:45:14 AM
I don't want to take the thunder away from jimpster who started a program similar to this called StarBotControl, but I got to fooling around in PHP with some of the ideas that he had and came up with a similar command line script that works for me.  The program is called text2x10 and uses the AHSDK with the CM15A and a Google Voice account.  The program can not only control your X10 equipment, but it can respond back with status messages.  I hope jimpster can look at this and get ideas to greatly improve on his program, because there is so much that could be done with this idea.  The PHP files have lots of comments.  feel free to modify the program to suit your needs.

Download text2x10 here (http://www.phpwebscripting.com/phpwebsite/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=10&MMN_position=36:33)
Title: Re: text2x10
Post by: shuggins on July 06, 2011, 01:36:32 PM
Hi dbemowsk,

I gave this a whirl on lunch break.  At first it was complaining about not finding items in ./include/ and ./ext/ sub folders.  I noticed that the zip did not include the folder paths, so when I unzipped, it put everything in the root folder - no subdirectories were made.  So I guessed at it and put things in /include/ and /ext/ sub directories that I created.  Then when I typed in text2x10.php with my gv user/pw, it asked me to select a program to open it up on my machine.  So, I navigated to the php.exe, and then it executed your program (it just needed to be associated to php.exe the first time - fyi for everyone else out there that might see this).

Finally, it tried to run, and I get this (and yea, I did supply my gv user and pw). I honestly wonder if me trying to create all those required subfolders manually has anything to do with this?

Google Voice text message to X10 translator

PHP Notice:  Undefined offset:  0 in C:\text2x10\text2x10.php on line 205

Notice: Undefined offset:  0 in C:\text2x10\text2x10.php on line 205
There is no stored username and password for the system to use.
If using the script for the firs time, you must include your
Google Voice login information:

text2x10 <GV username> <GV password>



















Title: Re: text2x10
Post by: dbemowsk on July 06, 2011, 02:10:57 PM
I'll look into these things when I get home.
Title: Re: text2x10
Post by: dbemowsk on July 07, 2011, 12:20:46 AM
Hi dbemowsk,

I gave this a whirl on lunch break.  At first it was complaining about not finding items in ./include/ and ./ext/ sub folders.  I noticed that the zip did not include the folder paths, so when I unzipped, it put everything in the root folder - no subdirectories were made.  So I guessed at it and put things in /include/ and /ext/ sub directories that I created.  Then when I typed in text2x10.php with my gv user/pw, it asked me to select a program to open it up on my machine.  So, I navigated to the php.exe, and then it executed your program (it just needed to be associated to php.exe the first time - fyi for everyone else out there that might see this).

Finally, it tried to run, and I get this (and yea, I did supply my gv user and pw). I honestly wonder if me trying to create all those required subfolders manually has anything to do with this?

Google Voice text message to X10 translator

PHP Notice:  Undefined offset:  0 in C:\text2x10\text2x10.php on line 205

Notice: Undefined offset:  0 in C:\text2x10\text2x10.php on line 205
There is no stored username and password for the system to use.
If using the script for the firs time, you must include your
Google Voice login information:

text2x10 <GV username> <GV password>

OK, I tried installing this on 2 different machines and did not have a problem with either install.  The folder structure on both installs was fully created.  First, I am curious about the first steps you took to unzip the file, like what program you used (e.g. 7zip, pkzip, windows explorer ? ? ?)?  There had to be a reason why it didn't keep the folder structure in tact when you unzipped it.  Also, you mentioned that you typed text2x10.php with your GV username and password.  This is NOT correct.  There is a batch file named text2x10.bat, so you only need to type "text2x10 with your GV username and password".

The two times I installed it, I simply opened the text2x10.zip file in windows explorer and dragged it to the root of c:\.  I then had a c:\text2x10_dist\ folder.  I navigated to the c:\text2x10_dist\ folder in a DOS command prompt (cmd) window and typed :

Code: [Select]
text2x10 user@host.com password
Where "user@host.com" was my GV username and "password" was my GV password, and got the message:
Code: [Select]
The Google Voice username and password have been saved.
The next time you run the script, you only need to run:
text2x10
If you need to change the stored Google Voice username and
password simply run:
text2x10 <GV username> <GV password>
and the system will update the user information.

Listening

When typing your GV username and password, do not use the <>.  By default, the text2x10.cfg file has BEVERBOSE set to 1, so you should see messages displayed on the screen as the program does things.

I have made one minor code change to something that was ECHOing to the screen that shouldn't have been and I updated the zip file and got rid of the _dist, so future downloads will have c:\text2x10\ (if extracted to the c:\ root folder).  

My only suggestion I have for the moment is to try removing the folder and structure you created and try unzipping it again.  I used windows explorer to create the zip initially, and also to extract it when doing the two tests.   I am speculating that a support file didn't get extracted correctly, especially since you had to create some of the sub-folders.
Title: Re: text2x10
Post by: dbemowsk on July 07, 2011, 12:45:50 AM
Shuggins, I now see why you typed text2x10.php to start the program.  Because that is what I had in the documentation.  I have corrected this in the readme and am uploading the new one now.
Title: Re: text2x10
Post by: shuggins on July 07, 2011, 10:14:32 AM
dbemowsk,

I used power archiver to unzip it.  It's a free program that is very inconsistent.  I tried again and used good ole Windows to uncompress and that did it!  I now use text2x10 name@host.com pass and up it came!  It responded with "listening".  I texted a couple commands I added to the commands.cfg file which were:
table master off:C3 off
table master on:C3 on

It recognized that it received the texts, but nothing happened.  Is the program supposed to echo out that it also sent the X10 commands?  Just for grins I stopped your program and fired up starbotcontrol and did the same thing and the lights came on....so at least my X10 system is working.

PS: using CM19a X10 device on a windows 7 machine, if that helps.  Maybe I should try an XP machine?  But the main HA pc is my win 7 machine.

One more thing....
I opened text2x10.cf and noticed this:
;Attention phrase
AP | @computer
I need to text my command shown above again with "master on@computer", right?  I tried that too and wasn't successful.

Title: Re: text2x10
Post by: dbemowsk on July 07, 2011, 10:59:57 AM
The way the attention phrase is used is as follows:

@computer table master on

I chose "@computer" because you are in a sense talking at (or to) the computer.  The attention phrase can be changed to anything you like though, you just have to type that as the first part of the text message.  I did that so that people couldn't just send you random texts that turn your stuff on and off without knowing the attention phrase.

I am not sure if this will work with the CM19A or not.  I may need to set it so the device type (CM15A, CM19A, etc...) can be configured.  It may just be a matter of changing the sendplc command in the text2x10.php file to a sendrf command.  I use it with my CM15A and it works good.
Title: Re: text2x10
Post by: shuggins on July 07, 2011, 11:46:12 AM
Yea, ok I now understand the passphrase.  Very nice idea! Yea - cm
19a needs rf not plc commands sent out. If you add something like that to config, I'd be glad to test. 

Keep up nice work!!   Love the potential of this thing!!!

Title: Re: text2x10
Post by: Noam on July 07, 2011, 12:26:48 PM
I've been playing with this for a few minutes on my "test" setup, and I have to say that it is really neat!
One thing that might be helpful, though, would be a way to send a direct command (like "C4 On"), without having to put it into the config file, and restart the app.

I might have missed it, but I didn't see anything in the documentation about how to do that.
Title: Re: text2x10
Post by: dbemowsk on July 07, 2011, 12:59:21 PM
Noam, sounds like an easy add that I could do in less than an hour.  I can look at that tonight.  I'll also look at adding the selection of an interface (CM15A, CM19A).  I do not use a CM19A, can anyone tell me if it works with the SDK just sending "sendrf" commands?
Title: Re: text2x10
Post by: Noam on July 07, 2011, 01:03:06 PM
Cool!
Also, I have noticed that AHCMD crashes randomly every so often. It is has been going on for a while, and I know that the developers have it on their list to look into.
Is there any way for the app to look for this, and kill the process if it has crashed?
Title: Re: text2x10
Post by: dbemowsk on July 07, 2011, 01:29:45 PM
I'll look into that.  I have not had it crash on me yet, but that's not to say it doesn't for others.
Title: Re: text2x10
Post by: dbemowsk on July 07, 2011, 07:19:07 PM
OK, I have updated the script.  The updated version has the following changes:

1 - The ability to send raw x10 commands such as "e3 on" or "e3 bright 75" (e.g. @computer e3 dim 50)
2 - The ability to choose an interface in the text2x10.cfg file.  The CM15A and the CM19A are the only options.  I have not been able to test the CM19A, so if someone could confirm that one for me, that would be cool.
3 - The ability to choose between using the standard ahcmd.exe for executing commands or using the x10cmd.exe that I created last year.  I tried the x10cmd with X10 bright/dim commands and the x10cmd.exe crashed, not sure why as of yet, but the x10cmd seemed to work with all other commands from what I could tell.  Using the ahcmd, I was able to run the bright/dim commands just fine.  I have NOT found a way yet to check if the ahcmd file is hung, thus being able to timeout the script and re-run it.

Download now (http://www.phpwebscripting.com/phpwebsite/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=10&MMN_position=36:33) and give me some feedback.
Title: Re: text2x10
Post by: Noam on July 07, 2011, 10:22:24 PM
Can your x10cmd.exe handle Extended Dim commands?
Title: Re: text2x10
Post by: dbemowsk on July 07, 2011, 11:34:00 PM
I am going to fix that and re-upload it.  I only had the program working with 3 parameters (e.g. sendplc a1 off).  for a dim command you need to use 4 parameters (e.g. sendplc a1 dim 50).  As for extended commands I have never used extended commands yet.  If you give me an example of an extended command I can probably write it into the program.  Basically I need to see how many parameters I need to parse for.

The x10cmd.exe program was just something simple I did in VB that was based off of the ahscript.dll which from posts in the forum was said to be much more stable than the ahcmd.exe.  The problem was that you couldn't use the DLL from the command line.  The plan when I did it was to just be a replacement for the ahcmd.exe for command line use.
Title: Re: text2x10
Post by: dbemowsk on July 08, 2011, 12:51:19 AM
I have posted the new version to the website.  The ONLY change in this version was an update to the x10cmd.exe file to allow for bright, dim and extended commands to be executed.  I have also posted a direct link to the x10cmd.exe file for those of you looking to just download that for your use.

I do not have the ability to test all of the features of this that are available, so if people can test it and post any bugs, suggestions, comments and criticisms here, that would be a big help to all who may use this tool.
Title: Re: text2x10
Post by: shuggins on July 08, 2011, 12:10:09 PM
dbemowsk -  I will test the CM19a option when I get back in town Sunday.  Also, I have the ability to test the extended x10 commands.

re: the crashing of AHCMD...  the other X10 Text app mentioned in this forum (starbotcontrol) crashes that way too....  It takes a while....like 6-8 hours of continuous running before it happens.  But, it inevitably does crash also.
Title: Re: text2x10
Post by: shuggins on July 11, 2011, 12:42:26 PM
dbemowsk -

Fantastic!  It worked very well with my CM19a.  Loved the auto-response text "table xxx" was executed successfully.  I don't have time now, but I will test out the extended X10 commands (dim,etc) stuff soon.  Great work- keep it up.  

Only slight suggestion is the need to send "table" in the text.  A bit redundant, imho.  Example: "@computer table master on".  Why the table part?  I sometimes forget it and of course nothing happens.  Really, the table part is part of the "status" commands in the config file as well as the X10 commands.

Again, very nice work.  As I use it - I will likely have more input.
Title: Re: text2x10
Post by: dbemowsk on July 11, 2011, 02:40:49 PM
One other feature that I forgot to mention that I added was a search feature for the commands that you have defined.  Say you forgot what you named a command (e.g. dining room ceiling fan, dining ceiling fan or dining room fan), you can send "@computer search dining" and it should return a text with all commands with the word dining in it.

As it sits, you can send the texts from any phone and it will return texts to whatever phone you sent them from.  Some other features I thought of adding were:

1 - The ability to limit what phone numbers can activate things in the system.  something like a defined list of access phone numbers.  This seemed like a good security feature.
2 - An option to have the system text a defined phone number if someone other than that defined number is is trying to access the system.  Another security type feature.

If I see a big enough demand for these options, I will add them.
Title: Re: text2x10
Post by: dbemowsk on July 11, 2011, 06:29:00 PM
Only slight suggestion is the need to send "table" in the text.  A bit redundant, imho.  Example: "@computer table master on".  Why the table part?  I sometimes forget it and of course nothing happens.  Really, the table part is part of the "status" commands in the config file as well as the X10 commands.

I am confused.  Check your AP (Attention Phrase) setting in the config file and make sure it is not set to "@computer table".  I do not have to text the word "table" in any of my commands I send.  I actually have my AP set to "@harlie", harlie being the name of my HA computer.  The AP can be anything you want.  You don't have to use the "@" at all in your AP.  You could set your AP to "fluffy", and then all your commands would be "fluffy master on" or "fluffy e4 off".

Anyways, My guess is that if you have to type things like "@computer table master on" or "@computer table a2 on", that you have the word "table" either in your AP or in some of your commands.
Title: Re: text2x10
Post by: dbemowsk on July 11, 2011, 06:38:47 PM
Shuggins, I think I just figured it out.  In the sample commands.cfg file, I refer to a table lamp as one of the module definitions.  It is not just lamp.  In my living room I have 3 standing lamps and one lamp that sits on a small table that I refer to as the table lamp.  I am guessing that you have yours set to table master status:L1 on>unsure,off,on.  You only need master status:L1 on>unsure,off,on.  The word table is not required...
Title: Re: text2x10
Post by: shuggins on July 11, 2011, 09:09:45 PM
hahahhaa....  right before I logged on, I figured that out as much - I'm all good now.    ;D ;D

I promised you a set up doc for Remote X10 - but I never could quite get it (RemoteWatch) working.  Now that I got text2x10 all working, would you like me to take  a crack at a very detailed setup/user guide?  I have taken many notes.  I could even include nice iPhone screen shots of what to expect back, etc.  Might be nice to get others up and running.  I mean, communication in this X10 stuff is key.

I can tell you of one *small* bug.  Really, this is not that big a deal, but I can easily reproduce every time.  If I send a text, then IMMEDIATELY send another, text2x10 ignores the second.  It's almost like the "listening" command line output in the dos box means, "from here on out" it looks for texts...  Almost like things that come in before the "listening" line in command prompt means they are lost.  Really, not a big deal at all, as I cannot imagine blasting text messages to Google Voice.  If I wait for 20-30 seconds b/t my texts, it always seems to work.
Title: Re: text2x10
Post by: dbemowsk on July 11, 2011, 10:25:16 PM
I promised you a set up doc for Remote X10 - but I never could quite get it (RemoteWatch) working.  Now that I got text2x10 all working, would you like me to take  a crack at a very detailed setup/user guide?  I have taken many notes.  I could even include nice iPhone screen shots of what to expect back, etc.  Might be nice to get others up and running.  I mean, communication in this X10 stuff is key.
That would be very cool.  All in all it was a pretty simple program to write, so the documentation should be fairly easy, but I do agree that communication is key.

I can tell you of one *small* bug.  Really, this is not that big a deal, but I can easily reproduce every time.  If I send a text, then IMMEDIATELY send another, text2x10 ignores the second.  It's almost like the "listening" command line output in the dos box means, "from here on out" it looks for texts...  Almost like things that come in before the "listening" line in command prompt means they are lost.  Really, not a big deal at all, as I cannot imagine blasting text messages to Google Voice.  If I wait for 20-30 seconds b/t my texts, it always seems to work.
IF you wait 30 seconds or so after sending the two immediately next to one another, do both of them then get executed?  Any text messages that you send are stored in the GV mail box until they are read by some other program or phone.  Also, text2x10 wouldn't delete the text until it processed it first just because of the way the code is set up.  I have seen some delays in the messages getting through, but I think that some of that is on Google's end of things, and I could see that possibly happening if two messages were sent back to back.  Remember too that by default, I have a 5 second delay coded into the config file which is the SCANINTERVAL.  Part of the reason I did this was because if I had the software continuously hitting the GV server for updated messages with no delay, it was occasionally telling me that it couldn't log me in.  5 seconds may still be a bit on the short side as far as time.  If I remember right, jimpster had something like a 10 second delay between checks in his StarBotControl software.  Setting the SCANINTERVAL to 10 might help that issue some, though I haven't tried it.  I guess it's all in how fast you want it to respond.  Maybe I could write in the ability to send multiple commands in one text message?  That may be going a little overboard though.
Title: Re: text2x10
Post by: shuggins on July 12, 2011, 10:13:48 PM
>That would be very cool.
Already started.... it'll be in .pdf format.  Think you'll like it.

PS: I think I can readily reproduce the AHCMD crashed bug (which pops up a dialog asking if you want to Continue or Quit - and until you answer the dialog, text2x10 is locked up - once you click one of the two options in dialog, it will continue on).  If you do the status thing (check the status of a device, say "C3") - it always crashes.  Every time. 

Here's command I put in commands.cfg file:
master status:C3 on>unsure,off,on

I texted this:

@computer master status

text2x10 acknowledges it received the text and then tries to execute it.  That's when the "AHCMD crashed" pop up happens.  Here's why I think it's happening.  CM19a is RF (not PLC), so I presume the fact that CM19a cannot receive stuff (only send out commands), that that is why AHCMD cannot do what it's trying to do.  I have no doubt it works for CM15a (and maybe CM11a?).  But, gathering status of a X10 device probably just won't work with CM19a.  Again, in my case, I don't care too much.  That feature isn't really a hot item to me.  To others, maybe so.
Title: Re: text2x10
Post by: shuggins on July 12, 2011, 10:17:26 PM
Sorry- forgot to ans your original Q:

>IF you wait 30 seconds or so after sending the two immediately next to one another, do both of them then get executed?
Yes....every single time, if I wait that long.    It just seems to take a little bit for the "Listening" status to come back on the DOS console - and until that "Listening" pops back up, it seems to ignore any texts.  Again, this is nothing really. I doubt I'm gonna try and spam my GV SMS Inbox with several X10 text commands at once.   Seems ludicrous in real scenarios.
Title: Re: text2x10
Post by: dbemowsk on July 13, 2011, 01:06:54 AM
One other feature that I forgot to mention that I added was a search feature for the commands that you have defined.  Say you forgot what you named a command (e.g. dining room ceiling fan, dining ceiling fan or dining room fan), you can send "@computer search dining" and it should return a text with all commands with the word dining in it.

As it sits, you can send the texts from any phone and it will return texts to whatever phone you sent them from.  Some other features I thought of adding were:

1 - The ability to limit what phone numbers can activate things in the system.  something like a defined list of access phone numbers.  This seemed like a good security feature.
2 - An option to have the system text a defined phone number if someone other than that defined number is is trying to access the system.  Another security type feature.

If I see a big enough demand for these options, I will add them.

Did you happen to see the other additions I proposed?  DO they seem like something that I should add?
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: shuggins on July 13, 2011, 12:03:36 PM

>1 - The ability to limit what phone numbers can activate things in the system.  something like a defined list of access phone numbers.  This seemed like a good security feature.
>2 - An option to have the system text a defined phone number if someone other than that defined number is is trying to access the system.  Another security type feature.

>If I see a big enough demand for these options, I will add them.

Option #1 (#2 as well) - nice to have, but the "Attention Phrase" is good enough for me as far as security is concerned.  Might not be secure enough for others, however.  If you do put the effort to add these features, I strongly suggest to make them optional in the .cfg file.  IE: if others like me just want to use the Attention Phrase as security, then they could ignore these additional features (leave blank in .cfg file, for example).

Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: dbemowsk on July 13, 2011, 05:13:00 PM
Yes, I would definitely make them optional if I did them.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: shuggins on July 13, 2011, 10:05:17 PM
Last post for a while (as I seem to be hogging this thing):

If you use CM19a:
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: shuggins on July 14, 2011, 08:33:38 PM
hehehe...well, I made it nearly 24 hours w/o a post to this thread!  ;D

Feature Request: Could we nest commands in one single macro.  I know we could have a command trip off a macro in AHP or iHouse, but it would be awesome to do something like this:

; Turn on three lights with one text
upstairs lights on:C4 on,C5 On,C9 on
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: dbemowsk on July 15, 2011, 08:09:27 AM
Shouldn't be too difficult.  I'll look into it.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: dbemowsk on July 31, 2011, 02:27:37 AM
Very soon there will be a new version of the script posted to my website.  The new version contains an update that will allow you to send multiple commands in one text message.  The new version will also contain a user manual in PDF format.  I wanted to publicly thank shuggins for the creation of that manual.  He did a stand up job in it's creation.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: dbemowsk on August 03, 2011, 12:19:02 AM
OK, version 0.0.3 of text2x10 has been posted to my website (http://www.phpwebscripting.com/phpwebsite/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=10&MMN_position=36:33).  The new version lets you send multiple commands in one text message using a comma separated list of commands.  For example, you can now text, @computer ceiling fan on, living room lamp off, a2 on.  There is also a help command, @computer help that sends back a basic syntax of usage for the software. 

This version comes complete with a setup and users guide in PDF format that was created by Scott Huggins (shuggins).  This setup guide gives you step by step instructions on how to get yourself up and running with this quickly and painlessly.

And you get this at the low low cost of .......... well ........... F R E E

Download text2x10 for free by clicking HERE (http://www.phpwebscripting.com/phpwebsite/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=10&MMN_position=36:33)
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: shuggins on October 01, 2011, 03:13:16 PM
Dan (or anyone using text2x10),

I think gmail is blocking the program - as I was unable to get both text2x10 or Starbotcontrol to work anymore.  I keep seeing "unable to log in" messages.  I can log into my google voice account thru web browser just fine, but Tex2x10 and Starbotcontrol cannot.  I know my password is being entered correctly.

I really believe gmail is blocking the programs somehow.....

Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: cheminge on December 02, 2011, 08:53:50 AM
I too have added Text2X10 and StarBotControl, but neither one works...

The Text2X10 says it is listening but nothing happens

And the StarBotControl says:
Unable to login, please check credentials and try again.

I have checked the credentials and I am 100% sure it is typed correct.

Is Google blocking access to my account?

Has anyone else seen this issue?

Do I need to make some changes to my Google Voice account?

Please Help!
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on December 19, 2011, 08:37:14 PM
Just starting up on this, but so far no joy.  I'm getting a similar message:
Code: [Select]
Google Voice text message to X10 translator

Using the following credentials:
GV Username: xxxxxxx
GV Password: *************

Your Google Voice username appears to be invalid.  Google Voice uses your e-mail
 address as the username.
I know it's not invalid, so I'm not sure why it's upset.

Also, assuming this can be resolved, if I have google forward my email, won't I be charged a fee?  I have unlimited txt through my carrier, so I just want to verify that GV won't start charging if I request a status.  If so, I could rewrite things to send via an email.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: Noam on December 19, 2011, 09:55:48 PM
Are you putting in your whole e-mail address as the login for GV, or just the part before the "@" sign?
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on December 20, 2011, 11:00:28 AM
Just the first part as the instructions indicate.  Should I be using the whole email address?  I assumed it would just use the login name/password.  I'm not sure when this program was last working, but I know that Google changed the way logins work at some point recently.  I'm wondering if this code needs a little tweaking to make it work again.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: Noam on December 20, 2011, 01:55:02 PM
Well, I haven't used it since July.
However, I just tried it now, and it said it was using my full e-mail address.
I tried starting it with just the first part, and it didn't work.
I tried again with the full thing, and it did.

At least it gets to the point where it says "Listening."
I don't have a CM15A hooked up to this computer at the moment, so I can't test beyond that.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on December 20, 2011, 02:38:44 PM
Ok, great!  I'll try the full email and see how that goes.  Much appreciate the input.   >!
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: shuggins on December 20, 2011, 03:05:24 PM
I tried it again last night after nearly three months - of quitting on it.  It still doesn't work.  Tried both Text2X10 and Starbotcontrol.   It worked well for me for about 3 months straight and suddenly in late September, *poof*.  No more.  It'll likely just say "Listening" forever...if it's working, it tells you on the dos console that it's receiving texts, and then what it's mapping to the corresponding X10 command you defined that particular text for.

Bummer, 'cause I loved it...used it a bunch while it was working.  I wrote the .pdf manual you can download with the software.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: Noam on December 20, 2011, 03:18:42 PM
That's too bad. I guess Google changed something in their system.
Perhaps the author will update it again.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on December 20, 2011, 05:53:53 PM
I was reading various posts about this at other forums and it appears that Google changed the way you login (related to security) a couple months ago.  If I understood PHP, I might be able to tweak it to get it working again, but alas, I'm just a script programmer (AHK, VBA, etc).  I know it must be possible since there are all those iPhone/Android/etc apps that use the same type of stuff.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: Noam on December 21, 2011, 01:25:50 PM
I think I found the answer, and fixed it.
Based on this thread:
https://github.com/aaronpk/Google-Voice-PHP-API/issues/2 ,
it would appear that Google changed the URL for their login authentication from "www.google.com/accounts" to "accounts.google.com".

There are two references to this URL in the GoogleVoice.class.php file, located in the "includes" folder under your text2x10 folder.

Stop the send2x10 program.
Make a backup copy of the file, and then open it in a text editor.
Change the two references as noted above, and then save the file
Restart the send2x10 program.
Test it.

I just went through this, but without a CM15A connected.
It did receive the text, and it sent me back a text telling me that it worked. I'm assuming that it would work if I actually plugged in my CM15A.

Let me know how it goes.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: shuggins on December 21, 2011, 02:55:47 PM
Noam!

Awesome!  I tried your changes and, indeed, it (Text2X10) recognizes the texts now - it shows that it's executing an X10 command.  Same boat- no CM19A on this computer- but I will test as soon as I get home to see if the X10 commands are being executed correctly.  dbemowsk is the original author (Dan).  I will email him (I think he's been super busy these days) if this works, and we'll get it onto his website so everyone can grab it.

Stay tuned...

PS: has anyone noticed that you are getting spammed by texts now in Google Voice?  Since I made Noam's change...I see random spams showing up like "want $1450 today? Click here..."...from Text2X10.    Text2X10 will ignore such junk...and it won't affect the app's performance but, was just wanting to see if others see this.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: Noam on December 21, 2011, 02:59:17 PM
I don't normally use Text2X10, and I only had it running for a few minutes to test it.
I'll open it back up and check it out.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on December 21, 2011, 03:00:36 PM
Wow, great!  I was testing last night and for whatever reason the script would simply hang my machine (a laptop with the script on a network server and no CM15A).  I'll have to try again with your correction and see if things go better.

 #:)
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: Noam on December 21, 2011, 03:39:10 PM
I don't normally use Text2X10, and I only had it running for a few minutes to test it.
I'll open it back up and check it out.
After some testing, I'm not seeing any spam.
However, since I don't have a texting plan on my phone, I was using my own Google Voice account to send the SMS messages to the program.
Since Google likes to treat messages that you SEND as if you had RECEIVED them (just like in Gmail, they show up in your Inbox), they were showing up twice, and being interpreted twice.
So, the commands were being run twice, and I was getting two notifications.

When I tested by sending from my wife's Google Voice account to mine, it worked fine (command only ran once).
If I decide to start using this (it would be helpful, I guess), I'd probably have to set up a separate Google Voice account just for the text2x10 program to use.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: shuggins on December 21, 2011, 04:17:36 PM
Noam-

There is a setting to keep it from doing that.  Let me go try and find it...
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: shuggins on December 21, 2011, 08:14:59 PM
Yep!  If you do the (small) modifications that Noam described it's fully working.  I turned off several lights, lamps, executed macros (I use iHouse, not AHP), started up some cameras and recorded (and got emailed the attachments, etc) by sending texts to my Google Voice account.

THANK YOU NOAM!  You just got a Helpful from me.  Now for me to find that option on Google Voice to not do that duplicate thing you mentioned...  coming shortly.

EDIT: Noam- open the Text2x10_SetUp_guide.pdf  that I wrote (it's available from dbemowsk's site).  If you don't have it, I can just attach here.  But, this is how to turn it off.  Turn to page 11 and look at steps #9 and #10.  That *should* do it... 

Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on December 21, 2011, 09:24:54 PM
Awesome!  It's listening now, and it appears to have received a text asking for status.  It's not yet responding, but I'll have a bit more playing to do before I fully understand the workings here.

One question though.  When I change a config file, do I need to restart text2x10?  I assume the text2x10.cfg would require a reset, but does the commands.cfg also require one?
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on December 21, 2011, 09:37:57 PM
Also, if I want to turn on multiple lights at once, can I do that in a single commands.cfg line?

Code: [Select]
outdoor lights on:A1 on, A2 on, A3 on
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: Noam on December 21, 2011, 09:45:40 PM
Yep!  If you do the (small) modifications that Noam described it's fully working.  I turned off several lights, lamps, executed macros (I use iHouse, not AHP), started up some cameras and recorded (and got emailed the attachments, etc) by sending texts to my Google Voice account.

THANK YOU NOAM!  You just got a Helpful from me.  Now for me to find that option on Google Voice to not do that duplicate thing you mentioned...  coming shortly.

EDIT: Noam- open the Text2x10_SetUp_guide.pdf  that I wrote (it's available from dbemowsk's site).  If you don't have it, I can just attach here.  But, this is how to turn it off.  Turn to page 11 and look at steps #9 and #10.  That *should* do it... 


That's not the answer for hiding the sent texts.
I already have that turned off (I don't have texting on my phone plan, I wasn't even using my phone for this).
These are the texts I send from Google voice, that show up in my Google Voice inbox. There doesn't seem to be any way to hide them at all.
I think the answer is to use a separate Google Voice account for the program to listen to and send from.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: shuggins on December 21, 2011, 11:08:29 PM
I see.  Well, when I open a browser and log into my google voice account and send texts... I don't get the same behavior you described.

Whatever.  Good luck.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on December 21, 2011, 11:43:46 PM
If I have any texts in my GV account that don't have the @computer phrase, it keeps downloading them over and over every 5 seconds.  But, since they don't have the right phrase, the script simply ignores them as far as actions.  This does make for an ugly console display, but it works fine.  I didn't like that operation and, since I have a separate account for this purpose only, I modified the script to delete all messages and not just the ones that are x10 related.

I'm curious though.  Where does GV find my cell number to send the text messages to?  I don't have it linked to my cell AFAIK, but it is forwarding all text2x10 messages on to my phone anyway.  I don't remember even giving it that phone number SPECIFICALLY so it wouldn't be able to send messages back.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: Noam on December 22, 2011, 07:11:02 AM
I see.  Well, when I open a browser and log into my google voice account and send texts... I don't get the same behavior you described.

Whatever.  Good luck.
Are you sending to a cell phone, or back to your own GV account?
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: Noam on December 22, 2011, 07:12:53 AM
If I have any texts in my GV account that don't have the @computer phrase, it keeps downloading them over and over every 5 seconds.  But, since they don't have the right phrase, the script simply ignores them as far as actions.  This does make for an ugly console display, but it works fine.  I didn't like that operation and, since I have a separate account for this purpose only, I modified the script to delete all messages and not just the ones that are x10 related.

I'm curious though.  Where does GV find my cell number to send the text messages to?  I don't have it linked to my cell AFAIK, but it is forwarding all text2x10 messages on to my phone anyway.  I don't remember even giving it that phone number SPECIFICALLY so it wouldn't be able to send messages back.
Mine doesn't continually download them, but it does it two or three times (it isn't really downloading them twice, but rather it is showing me the ones that I (or text2x10) sent, and then tying to process those, too.

I don't have a texting plan on my phone, but there is an option when you set up the numbers to forward to, to either send, or don't send texts to your cell phone.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on December 22, 2011, 11:23:14 AM
FWIW, I told GV to NOT forward to a cell.  In fact, I told it nothing about my real cell number to make sure it couldn't.  But, it appears that when text2x10 replies to a text sent to GV (even from GV), it is automatically forwarded to my phone.  My account does not show any charges and Verizon doesn't show any either.  I have unlimited texting, so perhaps there is no charge afterall?  Either that or Google will send a bill at the end of the month for a nice holiday surprise!
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: Noam on December 22, 2011, 11:35:50 AM
FWIW, I told GV to NOT forward to a cell.  In fact, I told it nothing about my real cell number to make sure it couldn't.  But, it appears that when text2x10 replies to a text sent to GV (even from GV), it is automatically forwarded to my phone.  My account does not show any charges and Verizon doesn't show any either.  I have unlimited texting, so perhaps there is no charge afterall?  Either that or Google will send a bill at the end of the month for a nice holiday surprise!
That's really strange. Does Google know about your cell number ANYWHERE? It might be under your gmail settings somewhere, or perhaps your Google+ profile (if you have one).

If you want to take this offline to test it, let me know (send me a message through the forums, with your e-mail address). I am happy to try and send you some test text messages from my GV account to yours, and see if they forward to your phone.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on December 22, 2011, 11:40:51 AM
I scoured my GV account last night to see where it came from.  The only place I think it has that info is in the contact list.  Maybe it marked that contact as some kind of auto respond...  If I can't figure it out, I may just take you up on your offer!
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: shuggins on December 22, 2011, 02:24:05 PM
Noam-

Maybe it would be helpful for me to take some screen shots of my GV set up and let you (or others) see what all check boxes, etc, I have checked?
Here is what I am doing...

1. I log into my GV account using browser.
2. I go to my Inbox.
3. I click the red "Text" button in upper-left.
4. I enter my GV phone # as the recipient.
5. I click Send and in my Inbox, I see only one text appear.
6. On the Text2x10 console, I see ONE text come in, and an X10 command gets sent that in turns my lamp.
7. Again, for me, it only does it once. 

If I also use my iPhone to send a text to my GV phone #, again, I only see one text come into Text2x10 and get processed (and only one will show up in the GV inbox).

Heck, maybe I'm just lucky...   :D
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on December 22, 2011, 02:37:40 PM
Ok, I figured it out.  When I send a GV SMS from GV, it uses my GV#.  When text2x10 responds, it's using the sender phone number to reply, so it will reply to the GV#.  If I send a message from my cell, it will show my cell number in the GV inbox.  So, text2x10 will respond to the sender phone number which is my cell.  I don't think this counts as forwarding, so I should be ok.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: Noam on December 22, 2011, 03:51:36 PM
Noam-

Maybe it would be helpful for me to take some screen shots of my GV set up and let you (or others) see what all check boxes, etc, I have checked?
Here is what I am doing...

1. I log into my GV account using browser.
2. I go to my Inbox.
3. I click the red "Text" button in upper-left.
4. I enter my GV phone # as the recipient.
5. I click Send and in my Inbox, I see only one text appear.
6. On the Text2x10 console, I see ONE text come in, and an X10 command gets sent that in turns my lamp.
7. Again, for me, it only does it once.  

If I also use my iPhone to send a text to my GV phone #, again, I only see one text come into Text2x10 and get processed (and only one will show up in the GV inbox).

Heck, maybe I'm just lucky...   :D


I took another look at the code. It looks like is is *supposed* to delete the message after it process it (which would leave ONLY the one you had sent. For some reason, mine isn't deleting it. Not sure why.
I'll have to look at the code again, and see if I can find a reason. (I did make a minor change to the reply text, perhaps I broke something else in the process).

EDIT: I think I might have an answer. I don't have a CM15a plugged into this laptop. So, perhaps it doesn't delete the incoming message if it can't run the command?
I'll have to test it on a machine with a CM15A to be sure.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on December 22, 2011, 04:06:04 PM
I found that when I used the default attention phrase (@computer), GV received the message differently (!computer).  As a result, I would see text2x10 continually downloading and skipping the message.  It did not do this once and continue, it did this every 5 seconds.  When I used a different phrase (X10), the software works great.

Since this account is explicitly for X10 stuff, I have modified the code to process the message and delete it if it's AP is valid and just delete the message if it's not.  As a result, every 5 seconds or so I have a clean inbox.  While I was at it, I updated the code to also implement the status message that the manual indicates (which was not actually in the most up to date code).
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: Noam on December 22, 2011, 04:14:12 PM
Well, when I tested on a machine with a CM15A, it DID delete the message after executing the command.
So, I'm thinking that perhaps if it can't execute the command (because there is no CM15A to send it to), it doesn't delete the message.
I tested by sending from one GV account to the other.
When I sent from my "X10" GV account to itself, it STILL deleted the message (both incoming and outgoing).

Not sure why you still see exactly one copy of the message.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on December 23, 2011, 01:33:19 PM
I found a miniscule bug that anyone using this code should probably fix.  This does not affect function in any way, but it does cause the log to be incorrect.  The author uses the date function to get the date and time output to the log file.  He used a lower case 'h' for hours, but this provides a 12-hour time.  Since there's no AM/PM output, this provides somewhat spurious logged data.  Simply change this to an 'H' and it should be right.

Open text2x10.php and locate the logMessage function.

function logMessage($msg) {
    $file = "activity.log";
    //Create a file handler
    $fh = fopen($file, 'a');
    //Generate the message with the date
    $log = date("m/d/Y h:i:s")." - ".$msg."\r\n";
    //Write the message to the log
    fwrite($fh, $log);
    //Close the file
    fclose($fh);
} //End function logMessage

becomes

function logMessage($msg) {
    $file = "activity.log";
    //Create a file handler
    $fh = fopen($file, 'a');
    //Generate the message with the date
    $log = date("m/d/Y H:i:s")." - ".$msg."\r\n";
    //Write the message to the log
    fwrite($fh, $log);
    //Close the file
    fclose($fh);
} //End function logMessage
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on December 23, 2011, 08:42:38 PM
Now that I've changed the code so it outputs the 24-hour time, it now doesn't give the right time or date.  Any idea why that might be?  For instance, the following was recorded at 5:27 today:

Code: [Select]
12/24/2011 01:27:23 - Received text message : X10 status
Instead of saying 12/23/2011 17:27:23, it indicated tomorrow's date and the wrong time.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: Noam on December 25, 2011, 08:37:12 AM
Now that I've changed the code so it outputs the 24-hour time, it now doesn't give the right time or date.  Any idea why that might be?  For instance, the following was recorded at 5:27 today:

Code: [Select]
12/24/2011 01:27:23 - Received text message : X10 status
Instead of saying 12/23/2011 17:27:23, it indicated tomorrow's date and the wrong time.
Time zone offset, perhaps?
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on December 25, 2011, 10:06:33 AM
Yeah, I looked into that.  I wasn't familiar enough with php to make that change, but I did locate some code that would probably fix it.  I'll post when I figure it out.   ;D
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on December 25, 2011, 12:14:27 PM
The problem is that the time zone was not being set, so the code is defaulting to GMT.  It's supposed to be possible to set the time zone within the php.ini.  I had no luck setting things up that way, so I simply added a line at the top of the file to explicitly define my time zone.  I found a nice little function on one of the PHP manual pages that will automatically draw the information from your registry, but it's overkill for this since the user can simply type it in (that's designed for web server use I guess).

In the end, all you need to do is add the following to the second line of your php file:

Code: [Select]
date_default_timezone_set('America/Los_Angeles');
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: cheminge on February 06, 2012, 03:40:49 PM
I think that this is Amazing! 

I have a request, can you make it so that when an email is received have it trigger and X10 macro!

I receive notification from our Dispatch system (I am a volunteer firefighter) and I want it to trigger a macro that turns on my lights so that I can get ready as quick as I can so that I can get to the station as fast as I can.

Our dispatch sends out a text message (actually an email message converted to a text)  As you may guess, Google Voice does not receive email text messages.

I am thinking that it could be simple as if an email was received from a specified address, then trigger the macro to run.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: shuggins on February 06, 2012, 04:03:52 PM
Yep!  Look here, particularly at page two.  It worked great for me.  Sounds like it might help you out, although for me - sending texts to turn on/off x10 devices and send macros works better.

http://forums.x10.com/index.php?topic=19197.15
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: soxfan1966 on March 16, 2012, 05:23:58 PM
Hi All...

Have a relatively new X10 setup at home and now looking to get it a little more automated.  The Text2X10 concept looks like it could be very useful for me.

I have downloaded the software and set up an Google Voice account.  I went thru the steps to set up the config file and get the program running.

However, when I send a text to my Google Voice acct it just stays in the inbox an does not get picked up.  The Text2x10 program is running and just sits at "Listening" on the screen.

At first, I was using @home as the text keyword but for some reason Google Voice was changing that to !home.  So I switched my keyword to x10 after reading some info here - but that still does not work...

I should note that while I have the software running, I do not yet have an x10 USB Interface connected to my computer.  I was hoping to play around with the software a little bit before I bought one (Not sure if I am going to go from a CM19A or try and find a CM15A on ebay or the like).

Anyone have any suggestions to try and get this working?
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: shuggins on March 17, 2012, 09:27:42 AM
The reason it's not working for you is because Google changed the URL for their login authentication.   The fix is above on page #3 of this topic.  Follow the simple directions and you will be up and running.  It's working great for me....just tried to send some texts and it's good for me.

  
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on March 17, 2012, 10:58:25 AM
Yes, this still works fine.  I've been using it for months and no issues!
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: soxfan1966 on March 17, 2012, 04:53:02 PM
I updated the Google login stuff as suggested and it worked great...  Now I just need to find a CM15A or CM17A device...  Thanks
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: soxfan1966 on March 18, 2012, 01:40:22 PM
Which of the CM Interfaces do people use / recommend?  I think the real options are the CM11A (which is a serial connection, and not sure if it works with Text2x10 or not), CM15A (USB connection, also some memory in the device to triggering timed events) or CM19A (USB, no memory, just RF commands sent and no status reply).
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on March 18, 2012, 07:42:52 PM
The CM15A has been discontinued by X10.  There was a report that someone got one in the last couple weeks, but I'd consider that one out of the question for the moment.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: Dan Lawrence on March 18, 2012, 08:21:45 PM
That may not be true as it was reported here that one of the posters got a CM15A in the last week or so.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: soxfan1966 on March 20, 2012, 03:18:46 PM
Does anyone know if this works with one of the Serial connectors (CM17 or CM11)?  Or does it only work with the USB Ones?
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: Victor88 on March 20, 2012, 03:35:00 PM
Nice reading but I need ur help I am very much interested in X10 Technologies(modules).Currently am
working on a project topic "Mobile Home Based Automation System using SMS".

My worry now is that,I have purchased X10 modules ( Lamp and Appliance)
from the US,and want help if a programming code in either
of the  to programming languages C++,C#,VB.Net,C or any programming
langauge remotely control the X10 Modules using SMS from a phone.
Because I don't want to use the software that comes with the kit for my project work.

Large quantitties of both the lamp & appliance modules would be imported into my country
for household owners,if this project become successful,much of your products would be
recommended in my country for household owners.
  agborloh@yahoo.com
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: dave w on March 20, 2012, 03:40:12 PM
Nice reading but I need ur help I am very much interested in X10 Technologies(modules).
Large quantitties of both the lamp & appliance modules would be imported into my country
for household owners,if this project become successful,much of your products would be
recommended in my country for household owners.
  agborloh@yahoo.com
Victor88
This is a users forum. X10 staff occasionally monitors it, but if you want their attention you should call them.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on March 20, 2012, 05:16:51 PM
Does anyone know if this works with one of the Serial connectors (CM17 or CM11)?  Or does it only work with the USB Ones?
I think the only limitation you will find is that the interface must be compatible with the AHP SDK.  In that regard, the only compatible controllers are CM15A and CM19A afaik.

http://www.activehomepro.com/faq.html#Q.%20Will%20ActiveHome%20Pro%20work%20with%20the%20older%20CM11A%20Computer%20Interface%20that%20shipped%20with%20the%20original%20version%20of%20ActiveHome

After looking in another thread:
http://forums.x10.com/index.php?topic=25476
page 3, message from thex10shop, it appears that AHP may be compatible with CM11A.  Never used it that way since I don't have one, but it's probably possible.

Anyway, if you can use AHP with your controller, then you will have access the the AHP SDK and this software will work.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: Brian H on March 20, 2012, 06:43:14 PM
The CM11A is compatible with the later revisions of AHP.
I have not tried the AHP SDK with one.

There are a few overseas X10 vendors that make X10 compatible modules for Europe and other countries.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: JMac on June 28, 2012, 01:07:00 PM
Got version 0.0.3 installed and got to the point that the program is "listening", but I can't get the program to complete a command, and there is nothing indicated on the activity log.  Tried cmd in both x10cmd and ahcmd....
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on June 29, 2012, 05:03:30 PM
Make sure the SDK is up and running correctly.  There are a couple test scripts that you can use to verify that the SDK is working correctly within AHP so you can eliminate that as a possible issue.  If that's good, the next question is whether the commands are being received by text2x10 and whether they are considered valid by the program.  When a text comes in, text2x10 should display a message in the command prompt indicating what it interpreted the message to mean.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: JMac on June 30, 2012, 11:09:56 AM
What SDK do I need?  I have Windows XP SP3 and I run a few scripts on AHP, but I was under the impression that AHP was not involved.  I do have it running continuously though and the CM15A is attached to the computer.  Somehow text2x10 is not seeing the message....
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: Brian H on June 30, 2012, 11:26:36 AM
Do you have the AHP SDK?
If not here is the link to it.
http://www.activehomepro.com/sdk/index.html
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: Noam on July 05, 2012, 01:07:22 PM
Got version 0.0.3 installed and got to the point that the program is "listening", but I can't get the program to complete a command, and there is nothing indicated on the activity log.  Tried cmd in both x10cmd and ahcmd....

Take a look at this post:
http://forums.x10.com/index.php?topic=24267.msg145451#msg145451

I had a similar problem, and I had to modify the code to adjust for changes on google's side.
I haven't looked at this in in a while, so I don't know if those changes were incorporated into the Text2x10 code or not.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on July 15, 2012, 01:40:09 AM
I just tried to use text2x10 this evening and it appears to be broken again.  I know it worked a month ago or so, but it doesn't do anything now.  It appears that Google must have changed how messages get downloaded again.  The system sits there and attempts to download the message, but it doesn't get anything back (as far as I can see).  I am no PHP programmer, so it will take me a bit to figure out what the issue is.  Perhaps the previous poster who was having issues was related to this.  I'll post the solution if I can figure it out (presuming I don't have something else screwed up on my end).
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on July 15, 2012, 04:35:04 AM
It looks like this isn't an issue with google voice.  It turns out that my file server is having networking issues.  I don't use that system to surf the web or run any files, but it appears that it may have been infected by some form of the DNS Changer malware.  I can ping google, but I can't navigate there.  FTP is also dead.

I'll run a thorough search of the system tonight, but from what I've read...I may get to format and setup the file server again.   B:(
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: shuggins on July 15, 2012, 03:07:35 PM
Fired it up for the first time in 3 months. Works great.  I was able to turn devices on / off many times.  I think you likely have an outdated version of the .php code.  Somewhere in this thread, a fine X10 forum member posted the code he fixed.  You might have to go get that.  

PM me if you need more help.  
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on August 14, 2012, 11:43:41 AM
I've had this script running for ages now and it works great...when it's running.  I've noticed that it sometimes crashes for some unknown reason.  This is running on a headless server, so I don't know it isn't working until I expect it to respond to a command and it does not.  I'm not sure why it's crashing, so I don't know what to fix (this isn't one of the languages I'm familiar with).
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on September 29, 2012, 09:37:41 PM
I tried to send a text to my google voice account so I could turn on the kennel lights for my dogs.  I just checked, and the code had crashed again.  This time I have a crash log to post though.  Anyone know how to implement try/catch in PHP?

Code: [Select]
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to all
ocate 81377 bytes) in D:\Array1\Misc\X10 Software\text2x10\text2x10\includes\Goo
gleVoice.class.php on line 47

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate
 81377 bytes) in D:\Array1\Misc\X10 Software\text2x10\text2x10\includes\GoogleVo
ice.class.php on line 47
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on October 05, 2012, 11:22:17 AM
I've been seeing this message a bunch lately.  This is on the same machine that I have a peer blocker installed and it seems to break the internet periodically.  I wonder if the reason this script is breaking is due to the network not being available.  I need to address the network outage before I blame text2x10.  However, it would be a good thing to use a try/catch approach such that if it does encounter an error, it will simply try again later rather than crashing the tool.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on May 08, 2013, 10:05:17 PM
I'm probably talking to myself here at this point, but I removed the peer blocking software months ago and I'm still experiencing very unstable code.  It seems like it runs for a week or two before crashing.  I'm pretty sure this is related to the PHP code not liking a response (or lack of response) from Google, but I don't know PHP enough to figure out exactly what the problem is.  I'll probably try to give it a go when I get a chance.  The only alternative I see is to schedule something in Windows to kill the task every x days and relaunch it.  I'm sure that would be something I could easily do, but it seems rather silly to fix the symptom rather than the problem.

For anyone who is following this thread, this is the error message that was in the command prompt today.
Code: [Select]
D:\Array1\Misc\X10 Software\text2x10\text2x10>text2x10.bat

Google Voice text message to X10 translator

Using the following credentials:
GV Username: **********@gmail.com
GV Password: *************

Listening
PHP Notice:  Trying to get property of non-object in D:\Array1\Misc\X10 Software
\text2x10\text2x10\includes\GoogleVoice.class.php on line 151

Notice: Trying to get property of non-object in D:\Array1\Misc\X10 Software\text
2x10\text2x10\includes\GoogleVoice.class.php on line 151
PHP Notice:  Trying to get property of non-object in D:\Array1\Misc\X10 Software
\text2x10\text2x10\includes\GoogleVoice.class.php on line 155

Notice: Trying to get property of non-object in D:\Array1\Misc\X10 Software\text
2x10\text2x10\includes\GoogleVoice.class.php on line 155
PHP Warning:  DOMDocument::loadHTML(): Empty string supplied as input in D:\Arra
y1\Misc\X10 Software\text2x10\text2x10\includes\GoogleVoice.class.php on line 15
8

Warning: DOMDocument::loadHTML(): Empty string supplied as input in D:\Array1\Mi
sc\X10 Software\text2x10\text2x10\includes\GoogleVoice.class.php on line 158
PHP Notice:  Trying to get property of non-object in D:\Array1\Misc\X10 Software
\text2x10\text2x10\includes\GoogleVoice.class.php on line 163

Notice: Trying to get property of non-object in D:\Array1\Misc\X10 Software\text
2x10\text2x10\includes\GoogleVoice.class.php on line 163
PHP Warning:  Invalid argument supplied for foreach() in D:\Array1\Misc\X10 Soft
ware\text2x10\text2x10\includes\GoogleVoice.class.php on line 163

Warning: Invalid argument supplied for foreach() in D:\Array1\Misc\X10 Software\
text2x10\text2x10\includes\GoogleVoice.class.php on line 163
PHP Notice:  Trying to get property of non-object in D:\Array1\Misc\X10 Software
\text2x10\text2x10\includes\GoogleVoice.class.php on line 151

Notice: Trying to get property of non-object in D:\Array1\Misc\X10 Software\text
2x10\text2x10\includes\GoogleVoice.class.php on line 151
PHP Notice:  Trying to get property of non-object in D:\Array1\Misc\X10 Software
\text2x10\text2x10\includes\GoogleVoice.class.php on line 155

Notice: Trying to get property of non-object in D:\Array1\Misc\X10 Software\text
2x10\text2x10\includes\GoogleVoice.class.php on line 155
PHP Warning:  DOMDocument::loadHTML(): Empty string supplied as input in D:\Arra
y1\Misc\X10 Software\text2x10\text2x10\includes\GoogleVoice.class.php on line 15
8

Warning: DOMDocument::loadHTML(): Empty string supplied as input in D:\Array1\Mi
sc\X10 Software\text2x10\text2x10\includes\GoogleVoice.class.php on line 158
PHP Notice:  Trying to get property of non-object in D:\Array1\Misc\X10 Software
\text2x10\text2x10\includes\GoogleVoice.class.php on line 163

Notice: Trying to get property of non-object in D:\Array1\Misc\X10 Software\text
2x10\text2x10\includes\GoogleVoice.class.php on line 163
PHP Warning:  Invalid argument supplied for foreach() in D:\Array1\Misc\X10 Soft
ware\text2x10\text2x10\includes\GoogleVoice.class.php on line 163

Warning: Invalid argument supplied for foreach() in D:\Array1\Misc\X10 Software\
text2x10\text2x10\includes\GoogleVoice.class.php on line 163
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: bkenobi on December 27, 2013, 07:03:37 PM
I know this is a dead topic (I'm the only one looking), but I wanted to post a final note.  Google has announced a change to it's Google Voice credentials system that will effectively kill off the capability to use GV for anything other than what Google wants as of May 2014.  They have indicated that 3rd party software that has been authorized will be allowed to function with GV, but it sounds like they do not want hobbyist/hackers touching their toys any more.  Although I've read it's technically possible to get GV working right now, it will be dead in a few months so I'm moving on to something else and would recommend anyone else considering this approach to reconsider.
Title: Re: text2x10, Text messaging to operate your X10 devices.
Post by: HA Dave on December 27, 2013, 08:34:20 PM
...... so I'm moving on to something else and would recommend anyone else considering this approach to reconsider.

Keep us informed on what you're working on..... it's interesting reading even if I can't help.