Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return User Usage Limits / Current Usage towards Throttle Limits #126

Closed
tyeth opened this issue Jul 29, 2024 · 2 comments · Fixed by #127
Closed

Return User Usage Limits / Current Usage towards Throttle Limits #126

tyeth opened this issue Jul 29, 2024 · 2 comments · Fixed by #127
Assignees

Comments

@tyeth
Copy link
Contributor

tyeth commented Jul 29, 2024

There is an API endpoint for fetching the current users data rate information. See the IO HTTP API Docs here: https://io.adafruit.com/api/docs/#get-detailed-user-info

The endpoint is https://io.adafruit.com/api/v2/tyeth/throttle where tyeth is your username.
The result looks like this:

{
    "data_rate_limit": 90,
    "active_data_rate": 2,
    "authentication_rate": 0,
    "subscribe_authorization_rate": 0,
    "publish_authorization_rate": 0,
    "hourly_ban_rate": 0,
    "mqtt_ban_error_message": null,
    "sms_message_limit": 0
}

It would be useful to have this available to users via a method built into the IO_HTTP class.
Ideally the MQTT class would also support this functionality, but it is currently not available over the MQTT broker (AFAIK).

@tyeth
Copy link
Contributor Author

tyeth commented Jul 29, 2024

Tagging @CedarGroveStudios as they mentioned wanting such a feature in their adafruit-playground note about the Weather APIs:
https://adafruit-playground.com/u/CGrover/pages/aio-weather-a-premium-alternative-for-local-observations#wish-list-3175903

@CedarGroveStudios
Copy link

Tagging @CedarGroveStudios as they mentioned wanting such a feature in their adafruit-playground note about the Weather APIs: https://adafruit-playground.com/u/CGrover/pages/aio-weather-a-premium-alternative-for-local-observations#wish-list-3175903

Thank you! Indeed it would be useful if a device could autonomously monitor shared feed rate status. That would make it much easier to support multiple independent project devices that need to use the same AIO feeds.

@tyeth tyeth self-assigned this Aug 5, 2024
tyeth added a commit that referenced this issue Aug 5, 2024
Return User Usage Limits / Current Usage towards Throttle Limits with `receive_user_rate_info`
Return full account info with `receive_user_info`
Fixes #126
tyeth added a commit that referenced this issue Aug 5, 2024
Return User Usage Limits / Current Usage towards Throttle Limits with `receive_user_rate_info`
Return full account info with `receive_user_info`
Fixes #126
tyeth added a commit that referenced this issue Aug 5, 2024
Return User Usage Limits / Current Usage towards Throttle Limits with `receive_user_rate_info`
Return full account info with `receive_user_info`
Fixes #126
@tyeth tyeth closed this as completed in #127 Oct 4, 2024
@tyeth tyeth closed this as completed in 6d7abbc Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants