The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: Trigger an output on TTS?



Well it's afternoon just - and I've managed the papers too !

First off HS will be able to achieve almost anything you need in
connection with xAP.  It can intercept any xAP message (event) , make
some decisions (script) and do something else eg send xAP (action). This
is the fundamental way all HA tasks work really but the 'script' bit in
the middle is where most people get a little stumped.    In anything but
the simplest HA setup, particularly with xAP  getting familiar with a
scripting language is a necessary chore, but very rewarding.  It also
helps where you need permutations of interactions that the software
doesn't support out of the box. So you could  create a HS device from
the xAP TTS start message and trigger a script when it changes state to
link it to your HomeVision output but I'm thinking there's a neater way
in this instance....

First of all you should xAP enable the HomeVision (relay>Russound)
output via HomeSeer. This will expose the HV output as a xAP BSC Binary
output.  Now you can send xAPBSC.cmd messages on your network , targeted
at this and it will change state accordingly. The target address will
actually be a HomeSeer address of course.  Now within xAP SwitchBoard
there a very flexible feature (thanks J !) where you can add any xAP
messages you want sent into a text file and they will be sent in
response to the appropriate event. You will find a file called
tosend.txt that in your case you probably have already edited to include
a xAP TTS message.  What we will do here is add a xAPBSC.cmd message as
the very first thing that gets sent to the HV output to switch your
relay.  This will need adding as a 'raw' xAP message.  Now each time,
just before the TTS is sent your relay will get turned on, you will also
later have to turn it off when the TTS stop is sent.  There may still be
a delay issue but the relay should change fairly instantaneously and the
TTS message has to be received, processed, built and spoken so I'm
hopeful this will actually add enough inherent delay to actually make it
all work just as you want it.

If you find it confusing as to how to add the raw BSC cmd to
SwitchBoards'  tosend.txt file then if you go ahead and create your BSC
HV output in HS and let me know what it's address is I will show you
what you need to add to the file.  Please test the BSC output with some
BSC cmd messages sent using Viewer to make sure it's working as expected
of course.  Easiest probably to use a  state=toggle command rather than
having to use two messages (state=on state=off) - you should see
corresponding xAPBSC.event messages for each command and your relay
should click as it changes state of course.

Here is the format of a generic xAPBSC./cmd message - you just need to
edit the target line to match your address...  I have wildcarded the ID=
parameter to make it easier .

xap-header
{
v=12
hop=1
uid=FF123400
class=xAPBSC.cmd
source=ACME.Controller.Central
target=mi4.HomeSeer.PaulG.whatever:RussoundRelay
}
output.state.1
{
ID=*
State=TOGGLE
}



Just another caveat - if you are attaching a relay to a HV output ensure
it has a protection diode across it so that it doesn't blow your output.
The HV docs have details on this. IIRC you have a HV Pro though and
these already have onboard relays with LED's so that it makes it much
easier :-)

K

Paul Gale wrote:
> I shall wait until the effects have worn off then - hope the headache
isn't too bad! ;)
>
> Paul.
>
>
>
>
>> -----Original Message-----
>> From: xap_automation@xxxxxxx
>> [mailto:xap_automation@xxxxxxx] On
Behalf Of Kevin Hawkins
>> Sent: 22 October 2006 03:53
>> To: xap_automation@xxxxxxx
>> Subject: Re: [xap_automation] Trigger an output on TTS?
>>
>> A rather 'well gone' reader was about to reply to this at 4AM on
my
>> crawling back home but has fortunately remembered from past
experience
>> it's better to wait till tomorrow (afternoon probably)    !   ;-)
>>
>>     K
>>
>> Paul Gale wrote:
>>
>>> James,
>>>
>>> I've been playing with Speech and the xAP HS plugin - not sure
how you
>>>
>> can trap the tts.start and tts.stop messages and then do something
when
>> they're received - is this actually possible?
>>
>>> Thanks,
>>>
>>> Paul.
>>>
>>>
>>>
>>>
>>
>>
>>
>> Yahoo! Groups Links
>>
>>
>>
>>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>






xAP_Automation Main Index | xAP_Automation Thread Index | xAP_Automation Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.