Ewelink icon

Ewelink

Consume Ewelink API

Overview

The Ewelink custom n8n node allows you to interact with the eWeLink API, specifically for device management. The "Get Device" operation under the "Device" resource retrieves detailed information about a specific device registered in your eWeLink account. This is useful for automation scenarios where you need to fetch device status, metadata, or configuration details as part of your workflow.

Practical examples:

  • Fetching device information to display in dashboards.
  • Using device data as input for further automation (e.g., conditional logic based on device type or state).
  • Auditing or logging device inventory.

Properties

Name Type Meaning
Device ID String Unique identifier of the device to retrieve.

Output

The output is a JSON object containing all available information about the specified device. The structure depends on the eWeLink API but typically includes fields such as:

{
  "deviceid": "string",
  "name": "string",
  "type": "string",
  "params": { /* device-specific parameters */ },
  "online": true,
  // ...other device metadata
}
  • All properties returned by the eWeLink getDevice API method are included.
  • If an error occurs and "Continue On Fail" is enabled, the output will contain an error field with the error message.

Dependencies

  • External Service: Requires access to the eWeLink API.
  • Credentials: You must configure valid eWeLink account credentials (email and password) in n8n.
  • n8n Configuration: No special environment variables required beyond standard credential setup.

Troubleshooting

Common Issues:

  • Invalid Credentials: If authentication fails, you'll receive an error like Authentication failed - status 406. Double-check your email and password.
  • Device Not Found: If the provided Device ID does not exist, the API may return an error indicating the device was not found.
  • Network/API Errors: Connectivity issues or API downtime can result in generic error messages.

Error Handling:

  • If "Continue On Fail" is enabled, errors are returned in the output as { "error": "message" }.
  • Otherwise, the workflow execution will stop on error.

Links and References

Discussion