Apps Code

From Hubitat Documentation
Revision as of 01:31, 23 March 2021 by Doug (talk | contribs)
Jump to: navigation, search
Go to the top of the page

The Hubitat community has developed some great apps to help you automate your devices in new, cool ways.

Installing custom apps

  1. The developer of the app will normally post a link to their app code. Follow their directions to get to the source code.
  2. Typically developers will use GitHub to host code. When copying the code, choose the RAW button so that you are getting the raw form of the code, with no HTML formatting.
    GitHub raw button v2.png
  3. Select All the raw code, and then Copy the code.
  4. From the home page of your hub, select Apps Code in the side bar.
  5. Select the +New App button in the upper right corner of the Apps Code page.
    New User App dialogue 2.0.png
  6. In the blank text field, paste the code. Alternatively, you can select the Import button and past a URL to the developers code in raw text format.
    Import user app code URL 2.0.png
  7. Select the Save button in the top right. When modified goes away, your app is saved.
    User app code unsaved 2.0.png

You may experience an error in this step. If you do, your app will not save and it will not work. Please contact the developer of the app in the Hubitat Community forum. It is usually best if you take a screen shot of the error to help them diagnose the problem. Once the code is fixed, come back and try again.

Enabling OAuth

Not all user apps will require OAuth (Open Authorization). Consult the app developers documentation for instruction.

  1. After saving your user app code, select the Enable OAuth button and then Update to automatically generate the keys.
    Enable OAuth 2.0.png
    OAuth initial dialogue 2.0.png
  • If your client secret key becomes compromised, you may refresh it to protect the OAUTH2 endpoint security.
    • To refresh the client secret, open your user app code, select OAuth and check to box for Refresh Client Secret, the select Update
      OAuth refresh client secret 2.0.png

Loading Your User Developed App

Once your app has successfully saved, you will need to load it to your hub before you can use it.

  1. Select Apps from the sidebar.
  2. Select the +Add User App button.
    Install Saved User App 2.0.png
  3. Find your User App in the list and select it to instantly add it.
    Install user app list 2.0.png

That's it! You're all set to create glorious home automations with your new app.

  • Don't forget to thank the developer in the community forum for their hard work.