Hubitat Maker API Interface
Project description
Hubitat Elevation Maker API Interface
Intro
This guide assumes you own a Hubitat Elevation home automation controller.
If you are interested in purchasing one, you can purchase a unit from the manufactures website at hubitat.com or from Amazon.com
Setup
To get the required API keys, you will need to log in to your Hubitat admin interface.
See Maker API Documentation for how to add the MakerAPI
application and to generate new API keys
If you are using the cloud API endpoint for access, you will ALSO need to include the Cloud API key when setting up a new Hub object.
Install
pip install hubitatcontrol
Or if you want a copy direct from source
pip install git+https://github.com/Jelloeater/hubitatcontrol.git
Usage
Local Example
import hubitatcontrol as hc
hub = hc.get_hub(host='http://192.168.1.100', token='Maker_Token',
app_id='Maker_App_ID')
device = hc.lookup_device(hub, 'Device_Name')
print(device.switch)
device.turn_on()
print(device.switch)
Cloud Example
import hubitatcontrol as hc
hub = hc.get_hub(host='https://cloud.hubitat.com', token='Maker_Token',
app_id='Maker_App_ID', cloud_token='Cloud_API_token')
device = hc.lookup_device(hub, 'Device_Name')
print(device.switch)
device.turn_on()
print(device.switch)
Docs
You will need a .dot file browser for the class diagrams
Issues / Features
See:
https://github.com/Jelloeater/hubitatcontrol/issues
Structure
Class Model
flowchart LR
Specific_Device --> Abstract_Device_Class --> Device--> Hub
Development setup
Testing is done with PyTest, you will need to set up the correct env vars for your local (or cloud) Hubitat API
See .env.example
If you are using a local API endpoint, please leave HUBITAT_CLOUD_ID
blank in the .env
file.
Setup
Install Go-Task --> https://taskfile.dev/installation/
task setup
task
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for hubitatcontrol-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e32c92a3b4e3c2ca19c0fde4bcdc15f42d07eca24a6c38379e41134f27bbcec9 |
|
MD5 | 64159d61c1f92b641e62f573dcaaeffa |
|
BLAKE2b-256 | 1ce9b6ba373c8d0f6bbb76112b30f33abb564c277374fa8534c5b6e910482ce3 |