- 29 Nov 2024
- Imprimir
- DF
Recipe Change - Using HTTP
- Actualizado el 29 Nov 2024
- Imprimir
- DF
The camera can work with Node-RED and an HTTP endpoint to request a recipe change. Since the port is open, other devices can also request a recipe change from the camera. Below is a flow that demonstrates how the function operates:
You can download and import this flow using the JSON file below:
Inject Node: This block is an inject setup where we send the recipe number. It is possible to open this port for TCP or MQTT to send a message from another device.
Note
The recipe ID is found in the URL.
Function Node: This function sets up the correct syntax for the message. It takes the recipe number from the Inject node and formats it properly for the POST request.
HTTP Request Node: Set up the endpoint where the message will be sent.
Debug Nodes: These nodes are used to monitor the message flow. If the message is not received correctly, there will be a bad response.
Note
Example of a bad response: