|  Developer
Updated on March 8, 2023

hub.cloud.subscription.create

Connection Type:

  • Create a subscription on the controller
Edit
Field Type Required Description
abstractUUID string + Abstract unique id
gatewayName string Name of the gateway (plugin) to redirect this request
mappings array + List of abstracts to be mapped to hub items
mappings[].capability string + Capability of an abstract. Note: firmware items does not have analogy for this field
mappings[].variable string + Variable of an abstract. Note: this field is similar to name of a firmware item
mappings[].valueType string + Value type. This field is similar to item /
mappings[].dictionaryType bool + Whether item value is a dictionary type
mappings[].value depends on + Value of an abstract
Edit

NOTE: Controller will receive this command and in response to this request will create a device that represents subscription and create an item for each abstract. Device name is value. Device , and device is “abstract”. Item name is combination of capability and variable fields: name = + “.” + .

Edit
Edit
				
					{
    "method": "hub.cloud.subscription.create",
    "id": "_ID_",
    "params": {
        "abstractUUID": "1234-abcd-...",
        "mappings": [
            {
                "capability": "power",
                "variable": "status",
                "valueType": "int",
                "dictionaryType": false,
                "value": 1
            },
            {
                "capability": "indicator",
                "variable": "status",
                "valueType": "string",
                "dictionaryType": false,
                "value": "test-string"
            }
        ]
    }
}				
			
Edit
				
					{
    "error": null,
    "id": "_ID_",
    "method": "hub.cloud.subscription.create",
    "result": {},
}