-
Notifications
You must be signed in to change notification settings - Fork 17
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
App Request Limiting #20
Comments
Hi! |
The non-classic300s component used 30 seconds. I'll update the scan interval to hourly and see if it stabilizes. Will I break any of the logic by changing the scan interval to be greater than the debounce cooldown of 15s? |
It shouldn't. |
Perfect! Thanks so much! I'll set a reminder to update/close this issue in a week or so with my actions and the result. |
Thank you! I'm curious why I have no problem like that... |
Other than my having left the android app installed and running most of the time, I'm not sure. If the integration is truly touching the API once per second then that greatly exceeds the limitations vesync has told me about (86400/day through HA w/ a 1-device limit of 4700/day allowed by vesync). Perhaps since my vesync account was created after this limitation was imposed, presumably, maybe accounts created before that limitation was imposed aren't subject to it? I run a local DNS server and have a firewall that can intercept encrypted traffic, but I dont see how either of those would set off red-flags on their servers. I just assume its a rate-limiting thing. |
I don't think it's once a second. But I will definitely check it. |
I just assumed that's what the scan interval was referring to. I'm a novice, at best, in programming and have extremely limited understanding when it comes to APIs. I'm stubborn enough to fight the technicalities when it comes to my smarthome. If you have any ideas on limiting the number of API calls/polls I'm open to suggestion and can pull logs/data if needed, just let me know. I'll update the scan interval just to see where it gets me. |
Well if the only way is to rate-limit, then this is the way to do it... Good that we use coordinator for that - it is already drastically reducing calls count (it basically gets updates for all entities at once instead of pulling each state separately. |
So, what I may do is change the scan interval to 30 seconds - 2880 API calls/polls per day, which will be well under the vesync limit of 4700 w/ a single device. I'm fine w/ a 30 second delay. I suspect HA will change the state blind, much like it does with other stateless integrations like the bond pro, and unless someone makes an app-change or a manual change on the humidifier, i shouldn't notice the delay at all. If it locks up again, I may just return it for another HA-supported option or smart-plug+dumb-humidifier w/ a temp/humidity sensor for a thermostat card. I'm fine using cloud integrations if they work, but the industry is shifting to force you onto proprietary apps despite having a public API, albeit unsupported. |
Hey, thanks for the custom integration, it worked well for a few hours then I had the same issue being locked out of the app and HA can't control the device. from Thanks! |
Yes, you can do that. |
I'm curious if official integration has same trouble. Mine is basically fork of official... |
Yeah, I was reading through the core integration issues and they've had some problems lately of devices not showing up, only a portion of devices, etc. I didn't see anything about the API lockout issue I mentioned here. I'm on the Vesync app for the time being until the core integration gets sorted. Editing the scan interval induced a lag on the HA side, not just in manually controlling the humidifier on the unit itself - and I got another lockout after about a week of use. I'm assuming that it's something in the core integration causing it, that and for whatever reason I couldn't set the humidifier back to Auto mode when it was 'On'. I'm still stubborn enough to try and make these work, worst case I'll go dumb humidifier + smart plug + temp/humi sensor. |
I have humidifier and purifier from Levoit. Sad that they did this. But it's usual situation with vendor-locked devices. Both of devices use ESP chip. I tried to find any existing work on probable firmware replacing, but found nothing. So for now I'm just staying quiet and see what will happen... |
100%, I'm in no way trying to imply that the issue lies with you or the contributors to the core integration. Y'all can only work within the confines that are defined by Levoit/Vesync. I got 2x more humidifiers for a holiday gift so I'm especially motivated to wait for a solution. I'm also curious to see if someone writes firmware for the onboard ESP or a replacement ESP, that's something I could reasonably handle. I've been out of the coding game for way too long to try and get back up to speed and contribute lol |
Situation:
Setup Classic 300s
Configured in android app
Downloaded and installed this integration, setting it up w/in HA
Several days later my account was rate limited and effectively disabled for about 24 hours, I had to log out of the app, remove the integration, and wait for everything to return to normal before I had app control again. The integration w/in HA was still enabled and didn't show any errors but the device wasn't populating or available. I haven't reinstalled the integration due to some information I've been given by Vesync, which I'll put below.
In looking through reddit threads about the same issue, I came across this comment which explains that changing the polling cadence seems to have resolved it. However, in looking at the noted location (realizing that this is for a different integration from which yours is a branch, I think?) I wasn't able to locate the update_interval to manually update the polling cadence.
I'm hesitant to reinstall the integration since, when this issue arises, it also precludes me from controlling the humidifier w/in the Vesync app as well. Do you have some guidance on how I can proceed? Everything worked very well when it was functioning and I'd like to get the integration setup and stabilized before integrating more Levoit devices into my smarthome.
The text was updated successfully, but these errors were encountered: