Author Topic: X10 Home automation Payloads  (Read 4103 times)

0 Members and 1 Guest are viewing this topic.

alexdepalma

  • Jr. Member
  • **
  • Posts: 14
  • Karma: 0
    • View Profile
X10 Home automation Payloads
« on: January 26, 2012, 09:25:05 AM »
Hello!
I'm not a programmer and many options are far from my understanding.

I'm testing X10 plugin that is working very well with basic commands like turn ON or OFF a lamp.
But, How can I create a Payload to accept various options like, ON, OFF Dimm X% or Bright X%. Or even "turn light ON X%"?? All in the same payload???


Thanks
Alex



jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: X10 Home automation Payloads
« Reply #1 on: January 26, 2012, 10:55:36 PM »
Hi Alex,

Sorry, I didn't notice this post before.  I could make a command for you, but if you want to do it yourself, please watch the tutorials:

&feature=view_all

it covers everything you need to know to do this yourself in the first one.

alexdepalma

  • Jr. Member
  • **
  • Posts: 14
  • Karma: 0
    • View Profile
Re: X10 Home automation Payloads
« Reply #2 on: January 27, 2012, 11:44:28 AM »
Hello!

well, im trying to create the playload!!
I've to questions.
How can I create a variable value. I want 1 fixed value and one optional value (the optional is a payload) Let say. Bright lights (then use a fixed value like 10) or ad an optional  payload that modifies the regular value (like More, maximun)
Lets say

A1 Bright 10 + {1}

if More is 20
and Maximun is 90
But if I select the payload as optional I get an error in the program.

Is it possible? And how can I do to ad those 2 values?

Thanks
Alex

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: X10 Home automation Payloads
« Reply #3 on: January 27, 2012, 11:55:38 AM »
I am sure it is possible but I am having a very hard time understanding your question.

Can you please define exactly:

- What you want to be able to say.
- What will happen.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: X10 Home automation Payloads
« Reply #4 on: January 27, 2012, 11:56:49 AM »
you should not make the payload optional.

If you want to be able to say the command either with a payload or without a payload, then you should actually create two commands.  One that uses a payload and one that does not.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: X10 Home automation Payloads
« Reply #5 on: January 27, 2012, 01:32:57 PM »
I don't know if it will help or not, but here's my group for X10 control at home.

you need to put "onoffbrightdrim.xml" and "HomeAutomation.xml" into your .\payloads folder.

then import "VcGrp_X10.xml" into your tree by dragging it in.

alexdepalma

  • Jr. Member
  • **
  • Posts: 14
  • Karma: 0
    • View Profile
Re: X10 Home automation Payloads
« Reply #6 on: January 29, 2012, 04:13:57 PM »
I don't know if it will help or not, but here's my group for X10 control at home.

you need to put "onoffbrightdrim.xml" and "HomeAutomation.xml" into your .\payloads folder.

then import "VcGrp_X10.xml" into your tree by dragging it in.

Yeap!!! ;D
I made something similar but yours is even more powerfull!!

Great!!!
Thanks
Alex

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: X10 Home automation Payloads
« Reply #7 on: January 29, 2012, 08:48:22 PM »
I hope if you look at it, it will make sense to you, and hopefully you can adjust it to fit your needs.  At the same time, hopefully this will give you a better understanding of payloads.

I would like to mention one thing.  You asked about being about to say the payload optionally.  There is a way to do this.

You can create two separate commands.  The first could be the simpler command.

"make lights brighter"  >>> and this command might turn the brightness up by 10%

another command could use the same wording but with an extra payload.  So you could create a command like this:

"make lights brighter by (10,20,30,40,50) percent"  >>> here I am implying that the command is using a payload list with the (10,..,50)

usually the speech engine will be smart enough to wait a bit after you say "make lights brighter" to see if you will also say "by x percent".  But in some cases it may not... it may just assume 10% immediately, so if you really want to make sure you get the right result you should use a different phrase completely for the second command.  Try it though and see what happens!  ;D