pyiot package

Submodules

pyiot.iot module

IoT Module This module contains methods to handle MQTT + HTTP requests.

pyiot.iot.mqtt_publish(arg_broker_url, arg_broker_port, arg_mqtt_topic, arg_mqtt_message, arg_mqtt_qos)

MQTT Sub : Publishes to MQTT

This method published to any MQTT topic.

Parameters
  • arg_broker_url (string) – MQTT broker URL.

  • arg_broker_port (int) – Port to connect to the MQTT broker.

  • arg_mqtt_topic (string) – Topic to listen to on the MQTT port.

  • arg_mqtt_message (string) – The message string that needs to be published.

  • arg_mqtt_qos (int) – Quality of Service ranges between 0-2.

pyiot.iot.mqtt_subscribe_thread_start(arg_callback_func, arg_broker_url, arg_broker_port, arg_mqtt_topic, arg_mqtt_qos)

MQTT Sub Thread : Subscribes to MQTT

This method subscribes to any MQTT topic.

Parameters
  • arg_callback_func (function) – Function to execute on receiving a message.

  • arg_broker_url (string) – MQTT broker URL.

  • arg_broker_port (int) – Port to connect to the MQTT broker.

  • arg_mqtt_topic (string) – Topic to listen to on the MQTT port.

  • arg_mqtt_qos (int) – Quality of Service ranges between 0-2.

pyiot.iot.publish_to_spreadsheet(**kwargs)

HTTP Pub : Publish to Spreadsheet (Variardic Function)

Parameters

**kwargs – Varaible number of keyworded arguments containing HTTP request params.

Module contents