Hubitat Support

integration
client-apps
home-automation
hubitat
Tags: #<Tag:0x00007fad714d5e10> #<Tag:0x00007fad714d5cd0> #<Tag:0x00007fad714d5b90> #<Tag:0x00007fad714d5a50>

#1

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:

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

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

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

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

  • 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. :slight_smile:


#2

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.

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