Giter Club home page Giter Club logo

hacs-hubitat's Introduction

Hubitat Integration for Home Assistant

hacs_badge

This integration uses Hubitat’s Maker API to make Hubitat devices available for use with Home Assistant.

Features

The following device types are currently supported. The first level bullets are Home Assistant platforms, while the sub-bullets are specific device classes.

  • binary_sensor
    • acceleration
    • carbon monoxide
    • contact
    • moisture
    • motion
    • smoke
  • climate
    • thermostat
    • fan
  • cover
    • door controller
    • garage door controller
    • window shade
  • fan
  • light
  • sensor
    • battery
    • humidity
    • illuminance
    • power (watts)
    • temperature
    • voltage
  • switch

Installation

Note that you will need to restart Home Assistant after installion, whichever method is used.

HACS

Add this repository as a custom repository in HACS (Marketplace -> Settings).

Manually

Clone this repository and copy the custom_components/hubitat folder into your <config>/custom_components/ directory (so you end up with <config>/custom_components/hubitat). Be sure to copy the entire directory, including the (possibly hidden) .translations subdirectory.

Setup

First, create a Maker API instance in the Hubitat UI. Add whatever devices you’d like to make available to Home Assistant.

To configure the hubitat integration, go to Configuration -> Integrations in the Home Assistant UI and click the “+” button to add a new integration. Pick “Hubitat”, then provide:

  • The address of the hub (e.g., http://10.0.1.99 or just 10.0.1.99 if you’re not using https)
  • The app ID of the Maker API instance (the 3 or 4 digit number after /apps/api/ in any of the Maker API URLs)
  • The API access token
  • A port for the event server to listen on (more about this below); this will be chosen automatically by default

Event server

Hubitat’s official way to push events to receivers is via HTTP POST requests. Every time a device event occurs, the Maker API will make an HTTP POST request to the address set in its “URL to send device events to by POST” setting.

To receive these events, the integration starts up a Python-based web server and updates the POST URL setting in the Maker API instance. Note that for this to work, Hubitat must be able to see your Home Assistant server on your local network.

Device types

The integration assigns Home Assistant device classes based on the capabilities reported by Hubitat. Sometimes the device type is ambiguous; a switchable outlet and a light switch may both only implement Hubitat’s Switch capability, and will therefore look like the same type of device to the integration. In some of these cases, the integration guesses the device class based on the device’s label (e.g., a switch named “Office Lamp” would be setup as a light in Home Assistant). This heuristic behavior is currently only used for lights and switches.

Updating

The update process depends on how the integration was installed. If it was installed with HACS, open the integration in HACS and click the “Upgrade” link. The process for manually updating is the same as for manual installation.

Note that you will need to restart Home Assistant after updating, whichever method is used.

Developing

To get setup for development, clone this repo and run

$ ./dev init

This script will setup the tools needed to validate typings and code style. Whenever you make a commit to the repo, validators will be automatically run.

To run the type checker and unit tests, run

$ ./dev test

hacs-hubitat's People

Contributors

jason0x43 avatar spectre3ooo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.