Announcement

Collapse
No announcement yet.

CAPIControl Do_Update

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

  • CAPIControl Do_Update

    I am writing scripts and using the CAPIControl to control devices. At times, a device that I am controlling may trigger another event or action that I don't want to trigger at this time. There is a Do_Update property in the CAPIControl that looks like, when set to false, will prevent any actions from triggering when devices are changed using the CAPIControl.

    My issue is, I cannot set the Do_Update property to false. However I do it I receive an error. Has anyone used this property before, or know of another way of accomplishing what I am trying to do?

  • #2
    Interesting property - not seen that one before, I can set it to true the way I would do it but in my three seconds of testing the event always seems to fire - perhaps you could try and see what happens in your situation?

    Code:
    Sub Main(ByVal Parm As Object)
    
        Try
            Dim CpReturn As CAPIControl
            CpReturn = hs.CAPIGetSingleControl(101, True, "On", False, True)
    
            hs.writelog("", CpReturn.Do_Update)
    
            CpReturn.Do_Update = False
    
            hs.writelog("", CpReturn.Do_Update)
    
            Dim ResponseEnum As CAPIControlResponse
    
            ResponseEnum = hs.CAPIControlHandler(CpReturn)
    
            hs.writelog("", ResponseEnum)
    
        Catch ex As Exception
            hs.writelog("", "Error: " & ex.message.tostring)
        End Try
    
    
    
    End Sub
    Or you could post your method and see whether something odd is in there...
    My Plugins:

    Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
    Yeelight 3P | Nanoleaf 3P

    Comment

    Working...
    X