Hubitat Support

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).


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

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

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

  • change
    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.

  • change
    def userpass = "Basic " + userpassascii.encodeAsBase64().toString()
    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. :slight_smile:

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.

Re. LAN link: Garadget supports MQTT so maybe with something like this it can be integrated with Hubitat bypassing the cloud connection.

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

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

Got it working, is posted at Hubitat community here