Announcement

Collapse
No announcement yet.

Creating a Device Status Change Event

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

    Creating a Device Status Change Event

    I'm trying to create a Device Status Change event in my script. I want it to trigger on ANY change. The documentation is not clear on how to designate that condition.

    It looks like I need to set ev_abs_time to TYPE_STATUS_CHANGE(11) and ev_trig_hc to the device reference number. But, what do I set ev_trig_dc to?

    Grant
    System configuration in my profile

    #2
    Sorry it took so long to get an answer but I have been battling this for a while myself and finally figured it out. Here is the code and a list of what the different number will set trigger to.

    Code:
    ev.ev_abs_time = 11
    ev.ev_trig_hc=ref
    ev.ev_trig_dc="18"
    1= all lights on
    2= on
    3= off
    4= dim
    5= bright
    6= all lights off
    7= extended
    8= hail request
    9= hail ack
    10= preset dim
    11= preset dim2
    12= ex data xfer
    13= status on
    14= status off
    15= status request
    16= dim to off
    17= unknown
    18= any
    19= value set
    20= value increment
    21= set to on
    22= set to off
    23= set to any status
    24= value decrement

    Hope this helps

    Comment


      #3
      Originally posted by Grant
      I'm trying to create a Device Status Change event in my script. I want it to trigger on ANY change. The documentation is not clear on how to designate that condition.

      It looks like I need to set ev_abs_time to TYPE_STATUS_CHANGE(11) and ev_trig_hc to the device reference number. But, what do I set ev_trig_dc to?

      Grant
      System configuration in my profile
      Hi Grant,

      I am not sure what you are trying to do here. The easy way is to use the command "SetDeviceStatus" then you state what you wish it set to.

      Are you applying conditions to this happening? That should not be a problem, this is basic HS1 and works perfect with HS2.0 & .1

      SetDeviceStatus is a built in HS command that will change the status of the device to whatever you wish.
      sigpic
      A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

      Comment

      Working...
      X