Module spin_sdk.mqtt

Module for utilizing Spin Outbound MQTT

Functions

def open(address: str, username: str, password: str, keep_alive_interval_in_secs: int) ‑> Connection

Open a connection to the Mqtt instance at address.

A Err(Error_InvalidAddress) will be raised if the connection string is invalid.

A Err(Error_TooManyConnections) will be raised if there are too many open connections. Closing one or more previously opened connection using the __exit__ method might help.

A Err(Error_ConnectionFailed) will be raised if the connection failed.

A Err(Error_Other(str)) when some other error occurs.