milo526 / homebridge-tuya-web

Hoobs and Homebridge plugin for Tuya devices using Home Assistant Tuya Web Api
MIT License
217 stars 93 forks source link

Handle "auth exceed" error from Tuya API #537

Closed rmfalco89 closed 1 year ago

rmfalco89 commented 1 year ago

This PR addresses a bug preventing the plugin from working around the authentication error "auth exceeded" returned by the Tuya API when authentication is attempted more frequently than once every 180 seconds.

The code to handle this was already there, but it was checking for an exact string that doesn't match the error message currently returned by the Tuya API (which says "180 seconds" instead of 60): data.errorMsg === "you cannot auth exceed once in 60 seconds"

In order to fix this, I

@milo526 please take a look!

github-actions[bot] commented 1 year ago

This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.