Hubitat icon

Hubitat

Interact with Hubitat devices

Actions3

Overview

This node integrates with Hubitat, a smart home automation platform, to interact with devices connected to a Hubitat hub. Specifically, the "Device" resource with the "Get" operation allows users to retrieve detailed information about a single device registered in their Hubitat environment.

Common scenarios where this node is beneficial include:

  • Fetching the current state or metadata of a specific smart device (e.g., thermostat, light bulb, sensor) for monitoring or logging purposes.
  • Using device details as input for further automation workflows, such as conditional logic based on device status.
  • Integrating Hubitat device data into other systems or dashboards via n8n.

Practical example:

  • A user wants to get the latest status of a particular temperature sensor device to decide whether to trigger an alert if the temperature exceeds a threshold.

Properties

Name Meaning
Device Select the specific device from your Hubitat hub to retrieve information about. Options are dynamically loaded from your Hubitat environment and show device names and types.

Output

The output is a JSON object representing the full details of the selected device as returned by the Hubitat API. This typically includes device metadata such as ID, name, label, type, current states, attributes, and other relevant properties.

Example structure (simplified):

{
  "id": "123",
  "name": "Living Room Light",
  "label": "Living Room Light",
  "type": "Switch",
  "attributes": [
    {
      "name": "switch",
      "currentValue": "on"
    },
    ...
  ],
  ...
}

No binary data output is produced by this operation.

Dependencies

  • Requires an active Hubitat API credential configured in n8n, which must provide:
    • Hubitat host URL
    • Application ID
    • Access token for API authentication
  • The node uses the Hubitat REST API endpoints to fetch device data.
  • Network connectivity to the Hubitat hub's API endpoint is necessary.

Troubleshooting

  • Common issues:

    • Invalid or expired API credentials will cause authentication failures.
    • Selecting a device that no longer exists or is unreachable may result in errors.
    • Network connectivity problems between n8n and the Hubitat hub can cause request timeouts or failures.
  • Error messages:

    • "Unable to load devices" or "Unable to load attributes" during option loading indicates issues fetching data from Hubitat; verify credentials and network access.
    • Errors thrown during execution often contain the underlying HTTP error message; check that the device ID is correct and the Hubitat API is accessible.
  • Resolution tips:

    • Re-authenticate or update the Hubitat API credentials in n8n.
    • Confirm the device ID is valid and the device is online in Hubitat.
    • Ensure the Hubitat hub is reachable from the n8n instance network.

Links and References

Discussion