Trigger using MQTT Communication
  • 29 Nov 2024
  • DF

Trigger using MQTT Communication

  • DF

The content is currently unavailable in Spanish (Mexico). You are viewing the default English version.
Resumen del artículo

The camera can work with Node-RED and MQTT requests to communicate with other devices. The MQTT requests are used to get information, trigger the camera, or send information. It is possible to trigger the camera using an MQTT request, sending a message to a specific topic.

Below is a flow that demonstrates how the function operates:


You can download and import this flow using the JSON file below:

Mqtt_Trigger
3.85 KB

Inject Node: This initiates the trigger process with a pulse. It can be modified to respond to a condition from the camera, a button on a dashboard, or other logic.

Set Payload 1: This triggers a condition in the camera to set its stream_mode or set topic with the HMI_Mode payload. This is the first step in the trigger process.

Set Payload 2: This condition is activated after a brief delay (10ms). This condition sets the hmi/10/capture_mode topic with a SINGLE payload. Note that the number in hmi/NUMBER/capture_mode must match the active URL of the camera.

Output: The last block is the output, which in this case is an MQTT message sent to a local host. If you need to send the message to a different host, you can specify it here by using the IP address of the target device.


¿Fue útil este artículo?