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?


  • Subject: RE: Trigger an output on TTS?
  • From: "Paul Gale" <groups@xxxxxxxxxxxxxxxx>
  • Date: Mon, 23 Oct 2006 10:42:13 +0100

So any update is based purely on the message timestamp? Even if the
variable is the same?

I've now tested a bit further and am getting weird results - either there's
a bug with the HS xAP plugin or the device isn't setup correctly or I've
done something wrong! This is what I see:

Using the xAP Message Sender app, I send:

xap-header
{
v=12
hop=1
uid=FF123400
class=xAPBSC.cmd
source=ACME.Controller.Central
target=mi4.homeseer.haserver.94:HomeVisionRelays.RussoundPagingTrigger
}
output.state.1
{
ID=*
State=on
}

This generates the following THREE messages in viewer if the output is
already OFF:

xap-header
{
v=12
hop=1
uid=FF414108
class=xAPBSC.info
source=mi4.homeseer.haserver.94:HomeVisionRelays.RussoundPagingTrigger
}
output.state
{
state=OFF
location=HomeVision Relays
name=Russound Paging Trigger
}

xap-header
{
v=12
hop=1
uid=FF414108
class=xAPBSC.event
source=mi4.homeseer.haserver.94:HomeVisionRelays.RussoundPagingTrigger
}
output.state
{
state=ON
location=HomeVision Relays
name=Russound Paging Trigger
}

xap-header
{
v=12
hop=1
uid=FF414108
class=xAPBSC.info
source=mi4.homeseer.haserver.94:HomeVisionRelays.RussoundPagingTrigger
}
output.state
{
state=ON
location=HomeVision Relays
name=Russound Paging Trigger
}

Sending the OFF message when the device is ON also produces the three
messages but with the reversed states as I now guess is correct?

If I send an ON when it's already ON, I get a single info message with the
current state and vice versa with OFF

The STATUS field in HS correctly updates with ON/OFF BUT the HV relay does
not trigger! If I select ON/OFF from the HS Web Control 'Status' page, the
relay does trigger OK.

So, it would seem that xAP is correctly working to change the status but is
not doing the next step and triggering the link to HV???

I set the xAP HS plugin to debug mode and collected the cut down log for an
ON and OFF command. Should I send this to James - is this one for him to
look at?

Thanks,

Paul.


> -----Original Message-----
> From: xap_automation@xxxxxxx
> [mailto:xap_automation@xxxxxxx] On
Behalf Of Kevin Hawkins
> Sent: 22 October 2006 16:33
> To: xap_automation@xxxxxxx
> Subject: Re: [xap_automation] Trigger an output on TTS?
>
> OK - I'm not actually running SB or HS at the moment to test this but
if
> you had created something in HS based on probably the 'say' parameter
> will be recognising it based on it being within a tts.stop block  - ie
a
> tts.start wouldn't update the variable, and hence the device. Also it
is
> possible that none of those variables have actually changed from the
> last time a tts.stop was received so you need to trigger your script
> based on 'update' rather than 'change' - (you will see that the last
> updated time changes each time)
>
> K
>
> Paul Gale wrote:
> > Oh, and the other bit I don't understand - how to listen for the
TTS
> Stop message? Do I create a device or have to do something in
scripting
> etc?
> >
> > At first I thought I could create a device but on selecting the
> mi4.speech.haserver device, I got the following in the raw mode:
> >
> > xap-header
> > {
> > v=12
> > UID=FF234500
> > Class=tts.speak
> > Source=mi4.speech.HASERVER
> > }
> > tts.stop
> > {
> > volume=100
> > card=kX Wave SB0240 10k2 [d080] 4/5
> > say=Enter text to speak
> > voice=NeoSpeech Paul
> > }
> >
> > I could only select devices for the variables: volume, card etc -
I
> guess I'm on the wrong track here? How do I just intercept the
tts.stop
> message each time and then do something?
> >
> > Many thanks,
> >
> > Paul.
> >
> >
> >
> >
> >> -----Original Message-----
> >> From: xap_automation@xxxxxxx
> >> [mailto:xap_automation@xxxxxxx] On
Behalf Of Kevin Hawkins
> >> Sent: 22 October 2006 13:43
> >> To: xap_automation@xxxxxxx
> >> Subject: Re: [xap_automation] 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
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >> Yahoo! Groups Links
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> > 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.