Code Monkey home page Code Monkey 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.

Quick Start

  1. Create a Maker API instance in Hubitat
  2. Add the devices you want to share in Maker API
  3. Install HACS
  4. Add the Hubitat integration in HACS
  5. Add an instance of the Hubitat integration in Home Assistant's Integrations page

⚠️ If you notice that devices aren't updating in Home Assistant, see the Troubleshooting section below.

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
    • connectivity
    • contact
    • moisture
    • motion
    • presence
    • smoke
  • climate
    • thermostat
    • fan
  • cover
    • door controller
    • garage door controller
    • window shade
  • fan
  • light
  • lock
  • sensor
    • battery
    • humidity
    • illuminance
    • power (watts)
    • temperature
    • voltage
    • pressure
  • switch
  • valve

Installation

This component is an integration, which is different from an add on. Integrations are managed through the “Devices & Services” configuration menu rather than through “Add-ons, Backups & Supervisor”.

There are two methods for installing this integration. One is to use HACS, a tool is used to install and update third party integrations (such as this one). The second option is to install this integration manually by cloning the repository and copying the integration files to the proper location in your HA config directory.

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

HACS

First, install HACS if you haven't already.

Once HACS has been installed and shows up in the sidebar, open it and go to Integrations, and then click the orange '+' button in the lower right corner to add an integration. Search for “Hubitat” and install it.

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

Setup

The basic setup process is:

  1. Create a Maker API instance in Hubitat
  2. Add the devices you want to use in HA to the Maker API instance
  3. Setup the integration in HA

First, create a Maker API instance in the Hubitat UI. Add whatever devices you’d like to make available to Home Assistant. If you plan to use the integration over SSL, you‘ll probably want to enable the “Ignore SSL Certificates” toggle.

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 2, 3 or 4 digit number after /apps/api/ in any of the Maker API URLs)
  • The API access token
  • Optional: An address for the event server to listen on (more about this below); this will be chosen automatically by default
  • Optional: A port for the event server to listen on (more about this below); this will be chosen automatically by default
  • Optional: Provide the relative paths to an SSL private key and certificate (e.g., ssl/localhost-key.pem and ssl/localhost.pem). These are files that you will need to generate using a tool such as mkcert or openssl If these paths are provided, the event server (described below) will serve over SSL (and only over SSL).

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.

⚠️ Note that the event server URL, if specified, should only include a protocol and a host, not a path. The server always listens at /.

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.

Adding new devices

After adding new devices to the Maker API instance in Hubitat, you will not be able to control them through Home Assistant until the you reload the device list in the integration. There are two ways to reload the device list:

  1. Restart Home Assistant
  2. Open the Hubitat integration settings in Home Assistant and go through the config flow. During this process the integration will reload the device list from Hubitat.

Once the integration has loaded the new device list, any new devices added to the Maker API instance should show up in Home Assistant.

Removing devices

To remove a device, first remove or disable it in the Maker API instance in Hubitat. Then open the Hubitat integration settings in Home Assistant and go through the config flow. One of the steps in the flow is "Remove devices" -- this will allow you to remove any devices added by the integration.

Note that removing a device through the config flow in Home Assistant but not removing it in the Maker API in Hubitat will cause the device to be re-added the next time the integration loads (usually when you restart Home Assistant).

Services

This integration adds several service calls to Home Assistant.

  • Delete the alarm code at a given position in a lock or keypad
    service: hubitat.clear_code
    data:
      entity_id: lock.some_lock
      position: 1
  • Set a user code for a lock or keypad
    service: hubitat.set_code
    data:
      entity_id: lock.some_lock
      position: 1
      code: 5213
      name: Guests
  • Set the length of user codes for a lock or keypad
    service: hubitat.set_code_length
    data:
      entity_id: lock.some_lock
      length: 4
  • Get the user codes for a lock or keypad
    service: hubitat.get_codes
    data:
      entity_id: lock.some_lock
    response_variable: codes
  • Set the entry delay for a security keypad in seconds
    service: hubitat.set_entry_delay
    data:
      entity_id: alarm_control_panel.some_alarm
      delay: 30
  • Set the exit delay for a security keypad in seconds
    service: hubitat.set_exit_delay
    data:
      entity_id: alarm_control_panel.some_alarm
      delay: 30
  • Send a command to a Hubitat device
    service: hubitat.send_command
    data:
      entity_id: switch.some_switch
      command: on
    service: hubitat.send_command
    data:
      entity_id: light.some_light
      command: setHue
      args: 75
    service: hubitat.send_command
    data:
      entity_id: light.some_light
      command: setLevel
      args: [50, 3]

Event-emitting devices

Some devices, such as pushable buttons, emit events rather than having state. Other devices such as locks both emit events and have state. Devices that only contain event emitters and have no stateful components won’t have any associated entities in Home Assistant.

Event emitting devices can be used as triggers in Home Assistant automations, or in Node Red. In Home Assistant, you can use event emitters as “Device” triggers. Whenever a device emits an event, such as a button press, the automation will be triggered. In Node Red, a workflow can listen for hubitat_event events and filter them based on properties in payload.event.

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.

Troubleshooting

Devices aren't updating

