hacs-hubitat icon indicating copy to clipboard operation
hacs-hubitat copied to clipboard

Support for Hubitat cloud access

Open bezkod opened this issue 3 years ago • 3 comments

Hi, the local setup works perfectly, but now my Hubitat hub is moved to another place and there is no dynamic DNS setup, but Hubitat cloud access works fine. It would be great to be able to configure Hubitat HA component to use cloud access to Hubitat hub. Currently, the setup flow takes hub's IP as input, but it is not currently possible to configure cloud URL in setup flow.

bezkod avatar Apr 30 '21 20:04 bezkod

Hmmm...I'll have to turn on remote access and try that out. How easy it would be depends on how the Maker API works through remote access, like if authentication or some level of token management is required.

jason0x43 avatar May 06 '21 01:05 jason0x43

Just as an FYI, unless something drastically changed the only two changes that are needed are

  1. The URL points to the cloud URL instead of the local instance
  2. The HUB UID (This can be classified as part of the URL actually)

For example:

http://[local_ip]/apps/api/[appid]/devices/[Device ID]?access_token=[access_token]

becomes:

https://cloud.hubitat.com/api/[hub_uid]/apps/[app_id]/devices/[Device ID]?access_token=[access_token]

Technically, all you would need to do is make the base URL the user enters instead of just the address.... so it either be:

http://[local_ip]/apps/api (for local) or https://cloud.hubitat.com/api/[hub_uid]/apps (for cloud)

Desterly avatar May 17 '21 15:05 Desterly

Thanks for the additional info! I thought that might be the case, but I hadn't gotten around to testing it yet. That should be easy enough to work with. The extension can treat a hostname or schemaless URL as local (as it does now), and otherwise use the given URL as is.

jason0x43 avatar May 17 '21 18:05 jason0x43