-1

request time from thingsboard.io through its time plugin RPC using MQTT.
will it be accurate.

zulfi007
  • 93
  • 1
  • 9

1 Answers1

0
def getTime():
requestId = '1'
request = {
    "method": "getTime",
    "params": {}
}
client.publish('v1/devices/me/rpc/request/' + requestId, json.dumps(request))

and subsrcibe to rpc on connect callback.

zulfi007
  • 93
  • 1
  • 9