Skip to content

Airthings stops responding after some hours (even with few calls) #6

Description

@64jcl

I was hosting access to this API through a server on localhost using Flask and uses the API in the simplest way:

airthings = Airthings(client_id=client_id, client_secret=client_secret, is_metric=True)
airthings.update_devices()

output = {
   serial: serialize_device(dev)
   for serial, dev in airthings.devices.items()
}

This is being done on every request to the server so I do not cache the Airthings instance. I see that the update_devices() does a verify_auth() call so it should have been correct I think. Is there perhaps some limitation to how many oauths you can do in a day?

If i restart my server it works fine again so something is being cached or the oauth requests are being rejected from your servers after some time. I only really refresh this ever 30 minutes so it should be within the free dev request counts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions