# Hubitat Support

**URL:** https://community.garadget.com/t/hubitat-support/3953
**Category:** SmartHome Integration
**Tags:** integration, client-apps, home-automation, hubitat
**Created:** [April 24, 2018, 5:27pm UTC](https://community.garadget.com/t/hubitat-support/3953 "2018-04-24T17:27:07Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![edash](https://community.garadget.com/letter_avatar_proxy/v4/letter/e/e9bcb4/32.png) [@edash](https://community.garadget.com/u/edash)
#### Post date: [April 24, 2018, 5:27pm UTC](https://community.garadget.com/t/hubitat-support/3953/1 "2018-04-24T17:27:07Z")

</div>

Just wanted to let everyone know that Garadget works great with Hubitat with only a few minor modifications to the SmartThings code. I haven’t posted anything to my github because I wasn’t sure if @garadget wanted to host it officially. The changes are:

Device handler:

- Change every instance of “physicalgraph” to “hubitat”. (this is a requirement for all device handlers).

SmartApp:

 ![image](https://community.garadget.com/uploads/default/original/1X/8c9b102f3ee3a6c24af2ccbded04b20799da8be1.png)

- change “appSettings” to “settings” in lines shown.

 ![image](https://community.garadget.com/uploads/default/original/1X/89e2390af72d4f77d28ea91b375ee25eb9e82d14.png)

- change  
`return getServerUrl() + "/api/token/${state.accessToken}/smartapps/installations/${app.id}/${endPoint}"`  
to  
`return "${getApiServerUrl()}/${hubUID}/apps/${app.id}/${endPoint}?access_token=${state.accessToken}"`

 ![image](https://community.garadget.com/uploads/default/original/1X/d9bceb7426c4e4db389e7af1eb5b10671656fd40.png)

- change  
`httpGet( apiUrl() + "/v1/devices?access_token=${state.garadgetAccessToken}"){ resp ->`  
to  
`httpGet(uri: "${apiUrl()}/v1/devices?access_token=${state.garadgetAccessToken}"){ resp ->`

 ![image](https://community.garadget.com/uploads/default/original/1X/ee49fdd397fdc48eeb92859366856707bc30d7a5.png)

- change  
`runEvery1Minute("poll")`  
to  
schedule(“0 \*/1 \* \* \* ?”, “poll”)  
**Note** : I changed it so the poll would run every 15 seconds, but 1 minute (shown above) might be enough for most people’s needs.

 ![image](https://community.garadget.com/uploads/default/original/1X/d38094ca959b999116ded69a54803265ed782f58.png)

- change  
`def userpass = "Basic " + userpassascii.encodeAsBase64().toString()`  
to  
`def userpass = "Basic " + userpassascii.bytes.encodeBase64().toString()`

So far it is working great. I am hoping for a Garadget local “REST” based API that we can use for complete local support on Hubitat (since that is the main strong point of Hubitat vs. SmartThings), but this will definitely work until that time. 🙂

---

<div class="post-metadata">

### Author: ![garadget](https://community.garadget.com/user_avatar/community.garadget.com/garadget/32/34_2.png) [@garadget](https://community.garadget.com/u/garadget)
#### Post date: [April 24, 2018, 7:57pm UTC](https://community.garadget.com/t/hubitat-support/3953/2 "2018-04-24T19:57:55Z")

</div>

Eric,  
Thank you for your contribution! Please let me know when you have your integration on GitHub and I’ll link it from the [Apps page](https://community.garadget.com/t/client-apps-and-home-automation-plugins).

Re. LAN link: [Garadget supports MQTT](https://community.garadget.com/t/mqtt-support/3226) so maybe with something like [this](https://github.com/jeubanks/hubitat-mqtt-bridge) it can be integrated with Hubitat bypassing the cloud connection.

---

<div class="post-metadata">

### Author: ![2jz.turbo](https://community.garadget.com/letter_avatar_proxy/v4/letter/2/77aa72/32.png) [@2jz.turbo](https://community.garadget.com/u/2jz.turbo)
#### Post date: [August 2, 2018, 7:01pm UTC](https://community.garadget.com/t/hubitat-support/3953/3 "2018-08-02T19:01:58Z")

</div>

I need this config but I can’t make it work, any help is appreciated. Thanks.

---

<div class="post-metadata">

### Author: ![2jz.turbo](https://community.garadget.com/letter_avatar_proxy/v4/letter/2/77aa72/32.png) [@2jz.turbo](https://community.garadget.com/u/2jz.turbo)
#### Post date: [August 2, 2018, 7:48pm UTC](https://community.garadget.com/t/hubitat-support/3953/4 "2018-08-02T19:48:29Z")

</div>

I got this error:

startup failed: Script1.groovy: 323: unexpected token: x @ line 323, column 49. uestContentType: "application/x-www-form ^ 1 error on line null

---

<div class="post-metadata">

### Author: ![2jz.turbo](https://community.garadget.com/letter_avatar_proxy/v4/letter/2/77aa72/32.png) [@2jz.turbo](https://community.garadget.com/u/2jz.turbo)
#### Post date: [August 2, 2018, 11:35pm UTC](https://community.garadget.com/t/hubitat-support/3953/5 "2018-08-02T23:35:16Z")

</div>

Got it working, is posted at Hubitat community [here](https://community.hubitat.com/t/garadget-support/1560/5?u=vjv)

---

<div class="post-metadata">

### Author: ![jrfarrar](https://community.garadget.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@jrfarrar](https://community.garadget.com/u/jrfarrar)
#### Post date: [September 6, 2022, 11:48pm UTC](https://community.garadget.com/t/hubitat-support/3953/6 "2022-09-06T23:48:11Z")

</div>

> [@Hubitat MQTT Integration](https://community.garadget.com/t/hubitat-mqtt-integration/8989):
>
> Post on the Hubitat Forums here for a specific Hubitat integration with Garadget using MQTT. Made this a few years ago and apparently forgot to update it here.
