Similar to the GET function in HTTP, subscribe is the method used to obtain values, but with one important difference: you do not have to continuously ask the server for each value in your custom script.
For example, if a variable's value changes, Ubidots automatically notifies you of the change. This saves data requests, processing time for your device, and overall project costs. That's why MQTT is a recommended communication protocol for implementing firmware routines to control actuators.
The Subscribe topic structure is as follows:
/v1.6/devices/{DEVICE_LABEL}/{VARIABLE_LABEL}/v2.0/devices/{DEVICE_LABEL}/{VARIABLE_LABEL}
