Hubitat Trigger icon

Hubitat Trigger

Handle incoming Hubitat events

Overview

The Hubitat Trigger node listens for events from a Hubitat smart home hub and triggers workflows in n8n when those events occur. It supports various event types such as device events, mode changes, location events, or custom-defined events. This node is useful for automating responses to smart home activities, like turning on lights when motion is detected, adjusting settings based on mode changes, or reacting to custom sensor inputs.

Practical examples:

  • Trigger a workflow when any device reports an event (e.g., a door sensor opens).
  • Start automation when the home's mode changes (e.g., from "Home" to "Away").
  • React to location-based events such as arrival or departure.
  • Listen for custom event types defined in Hubitat for specialized automations.

Properties

Name Meaning
Event Type Select which type of Hubitat event to trigger on: All Events, Device Event, Mode Event, Location Event, or Custom.
Custom Event Type Specify the name of a custom event type to listen for (only shown if Event Type is "Custom").
Filter by Device Enable filtering events by specific devices (only available for Device Event or All Events).
Devices Choose one or more Hubitat devices to filter events by (only shown if filtering by device is enabled).
Webhook Setup Instructions Provides instructions on how to configure the Hubitat Maker API app to send events to this node's webhook URL.

Output

The node outputs JSON data representing the incoming Hubitat event with all its properties, plus an additional webhookTime field indicating when the event was received by the node.

Example output JSON structure:

{
  "source": "DEVICE",
  "deviceId": "123",
  "name": "switch",
  "value": "on",
  "descriptionText": "Switch is on",
  "displayName": "Living Room Light",
  "webhookTime": "2024-06-01T12:00:00.000Z"
}

If the event does not match the selected filters (event type or device), the node skips triggering the workflow.

The node does not output binary data.

Dependencies

  • Requires a Hubitat Maker API app configured on the user's Hubitat hub.
  • Needs an API host URL, app ID, and access token credentials to load device options.
  • The user must set up the webhook URL provided by the node inside the Hubitat Maker API app to receive events.

Troubleshooting

  • No events triggering: Ensure the webhook URL is correctly configured in the Hubitat Maker API app and that the correct event type and devices are selected.
  • Invalid webhook data received: The node expects JSON payloads from Hubitat; verify the Maker API app sends proper event data.
  • Filtering issues: If filtering by device is enabled but no devices are selected, no events will trigger. Make sure to select devices when filtering is active.
  • Credential errors when loading devices: Confirm that valid Hubitat API credentials are provided in n8n to fetch device lists.

Links and References

Discussion