If the integration was set up successfully but devices aren't updating, the problem is almost always that Hubitat is unable to send messages to Home Assistant. Just because HA can talk to Hubitat does not mean that Hubitat can talk back to HA. This usually happens when Home Assistant is running in a VM or Docker container that hasn't been bridged to the local network. In this situation, the URL that the integration tells Maker API to send device events to will be an address on the virtualization system's internal network, which Hubitat won't be able to address.

There are two solutions. One is to update the container or VM to use network bridging, so that the virtual system appears like a host on the local network. In this situation, HA's network address will be directly visible to Hubitat, so the integration will be able to set things up automatically.

The second solution is to manually set the event server URL and port values in the integration to something that Hubitat can see. The event server URL should point to the host that's running your Home Assistant VM or container. For example, if the host running the HA instance is on the local network at 192.168.0.10, then the event server URL would be set to http://192.168.0.10. The port should be set to some open port value (e.g., 12345), and then this port must be mapped from the host to the HA VM/container.

⚠️ Note that the event server URL should only include a protocol and a host, not a path. The server always listens at /.

Checking device capabilities

If a device isn't showing up in Home Assistant in the way you expect (like, a fan is showing up as a light), the problem may be that this integration is having trouble telling what kind of device it is. The integration uses "capability" information from the Maker API to determine what type of device a given device is.

You can display the capabilities for a particular device, along with other information, by making a request to the Maker API:

$ curl 'http://HUBITAT_ADDRESS/apps/api/MAKER_API_ID/devices/DEVICE_ID?access_token=TOKEN&prettyPrint=true

If you open your Maker API instance in Hubitat, example URLs are shown at the bottom of the page. You can query these URLs using a command like command like curl, as show above, or in a browser. You should see output like:

(Expand for sample output)
{
    "id": "2178",
    "name": "Virtual RGB light",
    "label": "Virtual RGB light",
    "attributes": [
        {
            "name": "RGB",
            "currentValue": null,
            "dataType": "STRING"
        },
        {
            "name": "color",
            "currentValue": null,
            "dataType": "STRING"
        },
        {
            "name": "colorName",
            "currentValue": "Blue",
            "dataType": "STRING"
        },
        {
            "name": "hue",
            "currentValue": 66,
            "dataType": "NUMBER"
        },
        {
            "name": "level",
            "currentValue": 74,
            "dataType": "NUMBER"
        },
        {
            "name": "saturation",
            "currentValue": 57,
            "dataType": "NUMBER"
        },
        {
            "name": "switch",
            "currentValue": "on",
            "dataType": "ENUM",
            "values": [
                "on",
                "off"
            ]
        },
        {
            "name": "switch",
            "currentValue": "on",
            "dataType": "ENUM",
            "values": [
                "on",
                "off"
            ]
        }
    ],
    "capabilities": [
        "Switch",
        {
            "attributes": [
                {
                    "name": "switch",
                    "dataType": null
                }
            ]
        },
        "SwitchLevel",
        {
            "attributes": [
                {
                    "name": "level",
                    "dataType": null
                }
            ]
        },
        "ColorControl",
        {
            "attributes": [
                {
                    "name": "hue",
                    "dataType": null
                },
                {
                    "name": "saturation",
                    "dataType": null
                },
                {
                    "name": "color",
                    "dataType": null
                },
                {
                    "name": "colorName",
                    "dataType": null
                },
                {
                    "name": "RGB",
                    "dataType": null
                }
            ]
        },
        "Actuator",
        "Light",
        {
            "attributes": [
                {
                    "name": "switch",
                    "dataType": null
                }
            ]
        }
    ],
    "commands": [
        "off",
        "off",
        "on",
        "on",
        "setColor",
        "setHue",
        "setLevel",
        "setSaturation"
    ]
}

If you open an issue for a broken device, this information may be useful to include.

Logging

If you run into problems, one of the first steps to take is to enable debug logging for the Hubitat integration. This will provide more insight into what the integration is doing, and may help track down problems. To enable debug logging:

  1. Open your Home Assistant configuration.yaml file in an editor
  2. Add the following content. If you already have a logger section, add the hubitatmaker and custom_components.hubitat lines to it.
    logger:
      default: info
      logs:
        hubitatmaker: debug
        custom_components.hubitat: debug
  3. Restart Home Assistant

If you open Home Assistant's log file (config/home-assistant.log) after HA restarts, you should see quite a few messages related to Hubitat (mixed in with messages for other components), like:

