Are states cached? - Getting "too many requests" error #231
-
Basically what the title is asking... I have some automations that I am trying to use with my Wyze lock to make unlocking the door more reliable (the Wyze app is pretty terrible with this). As sometimes I had my automation trying to lock the door when I was leaving home, I added a condition to check that the door wasn't currently open before trying to lock it (wife complained that it locked while she had it open a few times). I also went ahead and added one the check if the door was locked before trying to unlock it. Now, tonight I've started getting I can provide more info, such as the automations yaml if that helps. Not really sure how to see how many requests this integration is actually making though. Maybe there's just something up with Wyze today too. |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 13 replies
-
I am having the same problem. They seem to have implemented rate limiting. To overcome this we need to figure out what the limit is and adjust to reduce the amount of requests we perform |
Beta Was this translation helpful? Give feedback.
-
I really hope so. This is definitely an annoying problem and will be a bear to work around if they do not remove the rate limitation.
It sucks that we have to hit their API so hard to get the information we need but without an official API (with a real events endpoint) it is basically impossible.
- Josh Mulliken
…On Tue, Aug 17, 2021, at 1:48 AM, Matt Reed wrote:
There is a discussion on their official forum here: https://forums.wyzecam.com/t/failed-to-update-device-list-error-code-3044/191684/22
FWIW, the Wyze representative says this will be fixed tomorrow. I hope that means they're just turning off the rate limitation (forever)?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#231 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AIU2G3YFPTS3SFPQBNNGITDT5HZ4NANCNFSM5CI2HB6A>.
|
Beta Was this translation helpful? Give feedback.
-
I personally use the state of the lock a lot. There are cases when others
in the household lock/unlock the door either with the key/manually or with
the wyze app if they don't have access to HA and not having an accurate
depiction of the current state of the lock can get annoying sometimes. I
personally have automations and only really use HA to lock/unlock but it is
nice to have it natively work with the wyze app as well (in case I need to
share temp access to others without giving them access to HA). All in all,
we just need Wyze to get wise to the fact that they need a stinkin legit
API! </EndRant>
…On Tue, Aug 17, 2021 at 4:26 PM Joe Schubert ***@***.***> wrote:
This isn't a bad solution, depending on people's use cases.
For instance, I'm only really using this to unlock/lock my door at the
moment. Which, I can really just send the commands blind to do this.
Maybe have a configurable option that sets it to stateless? I know, that's
a good bit of extra code to check against.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#231 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOPJRXNRAKBP7EIAAAT7LL3T5LAYJANCNFSM5CI2HB6A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Beta Was this translation helpful? Give feedback.
-
This is the mentality we should all maintain and speak to with a unified voice. This is my hardware that I paid good money for. Wyse broke it. Wyze refuses to publish an API. If Wyze doesn’t fix it, I demand they give me my money back!. None of this I’m going to replace it crap I want my money back!! Some are so used to being screwed by corporations that they don’t know what’s normal. This is not normal. It’s outrageous! |
Beta Was this translation helpful? Give feedback.
-
The sad thing is that I just got ha-wyzeapi included as a default repo in HACS haha
… On Aug 18, 2021, at 9:18 AM, Joe Schubert ***@***.***> wrote:
While I've gotten less and less impressed with Wyze in the past year or so that I've owned they're devices... I don't know that you really have a basis to demand a refund. They never had, offered, or promised a public API. I also think that they should publish one, but you bought the device without an API.
I DO think it's ridiculous though to completely break functionality though without warning like they did.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#231 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AIU2G3ZD4WBJMZ75GFI3CK3T5OXKBANCNFSM5CI2HB6A>.
|
Beta Was this translation helpful? Give feedback.
-
The app and API are working for me again, though there hasn’t been any word from Wyze as far as I’m aware. Perhaps they just reverted the change for now? I don’t know how hard it would be, but perhaps a stateless mode would still be a good feature to put on the development path. |
Beta Was this translation helpful? Give feedback.
-
I wonder if changing some of the polling intervals might help. I did a quick search in the repo for "SCAN_INTERVAL". It looks like most things are set to 30 seconds, locks are 10 and binary sensors are whatever their default is (a value isn't specified in this integration). Maybe upping those to 1 minute would alleviate some of the load for wyze? Obviously a push endpoint would completely alleviate the load for them, if they would just implement that. |
Beta Was this translation helpful? Give feedback.
-
Updates from my conversation with WyzeTLDR: Some functionality has to go away (motion sensors, contact sensors, and camera motion detection). We account for over 50% of their traffic while being a very small minority of their userbase. I would like to request some help fixing a bug with the auth endpoint -> contact me here if you can help: [email protected] My conversation with the people at Wyze was very productive. We are planning a way forward to continue the integration with HA while being good citizens of their platform. Based on the information I have from this repo and the limited information they were able to share, this integration is used by between 1,000-10,000 individual HA instances. This number is increasing steadily; however, it is still a tiny fraction of the multiple millions of people who use their services. Even though we are such a small percentage of their userbase, we account for over 50% of the traffic to their servers. This amounts to a tangible cost (monetarily for Wyze) and usability effect on the rest of their users. Issues that need to be resolvedPoint 1: Motion Sensors, Contact Sensors, and Camera Motion DetectionThey want me to disable the binary sensor devices as these are absolutely pummeling their servers. I will release an update tonight that removes them entirely until we can find another way to implement them. If we don't all upgrade to that version and stop requesting from their API for those devices, they have said they are considering shutting down all access from Home Assistant. Point 2: Requests to the Auth EndpointThey have also informed me that we have a bug that is causing requests to their authorization endpoint way more than is necessary (1 for every request) which I will be investigating <- and would appreciate any debugging assistance on this point from the community Updates on Public APIs/Legit Home Assistant IntegrationSome employees of Wyze use the integration 😄!! They definitely want it to keep working! I asked about APIs or methods that I could use to reduce the load on their servers while still maintaining all functionality, and they were unable to speak to their future roadmap. They offered me an NDA, but since I am speaking to you now, it should be obvious that I declined. They have promised to share information on how to implement the 2FA in line with their requirements going forward and did say that they will be requiring 2FA for all logins at some point in the near future. I will be working with them to ensure that this is working in the integration before that requirement is in place. It is unclear when or if the devices that require up-to-date state information (motion sensors, contact sensors, and camera motion detection) will be available again. For any additional discussion surrounding this issue I have created a Github Discussion forum here: #232 |
Beta Was this translation helpful? Give feedback.
-
Thanks Joe!
I have logic that I thought would only request once ever hour but it seems to be buggy so any additional eyes on it will be great!
The repo that that code lives in is here: https://github.com/JoshuaMulliken/wyzeapy
… On Aug 18, 2021, at 4:05 PM, Joe Schubert ***@***.***> wrote:
I don't have a lot of free time, but I'd be happy to try and help with this however we can.
I can tell your that between this and the wyze updater that wyzehacks uses (I posted about it since they have working 2fa in a different discussion)... It looks like you don't store the login token once you login, so it has to get requested repeatedly. I haven't dug in alot because I'm not super familiar with HA integrations....but I'm going to start digging into it now.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#231 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AIU2G37REDT54Z2C4P6YX5DT5QHA3ANCNFSM5CI2HB6A>.
|
Beta Was this translation helpful? Give feedback.
-
I am asking for their logs that show the repeated auth requests. I have not had success replicating their issue
…Sent from my iPhone
On Aug 18, 2021, at 5:35 PM, Joe Schubert ***@***.***> wrote:
Np. I'm having some difficulty getting the remote debugger setup properly to hook into the Home Assistant instance. My first though is that HA doesn't keep the wyzeapy library in memory, or the full class isn't being passed back properly. Which would definitely lend toward it having to re-login everytime a command is issued, subs there's no existing login
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
Updates from my conversation with Wyze
TLDR: Some functionality has to go away (motion sensors, contact sensors, and camera motion detection). We account for over 50% of their traffic while being a very small minority of their userbase. I would like to request some help fixing a bug with the auth endpoint -> contact me here if you can help: [email protected]
My conversation with the people at Wyze was very productive. We are planning a way forward to continue the integration with HA while being good citizens of their platform.
Based on the information I have from this repo and the limited information they were able to share, this integration is used by between 1,000-10,000 individual HA…