adafruit / Adafruit_IO_Python

Adafruit IO Python Client Library
Other
225 stars 99 forks source link

Exceeded the limit of Adafruit IO requests #14

Closed tlmyasirs closed 8 years ago

tlmyasirs commented 8 years ago

im using this librarys send function to feed my data to my Adafruit.io feeds and im using a 10sec delay inside the loop but it says

"Adafruit_IO.errors.ThrottlingError: Exceeded the limit of Adafruit IO requests in a short period of time. Please reduce the rate of requests and try again later."

why it happens with 10 sec delay and How can i fix it?

heres my code i was trying

import serial
import RPi.GPIO as GPIO
import os, time
# Import Adafruit IO REST client.
from Adafruit_IO import Client

GPIO.setmode(GPIO.BOARD)
port = serial.Serial("/dev/ttyAMA0", baudrate=9600, timeout=2)

# Set to your Adafruit IO key.
ADAFRUIT_IO_KEY = ''
aio = Client(ADAFRUIT_IO_KEY)   # port.write('A')

# Create an instance of the REST client.

# Send a value to the feed 'Test'.  This will create the feed if it doesn't
# exist already.

while True:
        rcv = port.readline(10)

        val = int(rcv)
        print val
        time.sleep(2)
        aio.send('Light', val)
        time.sleep(10)
tlmyasirs commented 8 years ago

the problem is fixed