2020-05-19 08:28:07 DEBUG (MainThread) [hubitatmaker.hub] Setting host to 10.0.1.99
2020-05-19 08:28:07 DEBUG (MainThread) [hubitatmaker.hub] Set mac to ab:cd:ef:12:34:56
2020-05-19 08:28:07 INFO (MainThread) [hubitatmaker.hub] Created hub <Hub host=10.0.1.99 app_id=2269>
2020-05-19 08:28:07 DEBUG (MainThread) [hubitatmaker.hub] Listening on 10.0.1.206:39513
2020-05-19 08:28:07 INFO (MainThread) [hubitatmaker.hub] Setting event update URL to http://10.0.1.206:39513
...
2020-05-19 08:28:08 DEBUG (MainThread) [hubitatmaker.hub] Loaded device list
2020-05-19 08:28:08 DEBUG (MainThread) [hubitatmaker.hub] Loading device 6
2020-05-19 08:28:08 DEBUG (MainThread) [hubitatmaker.hub] Loaded device 6
2020-05-19 08:28:08 DEBUG (MainThread) [hubitatmaker.hub] Loading device 14
...
2020-05-19 08:28:14 DEBUG (MainThread) [custom_components.hubitat.entities] Migrating unique_ids for binary_sensor...
2020-05-19 08:28:14 DEBUG (MainThread) [custom_components.hubitat.entities] Checking for existence of entity 10.0.1.99::2269::14::acceleration...
2020-05-19 08:28:14 DEBUG (MainThread) [custom_components.hubitat.entities] Checking for existence of entity 10.0.1.99::2269::1122::acceleration...
2020-05-19 08:28:14 DEBUG (MainThread) [custom_components.hubitat.entities] Checking for existence of entity 10.0.1.99::2269::1890::acceleration...
2020-05-19 08:28:14 DEBUG (MainThread) [custom_components.hubitat.entities] Checking for existence of entity 10.0.1.99::2269::1954::acceleration...
2020-05-19 08:28:14 DEBUG (MainThread) [custom_components.hubitat.entities] Added HubitatAccelerationSensor entities: [<Entity Barn Sensor acceleration: off>, <Entity Garage Sensor acceleration: off>, <Entity Garage Door Sensor acceleration: off>, <Entity Breezeway Sensor acceleration: off>]
...
2020-05-19 08:28:15 DEBUG (MainThread) [custom_components.hubitat.device_trigger] Attaching trigger {'platform': 'event', 'event_type': 'hubitat_event', 'event_data': {'device_id': '180', 'name': 'pushed', 'value': '1'}}
...
2020-05-19 08:28:18 DEBUG (MainThread) [custom_components.hubitat.light] Turning off Basement Hearth Lights
2020-05-19 08:28:18 DEBUG (MainThread) [hubitatmaker.hub] Sending command off() to 1510
...

HSM status or modes not updating

Ensure that the “POST location events?” toggle is enabled in your Maker API app in Hubitat.

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

Buy Me A Coffee

hacs-hubitat's People

Contributors

amosyuen avatar cdhawan avatar clboles avatar irvintim avatar jason0x43 avatar kevdliu avatar ktibow avatar leandroissa avatar matthewgreen avatar maxim31cote avatar notexist avatar ottoyiu avatar ryanmellish avatar spectre3ooo avatar syepes avatar wrt54g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hacs-hubitat's Issues

Support water valves

Sample capabilities:

{
  "id": "323",
  "name": "Orbit Sprinkler Controller Station Component",
  "label": "Station 01 - Front Side",
  "attributes": [
    {
      "name": "valve",
      "currentValue": "closed",
      "dataType": "ENUM",
      "values": [
        "open",
        "closed"
      ]
    }
  ],
  "capabilities": [
    "Refresh",
    "Valve",
    {
      "attributes": [
        {
          "name": "valve",
          "dataType": null
        }
      ]
    }
  ],
  "commands": [
    "close",
    "open",
    "open",
    "refresh"
  ]
}

Support more buttons

Current the integration supports up to 8 push buttons on a single device. Support more (at least 12).

Feature Request - Event Type

It appears that the 2.2.0 platform update for Hubitat now exposes Physical vs Digital presses for events to MakerAPI. For automation purposes it would be cool to see this added in for further fine tuning.

Maker API: Add evt.type for events (physical/digital)

Device not created for pure event emitter

I have two different button controllers in my setup, Xiaomi and Aeon. The Xiaomi works great in HA and shows all buttons plus battery state. I also have an Aeon Minimote that is not seen or added to HA

I’ve added it’s capabilities below Incase that helps. I notice it isn’t a “sensor” but it also doesn’t report battery life so not sure I expect to see that.

I’m running your latest build and don’t see any error logs.

[{"capabilities":["Configuration","Actuator","HoldableButton",{"attributes":[{"name":"held","currentValue":"1","dataType":"NUMBER","values":null}]},"PushableButton",{"attributes":[{"name":"numberOfButtons","currentValue":"4","dataType":"NUMBER","values":null},{"name":"pushed","currentValue":"2","dataType":"NUMBER","values":null}]}]}]

Improve light detection heuristic

For simple switches and dimmers, there's no definitive way to tell if the device represents a light or something else (simple power switch, fan level switch, etc.). The plugin makes a guess for ambiguous devices based on the device name. If it has something light-related, the integration treats it as a light. This works well enough, but it should consider more light-related words, like "sconce", "luminaire", "bulb", etc.

Update repo to support HASS.io Add-On Store

Looks like we can add a repository.json with certain key/value pairs and gain support through the custom Add-On store feature.

EDIT: gave it a quick go, but looks like it's looking for more. i'll add more later to see about getting working for HASS.io addon store usage.

megalithic@e0bff9a

Allow hub IP address to be changed

  • Don't use hub IP for device unique IDs (maybe use MAC)
  • Migrate existing entities to new ID system, or support existing IDs in some way

inovelli dimmer status doesn't update

Hi again. I've just added an Inovelli dimmer switch to hubitat and shared it with HA.

With a manually fixed POST setting from #1 - I can turn on/off the zooz plug, but it does not work with the inovelli dimmer.

Here is the log from HA

2020-02-08 13:32:00 DEBUG (MainThread) [custom_components.hubitat.light] Turning on Living Room Rear Door Light Switch with {}
2020-02-08 13:32:00 INFO (MainThread) [custom_components.hubitat.device] Sent on to 71
2020-02-08 13:32:01 DEBUG (MainThread) [homeassistant.components.webhook] Handling webhook POST payload for 192.168.2.125::65
2020-02-08 13:32:01 DEBUG (MainThread) [custom_components.hubitat] received event from <Hub host=192.168.2.125 app_id=65>

Here is the log from Hubitat (2 presses)

dev:712020-02-08 01:32:38.663 pm infoLiving Room Rear Door Light Switch is on [digital]
dev:712020-02-08 01:32:29.474 pm infoLiving Room Rear Door Light Switch is on [digital]

Thoughts?

RGB Lights

Hi, have you tested this with RGB zwave lights? I'm seeing some weirdness. For example, if I turn on the bulb from HA, then I try and set the color, this happens in the HA log. If I mess around too long, the light seems to become unresponsive. Any ideas?

HA log

2020-04-18 16:40:29 DEBUG (MainThread) [custom_components.hubitat.light] Turning on Dining Room Outdoor Light Bulb with {}
2020-04-18 16:40:30 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'switch', 'value': 'on', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': 'Dining Room Outdoor Light Bulb was turned on', 'unit': None, 'data': None}
2020-04-18 16:40:30 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'level', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': '%', 'data': None}
2020-04-18 16:40:41 DEBUG (MainThread) [custom_components.hubitat.light] Turning on Dining Room Outdoor Light Bulb with {'hs_color': (345.0, 100.0)}
2020-04-18 16:40:42 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'colorMode', 'value': 'RGB', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': 'Dining Room Outdoor Light Bulb color mode is RGB', 'unit': None, 'data': None}
2020-04-18 16:40:43 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'colorMode', 'value': 'RGB', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': 'Dining Room Outdoor Light Bulb color mode is RGB', 'unit': None, 'data': None}
2020-04-18 16:41:00 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'hue', 'value': '36', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:00 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'saturation', 'value': '86', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:00 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'color', 'value': '#24ff4d', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:00 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'level', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:00 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'colorName', 'value': 'Green', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': 'Dining Room Outdoor Light Bulb color is Green', 'unit': None, 'data': None}
2020-04-18 16:41:00 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'color', 'value': '#24ff4d', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:00 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'saturation', 'value': '86', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:00 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'hue', 'value': '36', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:00 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'level', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:00 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'colorName', 'value': 'Green', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': 'Dining Room Outdoor Light Bulb color is Green', 'unit': None, 'data': None}
2020-04-18 16:41:01 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'color', 'value': '#24ff4d', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:01 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'saturation', 'value': '86', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:01 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'hue', 'value': '36', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:01 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'color', 'value': '#24ff4d', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:01 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'level', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:01 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'hue', 'value': '36', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:01 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'level', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:01 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'saturation', 'value': '86', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:01 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'colorName', 'value': 'Green', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': 'Dining Room Outdoor Light Bulb color is Green', 'unit': None, 'data': None}
2020-04-18 16:41:01 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'colorName', 'value': 'Green', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': 'Dining Room Outdoor Light Bulb color is Green', 'unit': None, 'data': None}
2020-04-18 16:41:01 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'saturation', 'value': '86', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:01 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'color', 'value': '#24ff4d', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:01 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'level', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:01 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'colorName', 'value': 'Green', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': 'Dining Room Outdoor Light Bulb color is Green', 'unit': None, 'data': None}
2020-04-18 16:41:01 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'hue', 'value': '36', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:07 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'colorName', 'value': 'Spring', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': 'Dining Room Outdoor Light Bulb color is Spring', 'unit': None, 'data': None}
2020-04-18 16:41:07 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'color', 'value': '#00ff4d', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:07 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'saturation', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:07 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'hue', 'value': '38', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:07 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'level', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:11 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'color', 'value': '#00ff4d', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:11 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'hue', 'value': '38', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:11 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'colorName', 'value': 'Spring', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': 'Dining Room Outdoor Light Bulb color is Spring', 'unit': None, 'data': None}
2020-04-18 16:41:11 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'saturation', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:11 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'level', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:19 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'color', 'value': '#00ff75', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:19 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'colorName', 'value': 'Spring', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': 'Dining Room Outdoor Light Bulb color is Spring', 'unit': None, 'data': None}
2020-04-18 16:41:19 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'hue', 'value': '41', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:19 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'saturation', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:19 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'level', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:25 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'saturation', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:25 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'hue', 'value': '41', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:25 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'level', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:25 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'colorName', 'value': 'Spring', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': 'Dining Room Outdoor Light Bulb color is Spring', 'unit': None, 'data': None}
2020-04-18 16:41:25 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'color', 'value': '#00ff75', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:25 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'saturation', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:25 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'hue', 'value': '41', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:25 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'colorName', 'value': 'Spring', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': 'Dining Room Outdoor Light Bulb color is Spring', 'unit': None, 'data': None}
2020-04-18 16:41:25 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'color', 'value': '#00ff75', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:25 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'level', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:25 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'color', 'value': '#00ff75', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:26 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'level', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:26 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'colorName', 'value': 'Spring', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': 'Dining Room Outdoor Light Bulb color is Spring', 'unit': None, 'data': None}
2020-04-18 16:41:26 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'saturation', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:26 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'hue', 'value': '41', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:31 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'color', 'value': '#00ff75', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:32 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'level', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:32 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'saturation', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:32 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'hue', 'value': '41', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:32 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'colorName', 'value': 'Spring', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': 'Dining Room Outdoor Light Bulb color is Spring', 'unit': None, 'data': None}
2020-04-18 16:41:32 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'color', 'value': '#00ff75', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:32 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'saturation', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:32 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'colorName', 'value': 'Spring', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': 'Dining Room Outdoor Light Bulb color is Spring', 'unit': None, 'data': None}
2020-04-18 16:41:32 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'level', 'value': '100', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}
2020-04-18 16:41:32 DEBUG (MainThread) [hubitatmaker.hub] Received event: {'name': 'hue', 'value': '41', 'displayName': 'Dining Room Outdoor Light Bulb', 'deviceId': '233', 'descriptionText': None, 'unit': None, 'data': None}

Hubitat log

dev:2332020-04-18 04:41:32.229 pm debugcolors: [0, 255, 117]
dev:2332020-04-18 04:41:32.175 pm debuggot SwitchColorReport: SwitchColorReport(colorComponent:blue, colorComponentId:4, value:117)
dev:2332020-04-18 04:41:32.125 pm debugparse:zw device: 10, command: 3304, payload: 04 75 , isMulticast: false
dev:2332020-04-18 04:41:32.035 pm debugcolors: [0, 255, 117]
dev:2332020-04-18 04:41:32.024 pm debuggot SwitchColorReport: SwitchColorReport(colorComponent:blue, colorComponentId:4, value:117)
dev:2332020-04-18 04:41:32.020 pm debugparse:zw device: 10, command: 3304, payload: 04 75 , isMulticast: false
dev:2332020-04-18 04:41:25.180 pm debugcolors: [0, 255, 117]
dev:2332020-04-18 04:41:25.157 pm debuggot SwitchColorReport: SwitchColorReport(colorComponent:blue, colorComponentId:4, value:117)
dev:2332020-04-18 04:41:25.147 pm debugparse:zw device: 10, command: 3304, payload: 04 75 , isMulticast: false
dev:2332020-04-18 04:41:24.975 pm debugcolors: [0, 255, 117]
dev:2332020-04-18 04:41:24.963 pm debuggot SwitchColorReport: SwitchColorReport(colorComponent:blue, colorComponentId:4, value:117)
dev:2332020-04-18 04:41:24.959 pm debugparse:zw device: 10, command: 3304, payload: 04 75 , isMulticast: false
dev:2332020-04-18 04:41:24.775 pm debugcolors: [0, 255, 117]
dev:2332020-04-18 04:41:24.763 pm debuggot SwitchColorReport: SwitchColorReport(colorComponent:blue, colorComponentId:4, value:117)
dev:2332020-04-18 04:41:24.757 pm debugparse:zw device: 10, command: 3304, payload: 04 75 , isMulticast: false
dev:2332020-04-18 04:41:19.512 pm debugcolors: [0, 255, 117]
dev:2332020-04-18 04:41:19.501 pm debuggot SwitchColorReport: SwitchColorReport(colorComponent:blue, colorComponentId:4, value:117)
dev:2332020-04-18 04:41:19.498 pm debugparse:zw device: 10, command: 3304, payload: 04 75 , isMulticast: false
dev:2332020-04-18 04:41:11.504 pm debugcolors: [0, 255, 77]
dev:2332020-04-18 04:41:11.492 pm debuggot SwitchColorReport: SwitchColorReport(colorComponent:red, colorComponentId:2, value:0)
dev:2332020-04-18 04:41:11.488 pm debugparse:zw device: 10, command: 3304, payload: 02 00 , isMulticast: false
dev:2332020-04-18 04:41:07.160 pm debugcolors: [0, 255, 77]
dev:2332020-04-18 04:41:07.142 pm debuggot SwitchColorReport: SwitchColorReport(colorComponent:red, colorComponentId:2, value:0)
dev:2332020-04-18 04:41:07.138 pm debugparse:zw device: 10, command: 3304, payload: 02 00 , isMulticast: false
dev:2332020-04-18 04:41:01.537 pm debugcolors: [36, 255, 77]
dev:2332020-04-18 04:41:01.521 pm debuggot SwitchColorReport: SwitchColorReport(colorComponent:coldWhite, colorComponentId:1, value:0)
dev:2332020-04-18 04:41:01.518 pm debugparse:zw device: 10, command: 3304, payload: 01 00 , isMulticast: false
dev:2332020-04-18 04:41:00.927 pm debugcolors: [36, 255, 77]
dev:2332020-04-18 04:41:00.874 pm debugcolors: [36, 255, 77]
dev:2332020-04-18 04:41:00.795 pm debuggot SwitchColorReport: SwitchColorReport(colorComponent:blue, colorComponentId:4, value:77)
dev:2332020-04-18 04:41:00.776 pm debugparse:zw device: 10, command: 3304, payload: 04 4D , isMulticast: false
dev:2332020-04-18 04:41:00.773 pm debuggot SwitchColorReport: SwitchColorReport(colorComponent:blue, colorComponentId:4, value:77)
dev:2332020-04-18 04:41:00.765 pm debugparse:zw device: 10, command: 3304, payload: 04 4D , isMulticast: false
dev:2332020-04-18 04:41:00.618 pm debugcolors: [36, 255, 77]
dev:2332020-04-18 04:41:00.605 pm debuggot SwitchColorReport: SwitchColorReport(colorComponent:blue, colorComponentId:4, value:77)
dev:2332020-04-18 04:41:00.601 pm debugparse:zw device: 10, command: 3304, payload: 04 4D , isMulticast: false
dev:2332020-04-18 04:41:00.186 pm debugcolors: [36, 255, 77]
dev:2332020-04-18 04:41:00.171 pm debuggot SwitchColorReport: SwitchColorReport(colorComponent:blue, colorComponentId:4, value:77)
dev:2332020-04-18 04:41:00.133 pm debugparse:zw device: 10, command: 3304, payload: 04 4D , isMulticast: false
dev:2332020-04-18 04:40:43.083 pm debugr:0, g: 255, b: 117
dev:2332020-04-18 04:40:43.080 pm debugsetColor([saturation:100.0, hue:41, level:100])
dev:2332020-04-18 04:40:43.062 pm debugsetSaturation(100.0)
dev:2332020-04-18 04:40:42.572 pm debugr:255, g: 0, b: 77
dev:2332020-04-18 04:40:42.538 pm debugsetColor([hue:95, saturation:100, level:100])
dev:2332020-04-18 04:40:42.527 pm debugsetHue(95)
dev:2332020-04-18 04:40:31.078 pm debugSwitchMultilevelReport(value:99)
dev:2332020-04-18 04:40:31.051 pm debugparse:zw device: 10, command: 2603, payload: 63 , isMulticast: false

