- Hub
- Properties
- Methods
- __init__(host, app_id, access_token, port, event_url)
- add_device_listener(device_id, listener)
- add_hsm_listener(listener)
- add_mode_listener(listener)
- async check_config()
- async refresh_device(device_id)
- remove_device_listeners(device_id)
- remove_hsm_listeners()
- remove_mode_listeners()
- async send_command(device_id, command, arg)
- async set_event_url(event_url)
- async set_hsm(hsm_state)
- async set_host(mode)
- async set_mode(mode)
- async set_port(port)
- async stop()
The list of devices managed by the hub.
The hub's mode (e.g., "Away", "Day", "Night").
The available hub modes.
The hub's HSM status (e.g., "armedAway", "disarmed"). See this post for more information.
Parameter | Type | Description |
---|---|---|
host |
str | URL to Hubitat hub |
app_id |
str | Maker API app ID |
access_token |
str | Maker API access token |
port |
Optional[int] | Event server port |
event_url |
Optional[str] | Event server URL |
Initialize a new Hub.
Add a listener for device events for the given device ID. The listener should have the signature listener(event) -> None
.
Add a listener for HSM change events. The listener should have the signature listener(event) -> None
.
Add a listener for mode change events. The listener should have the signature listener(event) -> None
.
Verify that the hub is accessible.
Refresh the cached state for the given device ID.
Remove all listeners registered for the given device ID.
Remove all listeners for HSM events.
Remove all listeners for mode events.
Send a command to a device.
Parameter | Type | Description |
---|---|---|
device_id |
str | Device to send command to |
command |
str | Command name |
arg |
Optional[Union[str, int]] | Command argument |
Set the URL that Hubitat should POST events to.
Set Hubitat's HSM state.
Set URL that the Hubitat hub is available at.
Set Hubitat's mode.
Set the port the event server will listen on.
Remove all listeners and stop the event server.