Closed joewilliamsca closed 4 years ago
Yes. I’ve seen the same error appear in the logs. But haven’t had time to investigate yet.
Thanks for the input.
Van: Joe Williams notifications@github.com Verzonden: Sunday, June 9, 2019 9:39:00 PM Aan: martijndierckx/homebridge-hydrawise CC: Subscribed Onderwerp: [martijndierckx/homebridge-hydrawise] Over-polling of the Hydrawise API (#6)
Hi all,
Seeing this error coming from the plugin when I was setting it up in Homebridge today. The 429 from Request appears that I was making too many polling requests to the API. Has anyone else seen this error?
I have moved the polling interval to 30 seconds (30000) and it looks like its cut down on the errors being thrown in node, so I think this might be a throttling issue (unless Hunter wants to charge for API use)
Cheers, -Joe
Unhandled rejection StatusCodeError: 429 - undefined Jun 09 12:34:47 homekitbridge homebridge[21011]: at new StatusCodeError (/usr/lib/node_modules/homebridge-hydrawise/node_modules/request-promise/lib/errors.js:32:15) Jun 09 12:34:47 homekitbridge homebridge[21011]: at Request.RP$callback [as _callback] (/usr/lib/node_modules/homebridge-hydrawise/node_modules/request-promise/lib/rp.js:77:29) Jun 09 12:34:47 homekitbridge homebridge[21011]: at Request.self.callback (/usr/lib/node_modules/homebridge-hydrawise/node_modules/request/request.js:185:22) Jun 09 12:34:47 homekitbridge homebridge[21011]: at emitTwo (events.js:126:13) Jun 09 12:34:47 homekitbridge homebridge[21011]: at Request.emit (events.js:214:7) Jun 09 12:34:47 homekitbridge homebridge[21011]: at Request. (/usr/lib/node_modules/homebridge-hydrawise/node_modules/request/request.js:1161:10) Jun 09 12:34:47 homekitbridge homebridge[21011]: at emitOne (events.js:116:13) Jun 09 12:34:47 homekitbridge homebridge[21011]: at Request.emit (events.js:211:7) Jun 09 12:34:47 homekitbridge homebridge[21011]: at IncomingMessage. (/usr/lib/node_modules/homebridge-hydrawise/node_modules/request/request.js:1083:12) Jun 09 12:34:47 homekitbridge homebridge[21011]: at Object.onceWrapper (events.js:313:30) Jun 09 12:34:47 homekitbridge homebridge[21011]: at emitNone (events.js:111:20) Jun 09 12:34:47 homekitbridge homebridge[21011]: at IncomingMessage.emit (events.js:208:7) Jun 09 12:34:47 homekitbridge homebridge[21011]: at endReadableNT (_stream_readable.js:1064:12) Jun 09 12:34:47 homekitbridge homebridge[21011]: at _combinedTickCallback (internal/process/next_tick.js:139:11) Jun 09 12:34:47 homekitbridge homebridge[21011]: at process._tickCallback (internal/process/next_tick.js:181:9)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/martijndierckx/homebridge-hydrawise/issues/6?email_source=notifications&email_token=AA6KD7TMAJ472W57UCDQX5DPZVL5JA5CNFSM4HWNJK32YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GYOODUQ, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AA6KD7XIZRBVNPDPD5D32QTPZVL5JANCNFSM4HWNJK3Q.
Any chance you have had time to look at this?
Also seeing this error. Dropped my polling to 60000 and still getting errors.
Same. Increasing the polling interval to a very high number doesn't seem to resolve anything. Perhaps there's a quick fix to handle just this error/StatusErrorCode so that it doesn't crash Homebridge? Anyone familiar enough with the code want to fork and make the tweak?
Haven't had any chance to look into it. I do see the same error on my side.
I do want to know where it comes from. And worst case scenario, an error check needs to be built in as suggested above
Plugin works great thanks! Unfortunately I'm getting the error too. homebridge-0.4.50 homebridge-hydrawise 0.0.4 Pro HC 6 Station Controller 4.04
changed polling_interval to 10000, restarted homebridge and am getting less now.
Maximum API query rate is 30 requests in a 5 minute period. The default in your package should be changed to a minimum of 10000ms.
Note: also check that the API endpoint domain is set to app.hydrawise.com not hydrawise.com.
Also note that you must change to using app.hydrawise.com as your endpoint before 31st October 2019 to avoid service interruption.
Thanks @camryan, not seeing the errors now at 15000ms.
Also this module will need a patch for the endpoint. I have done locally, should just be this one: node_modules/hydrawise-api/index.js: this.url = 'https://hydrawise.com/api/v1/';
This is the e-mail I received from a Hydrawise product manager regarding this issue:
„Dear API User, We have noticed that you are using the Hydrawise Rest API. We have detected 2 issues with your usage of the Hydrawise API service:
Can you please make these adjustments to the usage of our API service ASAP? We are currently redirecting your call but as of the 31st October we will no longer be supporting this.
Regards XXX“
However, I am using a polling interval of 60000 ms and it still seems to be too much... 🤔
Received the same notification. I updated my local configuration to use the new URL (app.hydrawise.com...) and upped my polling interval to 100000 ms but the plugin is still crashing with that same '429 - undefined' error. I'll try to reach out to the hydrawise engineer to find out if we're all doing something wrong. would love to hear from @martijndierckx if he's found any time to look into this too...
I've tried 10000, 11000 & now 12000 and get occasional errors, maybe a couple a day. 15000 had none over a few days.
perhaps it has to do with the number of zones? I have 10. what seems to crash it is when I open up the Home app and it starts "updating" my zones.
Five zones for me, polling interval 60,000 ms. Getting the errors when opening the Home app, just as oliverl observed.
@martijndierckx Still an issue. I have corrected the API url and set my config as follows: "default_runtime": "600", "polling_interval": "15000" I've even tried reducing my zone count to 2 (disabled the other 2 zones)
The logs clearly indicate that this is a polling rate error, error statusCode 429 is followed by statusMessage 'Too Many Requests'
Finally found the time to have a quick look. I changed the default polling interval to 10000 and changed the hydrawise-api dependancy to another fork, adapting to the new endpoint path.
Hi all,
Seeing this error coming from the plugin when I was setting it up in Homebridge today. The 429 from Request appears that I was making too many polling requests to the API. Has anyone else seen this error?
I have moved the polling interval to 30 seconds (30000) and it looks like its cut down on the errors being thrown in node, so I think this might be a throttling issue (unless Hunter wants to charge for API use)
Cheers, -Joe
Unhandled rejection StatusCodeError: 429 - undefined Jun 09 12:34:47 homekitbridge homebridge[21011]: at new StatusCodeError (/usr/lib/node_modules/homebridge-hydrawise/node_modules/request-promise/lib/errors.js:32:15) Jun 09 12:34:47 homekitbridge homebridge[21011]: at Request.RP$callback [as _callback] (/usr/lib/node_modules/homebridge-hydrawise/node_modules/request-promise/lib/rp.js:77:29) Jun 09 12:34:47 homekitbridge homebridge[21011]: at Request.self.callback (/usr/lib/node_modules/homebridge-hydrawise/node_modules/request/request.js:185:22) Jun 09 12:34:47 homekitbridge homebridge[21011]: at emitTwo (events.js:126:13) Jun 09 12:34:47 homekitbridge homebridge[21011]: at Request.emit (events.js:214:7) Jun 09 12:34:47 homekitbridge homebridge[21011]: at Request. (/usr/lib/node_modules/homebridge-hydrawise/node_modules/request/request.js:1161:10)
Jun 09 12:34:47 homekitbridge homebridge[21011]: at emitOne (events.js:116:13)
Jun 09 12:34:47 homekitbridge homebridge[21011]: at Request.emit (events.js:211:7)
Jun 09 12:34:47 homekitbridge homebridge[21011]: at IncomingMessage. (/usr/lib/node_modules/homebridge-hydrawise/node_modules/request/request.js:1083:12)
Jun 09 12:34:47 homekitbridge homebridge[21011]: at Object.onceWrapper (events.js:313:30)
Jun 09 12:34:47 homekitbridge homebridge[21011]: at emitNone (events.js:111:20)
Jun 09 12:34:47 homekitbridge homebridge[21011]: at IncomingMessage.emit (events.js:208:7)
Jun 09 12:34:47 homekitbridge homebridge[21011]: at endReadableNT (_stream_readable.js:1064:12)
Jun 09 12:34:47 homekitbridge homebridge[21011]: at _combinedTickCallback (internal/process/next_tick.js:139:11)
Jun 09 12:34:47 homekitbridge homebridge[21011]: at process._tickCallback (internal/process/next_tick.js:181:9)