Announcement

Collapse
No announcement yet.

Speech Client as an event condition

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Speech Client as an event condition

    Is it possible to make a condition based on the 'host:instance' data passed from the speaker client? IE: the Living Room speaker client hears and passes "Turn on the TV" and the living room TV turns on because an If/ELSE/Then statement exists somewhere in the event script similar to the following:

    DoEvent Turn on the TV

    IF from LivingRoom:Speaker
    THEN DoCMD LR_TV_ON ELSE Sub1

    Sub1: IF Command "Turn on the TV" from BedRoom:Speaker
    THEN DoCMD BR_TV_ON ELSE Sub2

    Sub2: IF Command "Turn on the TV" from BathRoom:Speaker
    THEN DoCMD BATH_TV_ON

    END Sub
    END

    Is it possible? If so where can I find guidance on how to write the scripting in an appropriate fashion?

    Thanks in advance for the help!

    #2
    Check out these 2 functions in the HomeSeer help files. These may work for you.
    LastVoiceCommandHost
    LastVoiceCommandInstance

    Comment

    Working...
    X