Updated on 2022-08-11 GMT+08:00

Device Twin Modification

This topic is used to publish device twin modifications.

Topic

$hw/events/device/{device_id}/twin/update

Parameter

Type

Description

device_id

String

End device ID.

Usage

Use an MQTT client to publish this topic. This topic must be used together with Device Twin Modification Result.

Parameter Description

Parameter

Type

Description

event_id

String

Event ID.

timestamp

Int64

Timestamp when the event occurred.

twin

Object

A set of device twin information to be modified. The twin property is in the key-value pair format. The key is the name of the twin property to be modified, and the value contains the expected value of the expected status to be modified or the actual value of the actual status to be modified.

Example

$hw/events/device/ab39361a-6fc0-4c94-b919-72b1e08ca690/twin/update

{
     "event_id":"123457",
     "twin":{
         "state":{
             "actual":{
                 "value":"stop"
             }
         }
     }
 }