Improve lock support

  • Emit an event when a lock is unlocked
  • Return lock code in some useful way when requested via the "get code" service

Add configuration panel

Add an options flow so that certain component options, such as the even listener address, can be changed after the component has been installed.

WARNING (MainThread) [hubitatmaker.hub] Tried to update unknown device XX

I've started getting these error messages.

2020-04-29 19:03:18 WARNING (MainThread) [hubitatmaker.hub] Tried to update unknown device 80
2020-04-29 19:03:18 WARNING (MainThread) [hubitatmaker.hub] Tried to update unknown device 81
2020-04-29 19:03:18 WARNING (MainThread) [hubitatmaker.hub] Tried to update unknown device 82
2020-04-29 19:04:36 WARNING (MainThread) [hubitatmaker.hub] Tried to update unknown device 82
2020-04-29 19:04:37 WARNING (MainThread) [hubitatmaker.hub] Tried to update unknown device 81
2020-04-29 19:04:37 WARNING (MainThread) [hubitatmaker.hub] Tried to update unknown device 80
2020-04-29 19:04:37 WARNING (MainThread) [hubitatmaker.hub] Tried to update unknown device 80
2020-04-29 19:04:37 WARNING (MainThread) [hubitatmaker.hub] Tried to update unknown device 80
2020-04-29 19:04:37 WARNING (MainThread) [hubitatmaker.hub] Tried to update unknown device 80
2020-04-29 19:04:37 WARNING (MainThread) [hubitatmaker.hub] Tried to update unknown device 80
2020-04-29 19:04:38 WARNING (MainThread) [hubitatmaker.hub] Tried to update unknown device 80
2020-04-29 19:04:38 WARNING (MainThread) [hubitatmaker.hub] Tried to update unknown device 80
2020-04-29 19:04:38 WARNING (MainThread) [hubitatmaker.hub] Tried to update unknown device 82
2020-04-29 19:04:38 WARNING (MainThread) [hubitatmaker.hub] Tried to update unknown device 82
2020-04-29 19:04:38 WARNING (MainThread) [hubitatmaker.hub] Tried to update unknown device 82
2020-04-29 19:04:38 WARNING (MainThread) [hubitatmaker.hub] Tried to update unknown device 82
2020-04-29 19:04:38 WARNING (MainThread) [hubitatmaker.hub] Tried to update unknown device 82

These are speakers which I've added to my HE but not exposed in the maker api for my HASS install

Iris Button - No Event Emitters

Not a huge issue for me but I have been testing different kind of devices I have in my box of junk. One of the items is an Iris Button. Hubitat uses a built-in driver (Iris Button Controller). The Battery and Temp sensor are there in HA. When I try to create an automation, none of the button event emitters are displayed:
image

Here is the error in log:

