Nebula83 / openhab2-addons

Add-ons for openHAB 2.x
Eclipse Public License 1.0
8 stars 2 forks source link

Http client refactor #5

Closed Nebula83 closed 7 years ago

Nebula83 commented 7 years ago

This merge is aimed at fixing #1 and #3; not opening unnecessary sockets and keeping the session alive (crudely).

foxy82 commented 7 years ago

Hey,

locationStatus gives us the current temp, where as location gives us the metadata on the zones.

So discovery needs location. However normal updates for temp need to use locationStatus. (Btw this was one reason I used API v1 it's a single call in API v1.)

What we should do is make the regular updates use status. Then discovery can do its own polling on location.

Does that also work for your quick actions?

On 31 May 2017 10:04 am, "Nebula83" notifications@github.com wrote:

@Nebula83 commented on this pull request.

In addons/binding/org.openhab.binding.evohome/src/main/java/ org/openhab/binding/evohome/internal/api/EvohomeApiClientV2.java https://github.com/Nebula83/openhab2-addons/pull/5#discussion_r119306737:

// If the authentication succeeded, gather the basic intel as well if (success == true) {

  • useraccount = requestUserAccount();
  • locations = requestLocations();
  • useraccount = requestUserAccount();
  • locations = requestLocations();

Regardless, I added an initial update() call on login

— You are receiving this because your review was requested.

Reply to this email directly, view it on GitHub https://github.com/Nebula83/openhab2-addons/pull/5#discussion_r119306737, or mute the thread https://github.com/notifications/unsubscribe-auth/AHZY9OhAG83_VjdnvO7SsvHrHlcwE-K8ks5r_S0agaJpZM4NpL51 .

Nebula83 commented 7 years ago

Does that also work for your quick actions?

Yep: the actual mode is in status, the available modes are in locations -> etc. No problems there