Set a new dimmer level value

Our example shows how to execute a Functional Item operation that adjusts a property value of a dimmer attached to a gateway.
The gateway to dimmer communication follows the ZigBee protocol.

See Demos with a dimmer device based on ZigBee protocol for the prerequisites.

The section is structured as follows:

Goal

To set a new level value on a dimmer device represented by da:device:ZigBee:3, you have to invoke a $set.configuration/value operation of the device item da:item:ZigBee:3:1:TransitionActuator.

Below is an example how this can be accomplished via the Bosch IoT Things API.

Request

Use the API docs of Bosch IoT Things

  • Authorize with a fresh Suite OAuth token.
    See Device provisioning > Authorize.

  • Message resource

    • POST /things/{thingId}/features/{featureId}/inbox/messages/{messageSubject}
      Send a message TO a specific feature of a specific thing

    • Set the thingId as follows: <your.namespace>:<your-gateway-id>:<your:device:id>
      In our example <your:device:id> maps to the Device Functional Item, i.e. the thingID must be: com.mycompany.example:gateway-001:da:device:ZigBee:3.

    • Set the featureId as follows: <ShortInterfaceName_index>
      In our example, the featureIdTransitionActuator_1 maps to the Device Item ID: da:item:ZigBee:3:1:TransitionActuator.

    • Set the operation ID into the messageSubject field
      In our example operation ID: $set.configuration/value

    • Set the body that contains all necessary arguments:

      max level is 254
      {
      "unit":{"symbol":"1", "systemName":"SI"},
      "value": {"value":"254"}
      }
      medium value
      {
      "unit":{"symbol":"1", "systemName":"SI"},
      "value": {"value":"128"}
      }
      min level is 0
      {
      "unit":{"symbol":"1", "systemName":"SI"},
      "value": {"value":"0"}
      }
    • Click Execute.

Response

Check if the returned response code and response message are successful.

Check the result

In case everything was successful, you should see the updated parameters on the WebAdmin console provided by Bosch IoT Gateway Software.