Actions3
- Device Actions
Overview
This node integrates with Hubitat, a smart home automation platform, allowing users to interact with their Hubitat devices programmatically. Specifically, the "Device" resource with the "Get Attribute" operation enables retrieving the current value of a specific attribute from a selected device.
Common scenarios include:
- Monitoring sensor data such as temperature, humidity, or motion status.
- Checking the state of switches, locks, or other smart devices.
- Automating workflows based on real-time device attributes (e.g., triggering alerts if a door is unlocked).
Practical example:
- A user wants to get the current temperature reading from a smart thermostat device to log it or trigger other automations in n8n.
Properties
| Name | Meaning |
|---|---|
| Device | Select the target device from your Hubitat environment. The list is dynamically loaded. |
| Attribute | Choose the specific attribute of the selected device to retrieve (e.g., temperature). |
Output
The node outputs JSON data representing the requested device attribute's current value and related metadata as returned by the Hubitat API.
Example output structure (simplified):
{
"name": "temperature",
"value": 22.5,
"unit": "°C",
"dataType": "number",
"currentValue": 22.5
}
If the node is used with other operations, it outputs full device details or command responses accordingly.
No binary data output is produced by this node.
Dependencies
Requires an active Hubitat API credential containing:
- Hubitat host URL
- Application ID
- Access token for authentication
Uses the Hubitat REST API endpoints to fetch device information and attributes.
Requires network access to the Hubitat hub or cloud endpoint.
Troubleshooting
Common issues:
- Invalid or expired API credentials will cause authentication failures.
- Selecting a device without available attributes may result in errors.
- Network connectivity problems to the Hubitat hub can cause request timeouts or failures.
Error messages:
"Unable to load attributes: ..."indicates failure fetching attributes, often due to incorrect device ID or API issues."Device attributes not found in the response"means the selected device does not expose attributes or the API response was unexpected.- General HTTP errors from the Hubitat API (e.g., 401 Unauthorized) suggest credential or permission problems.
Resolutions:
- Verify and refresh API credentials.
- Ensure the device is online and supports attributes.
- Check network connectivity and Hubitat hub availability.
Links and References
- Hubitat Developer Documentation
- Hubitat REST API Guide
- n8n documentation on Creating Custom Nodes