2020-02-21 07:29:09 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140344189711824] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 20, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 214, in websocket_device_automation_list_triggers
    triggers = await _async_get_device_automations(hass, "trigger", device_id)
  File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 133, in _async_get_device_automations
    for domain in domains
  File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 107, in _async_get_device_automations_from_domain
    return await getattr(platform, function_name)(hass, device_id)
  File "/config/custom_components/hubitat/device_trigger.py", line 120, in async_get_triggers
    num_buttons = int(device.attributes[ATTR_NUM_BUTTONS].value)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

I was able to manually create an automation and it works:

- id: '1582167576045'
  alias: test
  description: ''
  trigger:
  - device_id: 2772a3820de94966a0cde1f3809fe5f2
    domain: hubitat
    platform: device
    subtype: '1'
    type: pushed
  condition: []
  action:
  - entity_id: light.office
    service: light.toggle

The device in HE:
image

HE Log when button is pressed:

app:5132020-02-21 07:35:29.675 am debugdevice event: {"name":"pushed","value":"1","displayName":"Iris Button","deviceId":"257","descriptionText":"Iris Button button 1 was pushed","unit":null,"data":null}
app:5132020-02-21 07:35:26.870 am debugdevice event: {"name":"pushed","value":"1","displayName":"Iris Button","deviceId":"257","descriptionText":"Iris Button button 1 was pushed","unit":null,"data":null}

HA Log when button is pressed:

2020-02-21 07:35:26 DEBUG (MainThread) [custom_components.hubitat.device] emitted event <Event device_id="257" device_name="Iris Button" attribute="pushed" value="1" description="Iris Button button 1 was pushed">
2020-02-21 07:35:29 DEBUG (MainThread) [custom_components.hubitat.device] emitted event <Event device_id="257" device_name="Iris Button" attribute="pushed" value="1" description="Iris Button button 1 was pushed">

Like I said before. Not a huge issue as I'm probably not going to use this button but wanted to bring it to your attention in case other report a similar issues with the same or other devices.

Component is setting incorrect POST URL

Hi, I have a zooz Double plug setup in hubitat. There is a top level device and 2 child devices (one for each specific outlet). I've shared the top level device with HA. It shows up fine but when I press the switch to turn it on, the device turns on but the status in HA doesn't reflect that it's on. Thus, I can't turn it off.

How can I help debug this?

Thanks!

KeyError with latest HA firmware

5:38 PM KeyError: 'f9b16c1a546a437ab8661cc097234db3'
5:38 PM evt = to_event_dict(event)
5:38 PM File "/home/webstas/.homeassistant/custom_components/hubitat/device.py", line 351, in get_hub
5:38 PM CONF_TEMPERATURE_UNIT: self.temperature_unit,
5:38 PM File "/home/webstas/.homeassistant/custom_components/hubitat/device.py", line 179, in async_update_options
5:38 PM Traceback (most recent call last):
5:38 PM 2020-05-14 17:38:57 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved

Add device label to events

Emitted events currently contain the Hubitat device ID, attribute, and value:

{
  "data": {
    "device_id": 180,
    "attribute": "pushed",
    "value": 1
  }
}

Add the device label, and potentially a description (both of which are available in the raw Hubitat event) to the HA event.

zwave scene events?

Hi, is it possible for you to forward zwave scene related things to home assistant? For example, a double tap on an inovelli light switch. Although, playing around with hubitat, it seems the drivers convert the zwave scene events into button presses similar to this. Do those automatically get forwarded?

In v0.5.1, restarting home assistant re-adds all entities

Hi,
Every time I restart home assistant on v0.5.1, all my entities from Hubiutat are duplicated with _2 at the end, and all the previous entities are not longer valid.
I have to manually remove the invalid entities and rename them so they reappear in home assistant views.
If I reboot home assistat, it happens again.
I've rolled back to v0.5, and the issue has gone away.

Unexpected error on initial integration setup.

I get the following error message in the HA logs after trying to setup the integration the first time.

Unexpected exception
Traceback (most recent call last):
File "/config/custom_components/hubitat/config_flow.py", line 70, in async_step_user
info = await validate_input(user_input)
File "/config/custom_components/hubitat/config_flow.py", line 48, in validate_input
"id": hub.id,
AttributeError: 'Hub' object has no attribute 'id'

Fail to add Hubitat integration - Unexpected Error

Hello,

I really appreciate yout work. However, I am not able to add Hubitat currently. It keeps showing "Unexpected Error" when I was trying to input Hub IP, App ID and token.

When I was checking log, it showed this:

Unexpected exception
Traceback (most recent call last):
  File "/config/custom_components/hubitat/config_flow.py", line 71, in async_step_user
    info = await validate_input(user_input)
  File "/config/custom_components/hubitat/config_flow.py", line 43, in validate_input
    hub = Hub(data[CONF_HOST], data[CONF_APP_ID], data[CONF_ACCESS_TOKEN])
  File "/config/custom_components/hubitat/device.py", line 55, in __init__
    if not CONF_HOST in entry.data:
AttributeError: 'str' object has no attribute 'data'

Could you tell me what I should do? Thank you

Duplicate entities created for door openers

Not seeing any functional issues, but my two cover (Garage Door, Gate) trigger this every time I restart HA.

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 415, in _async_add_entity raise HomeAssistantError(msg) homeassistant.exceptions.HomeAssistantError: Entity id already exists: cover.garage_door. Platform hubitat does not generate unique IDs

