publish multiple values to thingspeak using MQTT

I am trying to publish a multiple random data using mqtt to send data from raspberry pi to thingspeaks. i want to publish the 10 values of temp to thingspeaks field but it limits me to one value every 15 seconds. so is there anyway to send a list of values every 15 second to graph it with time in thingspeaks channels??

    temp = []
    current = []
  # get the system performance data over 20 seconds.
  for i in range(10):
     temp.append(random.randint(0, 100))
     current.append(random.randint(0, 100))
  # build the payload string.
  payload = "field1=" + str(temp) + "&field2=" + str(current)
  # attempt to publish this data to the topic
     publish.single(topic, payload, hostname=mqttHost, transport=tTransport, port=tPort,auth=
        print (" Published temp =",temp," current =", current," to host: " , mqttHost , " clientID= " , clientID)
   except (KeyboardInterrupt):

     print ("There was an error while publishing the data.")

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.