No announcement yet.

CAPI Control Syntax

  • Filter
  • Time
  • Show
Clear All
new posts

  • CAPI Control Syntax

    I'm new to homeseer and trying to figure out CAPI control. I have the tenholder app which is wonderful, but I would like to understand what the code is sending. For instance,

    hs.CAPIControlHandler(hs.CAPIGetSingleControl(704,True,"on", False,False))

    704 - device reference id
    True - ?
    On - command string
    False - ?
    False - ?

    Can I send values to a device instead of strings? Ex: 69 instead of dim 69%


  • #2
    The documentation sort of vaguely eludes to these extra parameters here

    The first boolean being "ByVal ExactCase As Boolean" and the second being "ByVal Contains As Boolean", I would infer from this that whatever you passed to parameter three (label) it checked if it was the exact case ("on" vs. "ON" vs. "On" - although I'm not sure why in reality you would need this set to true?) and the second one being if it contained part of the string ("Dim 72%" is the CAPI string, send "72%" and then set this to true and it should match). I'm not sure if someone has done any testing with these however and most appear just set both to false.
    My Plugins:

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


    • #3
      Thank you very much for the response. I saw that page in the documentation, but couldn't make sense of it until you pointed it out. I wish the pages were more consistently documented in the help file. This is going along way to help me and my understanding though.