Here's each devices capabilities
[{"capabilities":["Switch",{"attributes":[{"name":"switch","currentValue":"off","dataType":"ENUM","values":["on","off"]}]},"ContactSensor",{"attributes":[{"name":"contact","currentValue":"closed","dataType":"ENUM","values":["closed","open"]}]},"Polling","Configuration","Refresh","Momentary","Sensor","Actuator","RelaySwitch",{"attributes":[{"name":"switch","currentValue":"off","dataType":"ENUM","values":["on","off"]}]},"DoorControl",{"attributes":[{"name":"door","currentValue":"closed","dataType":"ENUM","values":["unknown","closed","open","closing","opening"]}]},"GarageDoorControl",{"attributes":[{"name":"door","currentValue":"closed","dataType":"ENUM","values":["unknown","closed","open","closing","opening"]}]},"HealthCheck",{"attributes":[{"name":"checkInterval","currentValue":null,"dataType":"NUMBER","values":null}]}]}]

[{"capabilities":["ContactSensor",{"attributes":[{"name":"contact","currentValue":"open","dataType":"ENUM","values":["closed","open"]}]},"Sensor","Actuator","DoorControl",{"attributes":[{"name":"door","currentValue":"open","dataType":"ENUM","values":["unknown","open","closing","closed","opening"]}]},"GarageDoorControl",{"attributes":[{"name":"door","currentValue":"open","dataType":"ENUM","values":["unknown","open","closing","closed","opening"]}]}]}]

Clear lastCodeName on physical unlock

Currently, the integration maintains a last_code_name attribute on lock entities, mirroring the behavior of Hubitat. The attribute is updated whenever a new code is used to unlock the lock, and otherwise stays unchanged. This makes lock state updates misleading since they don't reliably indicate whether a code was used to unlock a lock.

Instead, the integration should reset the last_code_name attribute each time a lock is unlocked (or potentially each time it changes state). If a lock was unlocked with a code, its new state will be "unlocked" and its last_code_name property will be set to the code. If a lock was unlocked without a code, its state will be "unlocked" and last_code_name will be empty.

Use a hash of the app token for unique IDs

Ok, so MAC addresses aren't great for IDs either, because Python doesn't have a 100% reliable way to obtain a MAC. Instead, use the Maker API access token, or a hash of it, as the basis for the unique ID.

Some users aren't seeing device updates

In some cases, users aren't seeing device updates even though everything seems to have been installed and setup properly. In at least one case, the problem turned out to be because of the address the component is using to receive Hubitat events. Right now the component sets up a Home Assistants webhook to receive Hubitat events. Many users may have their Home Assistant instances setup to serve over the internet, and having Hubitat send events to an external address may not be desirable (and at least sometimes doesn't work).

The hubitatmaker package is being updated in jason0x43/hubitatmaker#1 to run its own internal server by default. This component should be updated to use the new version, and should allow the user to specify what address should be used for the server (e.g., if your HA instance is running at 10.0.1.50 in your home network, that's what you'd tell this component to listen on, and that's what this component would tell Hubitat to post events to).

Entity XXXX is incorrectly being triggered for updates while it is disabled.

Your plug-in was the main reason why I brought a HE so many thanks for your efforts, your a star!!!

I disable certain entities that I do not use but when I restart HA I get this error.

Entity sensor.office_blind_temperature is incorrectly being triggered for updates while it is disabled. This is a bug in the hubitat integration.

Include hub or Maker ID in hubitat_event

hubitat_event events should include some form of hub identifier so a user can tell which hub they relate to. This is especially important if different hubs have devices with the same device IDs.

Device automation error during startup

Occasionally Home Assistant will emit an error about hubitat not supporting device automation triggers during startup:

2020-03-19 08:17:56 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Integration 'hubitat' does not support device automation triggers (See /config/configuration.yaml, line 10).

Restarting HA resolves the issue.

Lock doesn't handle encrypted codes

Locks with code encrypted enabled return an opaque string for the lockCodes attribute rather than a JSON value.

{
  name: "lockCodes",
  currentValue: "EwLalCd...8=",
  dataType: "JSON_OBJECT"
}

This will cause the integration to throw an exception when HA tries to retrieve the lock state.

Allow hub temperature units to be specified

When HE reports values in centigrade they are being treated as fahrenheit and so converted again by HA to centigrade when displayed in HA (using centigrade values)

55 centigrade ..>>.. 12 centigrade.

Support Hubitat modes

Hubitat's mode can be queried and set through the Maker API. This should be available through HA.

I'm not aware of an appropriate pre-existing device type in HA. Possibly the mode could be presented via a sensor, and a service could be used to set the mode.

Move .translations

HA 0.109 changed the location for translations from .translations to translations. This needs to be updated, or strings will stop loading at some point.

Indicate whether thermostat was manually set digitally set

Add a flag to thermostats that indicates whether the current set point was set via HA or somewhere else. Ideally this would come from Hubitat, but at least for Nests this isn't the case (there's no indication of whether the temperature was adjusted through Hubitat or externally).

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.