Ajax icon

Ajax

Consume Ajax API (v.0.1.2)

Actions242

Overview

This node, named "Ajax," is designed to interact with the Ajax API (version indicated in the code). It supports multiple resources and operations, including the "Hub" resource with the "Switch On Demand Photo Mode" operation. The primary function of this operation is to enable or configure on-demand photo mode features on a specified hub device for a user.

Common scenarios where this node would be beneficial include:

  • Security system management where an operator wants to remotely activate photo capture modes on a security hub.
  • Automating photo-based monitoring features in smart home or business security setups.
  • Integrating Ajax security hardware controls into broader automation workflows.

For example, a user could trigger the "Switch On Demand Photo Mode" operation to enable all fire detectors' photo capture except those currently triggered, allowing selective monitoring without false alarms.

Properties

Name Meaning
User Id Identifier of the user who owns or manages the hub device.
Hub Id Identifier of the specific hub device on which to switch the on-demand photo mode.
Enabled Features Specifies which features to enable for the on-demand photo mode. Options:
- ALL_FIRE_DETECTORS: Enable photo mode on all fire detectors.
- ALL_FIRE_DETECTORS_EXCEPT_TRIGGERED: Enable photo mode on all fire detectors except triggered.

Output

The node outputs JSON data representing the result of the API call to switch the on-demand photo mode on the specified hub. This output typically includes status information about the operation's success or failure and any relevant response data from the Ajax API.

If the node supports binary data output (not explicitly shown in the provided code), it would likely relate to image data captured or returned by the on-demand photo mode feature.

Dependencies

  • Requires an active connection to the Ajax API via an API key credential configured in n8n.
  • Depends on internal modules handling HTTP requests, state management, and operation resolution/execution.
  • No additional external services beyond the Ajax API are indicated.

Troubleshooting

  • Common Issues:

    • Invalid or missing User Id or Hub Id parameters will cause the operation to fail.
    • Incorrect or expired API credentials will prevent successful communication with the Ajax API.
    • Selecting incompatible enabled features may result in API errors or no effect.
  • Error Messages:

    • Authentication errors indicating invalid API keys require updating the stored credentials.
    • Parameter validation errors suggest checking that required fields (User Id, Hub Id, Enabled Features) are correctly set.
    • Network or timeout errors imply connectivity issues with the Ajax API endpoint.

Resolving these typically involves verifying input parameters, refreshing API credentials, and ensuring network access to the Ajax service.

Links and References

Discussion