Trigger using MQTT Communication
  • 04 Sep 2024
  • PDF

Trigger using MQTT Communication

  • PDF

Article summary

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 MQTT request, sending a message to a specific topic.

For that download the next flow:


The inject block 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" 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.

After a brief delay, the "Set Payload 2" condition is activated. 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.

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.


Was this article helpful?

ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence