HOME Forums Software Open Source Development API Example’s for ZBPServer and Harmony line of Gateways

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Anonymous
    Inactive
    Post count: 259

    If you are looking to develop an APP for the ZBPServer, Harmony Gateway, Harmony Platinum, Harmony P2 or Harmony P3, then you can follow the steps below to get started.

    Please refer http://wiki.smartenit.com/api for the API documentation. The API responses below are examples, you might get responses with different values.

    Please remember to add a null byte at the end of every packet sent to the Gateway, otherwise the Gateway will ignore the packets. In the XML Arguments, you can use either base values as 10(Decimal) or 16(Hexadecimal). If the base value is not included then the Gateway assumes the default base value which is set to 16.

    1. Authenticate your client:

    ZBP_System
    Sys_Authenticate

    09cbef6f2f30e9bf9a202c53142295478786d5f3 This string is SHA-1 hash for “Smartenit”

    26824

    ………………………………………..
    Response Received:
    ………………………………………..

    ZBP_System
    Sys_Authenticate

    3

    26824

    2. Get the Nodes(Devices) List:
    ………………………………………..

    ZBP_Node
    Node_GetNumNodes
    20964

    ………………………………………..
    Response Received:
    ………………………………………..

    ZBP_Node
    Node_GetNumNodes

    9
    34dc

    19761

    ………………………………………..
    Response Received:
    ………………………………………..

    ZBP_Node
    Node_GetNode

    0
    34dc
    62
    0
    X10
    []
    X10
    X10 Lamp
    X10.png
    X10


    19761

    4. Control Device:
    X10

    ZBP_Node
    Node_ClusterCommand

    2
    34dc
    0
    0
    0
    [2] //Use [3] to Turn Off

    10154

    INSTEON

    ZBP_Node
    Node_ClusterCommand

    2
    88ae
    0
    0
    0
    [11,ff] //Use [13,00] to Turn Off

    10154

    Zigbee, we will use ZBMPlug15 as an Example

    ZBP_Node
    Node_ClusterCommand

    18
    27547 //Note here we are using base value as 10, so the device id must be converted to decimal.
    1 This is argument is for EndPoint, ZBMPlug15 OnOff Cluster is on Endpoint 1. Make sure you use the correct endpoint for your device
    6 6 is the OnOff Cluster
    1 //Use [3] to Turn Off
    []

    11163

    ………………………………………..
    Response Received:
    ………………………………………..

    ZBP_Node
    Node_ClusterCommand

    0 //0 = Request processed successfully

    10154

    ………………………………………..
    5. Request On Off or Dimmer Status:
    Zigbee

    ZBP_Node
    Node_ClusterCommand

    146
    27547 This is the 6B9B device which is the ZBMPlug15
    1
    6
    0
    [1,0,0] [1 = Number of Attributes, 0,0 = Attibute ID 0x0000 which is OnOff Status] These are defined in the Zigbee Spec

    8840

    ………………………………………..
    Response Received:
    ………………………………………..

    Node_ClusterCmdRsp

    b2
    6b9b
    1
    6
    1
    1
    [0,0,0,10,0] [0,0 Attribute ID 0x0000 which was requested, 0 = Success, 10 = Data Type which is 1 byte, 0 = Status which is OFF and 1 is ON ]
    1

    INSTEON

    ZBP_Node
    Node_ClusterCommand

    0
    88ae
    0
    0
    0
    [19,0]

    63184

    ………………………………………..
    Response Received:
    ………………………………………..

    Node_ClusterCmdRsp

    0
    88ae
    0
    0
    0
    0
    [23,0,ff] //[23 = dont care, 0 = dont care, ff = OnOff/Dimmer Level]
    0

    Anonymous
    Inactive
    Post count: 259

    Examples of API for Zigbee Dimmers:

    REQUEST DIMMER LEVEL:

    ZBP_Node
    Node_ClusterCommand

    146
    27547
    1
    8
    0
    [1,0,0]

    8840

    STATUS RESPONSE:

    Node_ClusterCmdRsp

    b2
    6b9b
    1
    8
    1
    1
    [0,0,0,20,level_value_0to_255] [0,0 Attribute ID 0x0000 which was requested, 0 = Success, 10 = Data Type which is 1 byte, level_value_0to_255 = Dimmer value from 0 to 255 ]
    1

    CHANGE DIMMER LEVEL:

    ZBP_Node
    Node_ClusterCommand

    146
    27547
    1
    8
    4 {Command: Move to Level}
    [level_value_0to_255,0,0]

    8840

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.