|  Developer
Updated on April 24, 2023

mqtt.client.register

  • Request from an MQTT client to the MQTT gateway addon to register MQTT client . This allows the MQTT gateway to forward request/response messages to/from the client. MQTT gateway will forward the request/response messages to the client on client’s MQTT topic.
  • Client name must start with “mqtt.” prefix
  • Client name can contain up to 32 characters
Edit
Edit
Field Type Required Description
name string + Name of the MQTT client. Client should be subscribed to the MQTT topic with this name to receive requests and responses
Edit
Edit
Edit
				
					{
  "msg_group": "addon.mqtt_gateway",
  "msg_class": "request",
  "msg_subclass": "mqtt.client.register",
  "result": {
    "requestBody": {
      "name": "mqtt.test_client"
    },
    "sender": "mqtt.test_client",
    "uuid": "63e134860000000174696001"
  }
}				
			
Edit
				
					{
  "msg_class": "response",
  "msg_group": "mqtt.test_client",
  "msg_subclass": "ResponseResult",
  "result": {
    "responseBody": {},
    "uuid": "63e134860000000174696001"
  }
}				
			
Edit
Code Message Data
-32500 Invalid MQTT client name