irayple-config
Sends parameter values to the selected cameras when a message arrives. The values are constants or come from the message or from the flow and global context.
The node has one input and one output.
Properties
| Property | Description |
|---|---|
| Name | Label of the node in the flow. irayple-config when empty |
| Parameters | List of parameters to send. Add parameter adds a row with the parameter, its value and the source of the value |
| Irayple Services | State of the services on the host, with the Start Irayple and Stop Irayple buttons |
| Available Cameras | The cameras that the discovery service finds. The Select checkbox marks the cameras that this node configures |
The last two panels are the ones of irayple-collector and act on the same services and containers: see its Properties. A camera can be selected once its publisher container is running.
Parameters
Each row has a parameter from the list below, or Custom… with the exact name of a GenICam node of the camera. The value is a constant of the type in the table, a property of the message (msg.) or a context value (flow., global.).
| Parameter | Value | How the publisher applies it |
|---|---|---|
Width (pixels), Height (pixels): Width, Height | Number, in pixels | Limited to the minimum and maximum of the camera and rounded down to its increment. The acquisition is paused while the value is applied |
Offset X (pixels), Offset Y (pixels): OffsetX, OffsetY | Number, in pixels | As Width and Height. When a size and its offset arrive together, the publisher chooses which of the two to apply first so that the intermediate combination fits the limits of the camera |
Exposure Time (µs): ExposureTime | Number, in microseconds | Limited to the range of the camera. A value of 0 or less is ignored. The camera must have ExposureAuto set to Off |
Gain (dB): Gain | Number, in dB | Limited to the range of the camera. A negative value is ignored. On a camera without the Gain node the value is written to GainRaw, without its decimals. The camera must have GainAuto set to Off |
Acquisition Mode: AcquisitionMode | Text, typically Continuous, SingleFrame or MultiFrame | The acquisition is paused while the mode changes |
| Custom… | Text, number or boolean | The node with that name is set according to its type: boolean, integer, float, enumeration, text or command |
- The names
Width,Height,OffsetX,OffsetY,ExposureTime,GainandAcquisitionModeare recognised in any letter case;Exposureis accepted in place ofExposureTime. Any other name is sent as it is written. - Values are converted to the type of the node. A text that holds a number is accepted for a numeric node, and a number is rounded for an integer node. A boolean node takes a boolean, a number (any value but 0 is true) or one of the texts
true,on,yes,1,enable,start,execute,runandfalse,off,no,0,disable,stop,cancel. An enumeration takes the name of one of its entries, its numeric value, or a boolean, written asOn/OfforTrue/False. A command is executed when the value is true in the same sense, and skipped when it is false. - Within one message the publisher writes
ExposureTimeandGainfirst, then the region of interest, then the other nodes in the order of their names, andAcquisitionModelast.ExposureAutoandGainAutoare therefore written after the values they block: switch the automatic modes off in an earlier message.
Input
Any message makes the node evaluate its parameters and send them.
| Property | Type | Description |
|---|---|---|
msg.parameters | object | Optional. Parameter names and values that are added to the ones of the dialog and replace those with the same name. The values are text, numbers or booleans; values of other types are left out |
msg.cameras | array of strings | Optional. MAC addresses of the cameras to configure for this message, in place of the selection of the dialog. Both aa:bb:cc:dd:ee:ff and AA-BB-CC-DD-EE-FF are accepted. An empty array means no camera |
A parameter whose value is missing (undefined or null), an empty text or the text none is left out; texts are sent without the spaces around them. A numeric row left empty is sent as 0. The remaining parameters are sent together to each camera.
To set the exposure and the gain by hand, the automatic modes must be off. They can be switched off with the same node, in a message of their own:
msg.parameters = {
"ExposureAuto": "Off",
"GainAuto": "Off"
}The values only reach a camera whose publisher container is running. The publisher keeps the parameters it has received: if the link with the camera is down they are applied when it comes back, and they are applied again after every reconnection. They are forgotten when the publisher container is restarted.
Output
The incoming message, with the summary of what was sent in msg.iraypleConfig:
msg.iraypleConfig = {
cameras: ["aa:bb:cc:dd:ee:ff"], // cameras the parameters were sent to
parameters: ["ExposureTime", "Gain"], // names of the parameters sent
timestamp: 1710500000000 // moment of sending, in milliseconds
}| Situation | Output |
|---|---|
| The parameters were sent | The message with msg.iraypleConfig |
| No parameter has a value | The message, unchanged |
| There is no camera to configure, or the sending fails | No message |
The camera does not answer: msg.iraypleConfig tells what the node sent, not what the camera accepted. A node that the camera does not have, or a value that it refuses, is written to the log of the publisher container (docker logs irayple-<MAC>, with the MAC address in upper case and hyphens).
Status
| Status | Meaning |
|---|---|
Green dot, N cams | M params | The node is ready, with N cameras selected and M parameter rows in its dialog (1 cam, 1 param in the singular) |
Grey ring, 0 cams | M params | No camera is selected in the dialog |
Green dot, sent K (N cams | M params) | The last message sent K parameters |
Yellow ring, no cameras selected | A message arrived and there is no camera to configure |
Yellow ring, no parameters | A message arrived and no parameter has a value |
Red ring, config error | The parameters could not be sent |
Errors
| Message | Level | Cause |
|---|---|---|
No cameras selected for configuration | Warning | A message arrived and there is no camera to configure: msg.cameras is an empty array, or it is absent and no camera is selected in the dialog |
Parameter <name>: <reason> | Warning | The value of a row could not be read from the message or the context. The parameter is left out |
Parameter <name>: unsupported value type <type> | Warning | The value of a row is not text, a number or a boolean. The parameter is left out |
Parameter <name>: numeric value must be finite | Warning | The value of a row is NaN or infinite. The parameter is left out |
Parameter <name>: empty or none value ignored | Warning | The value of a row is an empty text or none. The parameter is left out |
No parameter values to apply | Warning | No parameter is left to send |
NATS connection failed: <reason> | Warning | The NATS server could not be reached when the node started |
Failed to configure cameras: <reason> | Error | A message arrived and the parameters could not be sent to the NATS server |
The errors are logged without the message, so they appear in the debug sidebar and in the Node-RED log but do not trigger a Catch node.
The irayple-config nodes and their dialog share one connection to NATS, opened the first time one of them needs it. If that first attempt fails it is not repeated: start the NATS server and restart Node-RED.