这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on May 17, 2021. It is now read-only.

Conversation

@watou
Copy link
Contributor

@watou watou commented Dec 20, 2015

Summary: added optional ecobee:granularity and ecobee:quickpoll config properties; polling the Ecobee API will occur much sooner after the binding has sent an update, command or action call to Ecobee in order to give quicker feedback to the binding.

Changed the polling logic in the Ecobee binding to invoke the execute() method based on optional ecobee:granularity config property (default 5000ms). On each of those, check to see if it's time to poll the Ecobee API. Normal polling continues to use the optional ecobee:refresh config property (default 180000ms). However, after a successful update, command or action call to the Ecobee API, the next poll will occur after ecobee:quickpoll milliseconds have passed (optional, defaults to 6000). So existing configurations are compatible, but the binding will perform a poll about 6-11 seconds after a successful write to the Ecobee API.

@watou watou self-assigned this Dec 20, 2015
@watou watou added this to the 1.8.0 milestone Dec 20, 2015
@watou watou force-pushed the ecobee-quick-poll branch from 1ac569e to 7914383 Compare December 21, 2015 14:51
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might be helpful to the reason why polling is skipped (due to a missing token)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rely on the refreshTokens() method to log the specific error and then return false, so the caller only has to report how it affects control flow.

@teichsta
Copy link
Member

lgtm … just one small remark which might help debugging the binding. Please go ahead and merge if you like.

@watou
Copy link
Contributor Author

watou commented Dec 25, 2015

I will merge now and thanks, @teichsta.

watou added a commit that referenced this pull request Dec 25, 2015
[ecobee] Added quick poll after update, command or action.
@watou watou merged commit 908b320 into openhab:master Dec 25, 2015
@watou watou deleted the ecobee-quick-poll branch December 9, 2016 17:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants