code: def publish_single(self, topic, payload=None, qos=0, retain=False,
              hostname="localhost", port=1883, client_id="", keepalive=60,
              will=None, auth=None, tls=None, protocol=mqtt.MQTTv31):
  
          
          logger.info('Publishing to: %s:%s, topic: %s, payload: %s, qos: %s' %
                      (hostname, port, topic, payload, qos))
          publish.single(topic, payload, qos, retain, hostname, port,
                          client_id, keepalive, will, auth, tls, protocol)
docs: Publish a single message and disconnect. This keyword uses the
          [http://eclipse.org/paho/clients/python/docs/#single|single]
          function of publish module.
  
          `topic` topic to which the message will be published
  
          `payload` message payload to publish (default None)
  
          `qos` qos of the message (default 0)
  
          `retain` retain flag (True or False, default False)
  
          `hostname` MQTT broker host (default localhost)
  
          `port` broker port (default 1883)
  
          `client_id` if not specified, a random id is generated
  
          `keepalive` keepalive timeout value for client
  
          `will` a dict containing will parameters for client:
              will = {'topic': "<topic>", 'payload':"<payload">, 'qos':<qos>,
                  'retain':<retain>}
  
          `auth` a dict containing authentication parameters for the client:
              auth = {'username':"<username>", 'password':"<password>"}
  
          `tls` a dict containing TLS configuration parameters for the client:
              dict = {'ca_certs':"<ca_certs>", 'certfile':"<certfile>",
                  'keyfile':"<keyfile>", 'tls_version':"<tls_version>",
                  'ciphers':"<ciphers">}
  
          `protocol` MQTT protocol version (MQTTv31 or MQTTv311)
  
          Example:
  
          Publish a message on specified topic and disconnect:
          | Publish Single | topic=t/mqtt | payload=test | hostname=127.0.0.1 |