dupa

Author Topic: X-10 Control  (Read 11713 times)

jenna

  • Newbie
  • *
  • Posts: 23
    • View Profile
X-10 Control
« Reply #15 on: December 17, 2004, 08:09:40 am »
Quixote - I have "Hal"(jenna) back up and running, Have a couple commands in Girder and now ready to join both Hal and Girder together.  Any additional help, steps would be greatly accepted. It looks like you have accomplished this. I have been following your dialog on this X10, Hal and Girder, but I haven't been able to put it all together.  So I'm ready for step #2.  Thanks in advance.
Jenna
 

Quixote

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
X-10 Control
« Reply #16 on: December 17, 2004, 09:10:54 am »
At the top right there is a dropdown box near the learn button.
Select "Girder event", then hit learn. A small box will pop up. Type in "light_event_1" without the quotes, or whatever you would like to call it. Be sure that you remember the capitalizations, if you use any because it is case sensitive, I think. Once you have done that save your file again. I will instruct you on the Ultra HAL script part when I get home, because I am at work and my HAL "AKA SynthIA"  is at home.
What phrases would you like to use to trigger the event? Let me know because we may need to modify the phrase(s) to have a little tolerance for mis-recognized words. For instance, sometimes when I say "Mute the television" it hears "Music television". This is easy to get around.
 

jenna

  • Newbie
  • *
  • Posts: 23
    • View Profile
X-10 Control
« Reply #17 on: December 17, 2004, 11:03:31 am »
Let's use the Girder event as "Light_Event_1" and the Hal's usersentence as "turn light 1 on".  I don't have voice recognition working yet so let's start with the typing to Hal, as I learn more about this I'm sure I should be able to modify it later. I'm at work also, so I'll check later for the script. Thanks

 

Quixote

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
X-10 Control
« Reply #18 on: December 18, 2004, 10:14:37 am »
Try this script (it should be inserted around line 923 if you are using the XTF brain V1.2, and have not made any other modifications to the brain. Use the brain editor) Also, download the HalCmdResponses.brn from the thread I mentioned before and place it in the defbrain directory :

If InStr(1, UserSentence, " TURN ON LIGHT 1 ", 1) > 0 Or InStr(1, Usersentence, " TURN ON LIGHT ONE ",1)> 0 Then
BlockSave = True
GetResponse = HalBrain.ChooseSentenceFromFile(WorkingDir & "HalCmdResponses.brn")
GetResponseBlock = True
Set GirderEvent = CreateObject("Girder.GirderEvent")
GirderEvent.Device = 18
GirderEvent.EventString = "Light_Event_1"
GirderEvent.Payload(1) = payload
GirderEvent.Send()
End If

You can change the line

GirderEvent.EventString = "Light_Event_1"

to any event name you'd like to, using the Girder event command name method that we used to name your light__event_1 command.
You can also change the line

If InStr(1, UserSentence, " TURN ON LIGHT 1 ", 1) > 0 Or InStr(1, Usersentence, " TURN ON LIGHT ONE ",1)> 0 Then

to recognize whatever string you want, but always keep in mind that spacing is important, including leading and end spaces, as VonSmith explained to me.
Let me know how it turns out...
 

jenna

  • Newbie
  • *
  • Posts: 23
    • View Profile
X-10 Control
« Reply #19 on: December 19, 2004, 06:49:33 pm »
Thanks-a-million, Quixote, VonSmith and whom ever else may have helped it this project it works.  I also downloaded the plug-in for the CM17A (Firecracker) and got it to work also.
Thanks again
Jenna[:D]
 

Quixote

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
X-10 Control
« Reply #20 on: December 19, 2004, 07:25:07 pm »
Any time.
I have other projects that I will be working on, so if you'd like I'll share some scripts / GMLs when I get to them.
Happy Holidays.