This shows you the differences between two versions of the page.
uphp:functions:mqtt_subscribe [2017/09/27 10:46] admin |
uphp:functions:mqtt_subscribe [2021/09/13 05:57] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======mqtt_subscribe====== | ||
- | |||
- | < | ||
- | |||
- | Subscribe to an MQTT channel | ||
- | |||
- | ====Description==== | ||
- | |||
- | <well size=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | </ | ||
- | |||
- | ====Parameters==== | ||
- | |||
- | < | ||
- | |||
- | < | ||
- | |||
- | ====Return Values==== | ||
- | |||
- | 1 if successful and 0 on failure | ||
- | |||
- | ====Example==== | ||
- | |||
- | <code php> | ||
- | <? | ||
- | |||
- | // Use the # as a wildcard so any messages to /cluster/1/ or its sub channels will be received | ||
- | |||
- | mqtt_subscribe("/ | ||
- | ?> | ||
- | </ | ||
- | |||
- | ====See Also==== | ||
- | |||
- | [[mqtt_publish()]] - Publish to an MQTT channel | ||