Announcement

Collapse
No announcement yet.

Device Actions?

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

  • Device Actions?

    Hi,

    I want to create a device for my TV.
    The TV has the following commands: [ON], [OFF], [CH+], [CH-],[VOL+][VOL-].
    The Commands need to trigger scripts
    (i.e. if TV=on then [do this code] etc..).
    .
    How do I make such a device? If I make a fake Device using the IR panel, I can set up all the commands in the Control Panel -- but none of them show up in the Device Actions Tab of an Event.

    Ugh.

    Please help!

  • #2
    skavan,
    You need to use the command DeviceValueAdd. You can find information on this in the online help files. Here's an example that will add buttons to a virtual tv.
    Code:
    hs.DeviceValuesAdd "Z1","On" & chr(2) & "0" & chr(1) & _
    	                     "Off" & chr(2) & "1" & chr(1) & _
                                      "CH+" & chr(2) & "2" ,True
    -Rupp
    sigpic

    Comment

    Working...
    X