ebus-collector
Emits the frames of the selected cameras, one message per frame, with the image in msg.payload. Its dialog also starts and stops the discovery service and the publisher container of each camera.
The node has no input and one output.
Properties
| Property | Description |
|---|---|
| Name | Label of the node in the flow. ebus-collector when empty |
| Mirror | Checkbox Mirror horizontally (left and right swapped), off by default. See Mirror horizontally |
| eBUS Services | State of the services on the host, with the Start eBUS and Stop eBUS buttons |
| Available Cameras | The devices that the discovery service finds: their state, the buttons that act on them and the checkbox that selects them for this node |
The buttons of both panels act on the host at once; they do not wait for a deploy. The selection of cameras is saved with the node and applies from the next deploy.
The services and the publisher containers are shared by all the nodes of the package: a camera started from one dialog can be selected in any ebus-collector, ebus-trigger or ebus-config node, and several ebus-collector nodes can select the same camera.
The panels need the NATS server: when Node-RED cannot reach it, they show Failed to fetch eBUS status and the editor shows a notification with the error.
eBUS Services
The panel shows Running when a container whose name starts with ebus- is running on the host, and Stopped otherwise. Start eBUS is disabled while it shows Running, and Stop eBUS while it shows Stopped.
- Start eBUS starts the discovery container,
ebus-discovery. The Docker images of the package version that are not on the host are pulled first, the discovery image and the publisher image, which can take a while. A stoppedebus-discoverycontainer that already exists is started again as it is; otherwise the container is created, with the host network, in privileged mode and with the Docker socket of the host mounted, so that it can start the publisher containers. - Stop eBUS removes every container whose name starts with
ebus-, running or not: the discovery container and the publisher of every camera. The containers are killed, so their publishers do not reportdisconnected: theebus-collectornodes keep the last status they received. The cameras have to be started again afterwards.
Available Cameras
The table lists the GigE Vision devices that the discovery service finds, and is refreshed every 5 seconds while the dialog is open: each refresh asks the discovery service to list the devices again (at most once per second for all the open dialogs). It reads Waiting for camera information... until the first list arrives.
| Column | Content |
|---|---|
| Select | Checkbox that adds the camera to the selection of this node. It appears once the publisher container of the camera is running, and for the cameras that are already selected |
| MAC | MAC address of the device, in upper case with colons |
| Model | Model name that the device reports |
| IP | IP address of the device |
| Interface | Network interface of the host on which the eBUS SDK found the device |
| Status | State of the device, see the next table. A device whose licence flag is false also shows eBUS licence required for this device |
| Actions | Buttons available for the device |
| Status | Meaning |
|---|---|
Free | No application holds the control channel of the device |
Controlled (this host) | The publisher container of the camera is running and an application holds the control channel, normally that publisher |
Controlled by another host | Another application holds the control channel of the device, and no publisher container runs for it on this host |
No access | Another application holds the device in exclusive mode, or the IP configuration of the device is not valid on the interface where it was found: its address is not in the subnet of that interface |
Running (this host) | The publisher container of the camera is running and the access state of the device could not be read |
Unknown | The access state of the device could not be read |
Not found | A selected camera that the discovery service does not list |
To fill the list, the discovery service asks every device for its access state, and opens the devices that are not in No access read-only to read the limits of their image size, exposure and gain: it never takes the control channel of a camera.
| Action | Offered for | Effect |
|---|---|---|
| Stop | A camera whose publisher container is running | The discovery service stops and removes the publisher container of the camera |
| Fix IP | A device in No access, whatever the reason | Not tested on a real camera yet: use it only when the address is the problem. The discovery service gives the device a new IP address (GigE Vision ForceIP) in the /24 subnet of the interface where it was found. It tries a fixed list of host numbers that starts at 222 and prefers high numbers, and skips the address of the interface, the addresses of the other devices it finds and any address that answers a ping. The mask is 255.255.255.0 and there is no gateway. After a change the list is published again 1.5 seconds later. It repairs an address that does not fit the interface; it does not release a device that another application holds, although the button is offered for that case too |
| Start | A device in Free whose licence flag is not false | The discovery service starts the publisher container of the camera, ebus-<MAC>, on the interface shown in the Interface column, from the publisher image of the package version. A container of that name that already exists is removed first |
| Remove | A Not found row | The camera leaves the selection of this node. Unticking its checkbox does the same |
The other rows show a note instead of a button: Controlled by another host, Licence required or No actions available.
When Node-RED cannot run an action (a Docker or NATS error, or a device listed without an interface), the editor shows a notification with the error text. Stop, Fix IP and Start are requests to the discovery service: what it cannot do is written to the log of its container (docker logs ebus-discovery).
The licence flag is the one the eBUS SDK reports for the device. It describes the device, not a licence installed for the SDK: streaming from Pleora hardware needs no licence, cameras of other vendors need an eBUS licence.
Mirror horizontally
When the checkbox is ticked, every frame is flipped left to right before it is sent: each row is reversed and the channel order inside each pixel is kept (BGR stays BGR). The width, height, channels, color space and size of the image do not change, only the order of its columns.
Use it when the camera head is mounted so that its lines come out reversed, as on the Omron V275 the package was validated with: without it every node downstream sees the image mirrored. The flip is done in the node, on a copy of each frame; it was measured at 0.05 ms for a 2640 × 48 Mono8 block and 0.36 ms for the same size in BGR8, with Node.js 20.
Flows saved before the option existed keep passing the frames through unchanged.
Output
One message per frame of each selected camera:
{
topic: "ebus/AA-BB-CC-DD-EE-FF/notification",
mac: "aa:bb:cc:dd:ee:ff",
payload: {
data: <Buffer ...>,
width: 2640,
height: 48,
channels: 1,
colorSpace: "GRAY",
dtype: "uint8"
},
timestamp: "2026-01-15T10:15:30.123456Z",
segment: "/ebus_AA-BB-CC-DD-EE-FF_3",
frameId: 1542,
blockId: 1607
}| Property | Type | Content |
|---|---|---|
payload.data | Buffer | Pixels of the frame, 8 bits per channel, rows without padding. It is a copy of the shared memory segment: later frames do not change it |
payload.width, payload.height | number | Size of the frame in pixels |
payload.channels | number | 1 for a Mono8 frame, 3 for any other pixel format (converted to BGR8, not tested with a camera yet) |
payload.colorSpace | string | GRAY for a Mono8 frame, BGR otherwise |
payload.dtype | string | uint8 |
topic | string | NATS subject on which the publisher announced the frame, with the MAC address in upper case and hyphens |
mac | string | MAC address of the camera, in lower case with colons |
timestamp | string | UTC time at which the publisher announced the frame, in ISO 8601 with microseconds. It is the time of the host, not a timestamp of the camera |
segment | string | Name of the shared memory segment the frame was read from |
frameId | number | Counter of the publisher: 1 for the first frame after its container starts, then one more per frame |
blockId | number | Block ID that the device gave the frame in the GigE Vision stream. A jump of more than one between two messages means that frames were lost between the device and this node: in the network, dropped by the publisher (an incomplete block, a failed conversion) or skipped by the node |
The publisher passes a Mono8 frame through as it is, with one channel, and converts a frame in any other pixel format to BGR8; the conversion has not been tested with a camera yet, because the devices the package has been tested with stream Mono8. msg.payload has the shape of the raw image object that the nodes of @rosepetal/node-red-contrib-image-tools take; wiring it into those nodes has not been tested yet.
Each publisher writes the frames in turn to 8 shared memory segments, named /ebus_ followed by the MAC address (upper case, hyphens), an underscore and the number of the segment. A segment holds only the pixels, from its first byte; the segments start at the payload size of the device and grow when a frame does not fit them. The node checks that the announced size is the width times the height times the channels of the frame before it reads it.
Status
| Status | Meaning |
|---|---|
Grey dot, idle | No camera is selected |
Grey ring, <mac>: unknown | No status has arrived yet from the publisher of the camera. The publishers repeat their status about every 10 seconds |
Green dot, <mac>: connected | The publisher holds the camera and acquires. A line-scan device stays connected while it sends no frames |
Yellow dot, <mac>: reconnecting - <detail> | The publisher is opening the camera again; <detail> gives the reason, for example link lost, device not found on the network or device IP configuration not valid for this host (use fix) |
Red dot, <mac>: no_access - <detail> | Another application holds the control channel of the camera; <detail> gives its IP address when the camera reports it |
Red dot, <mac>: disconnected - <detail> | The publisher has stopped, for example because its container was stopped with Stop |
Red ring, nats error | The node could not connect to the NATS server when it started |
The texts above are those of a node with one camera selected. With several cameras the node shows connected N when all N are connected; otherwise it shows the state of one camera that is not connected, a no_access or disconnected one first, and how many cameras are not connected, for example reconnecting 1/3.
The status follows the messages that the publishers send on ebus/<MAC>/status, and a camera also turns connected with its first frame. A connected camera shows no detail, so the replies of the publisher to ebus-trigger and ebus-config, which it sends with the status connected, do not appear here: they are written to the log of the publisher container (docker logs ebus-<MAC>, with the MAC address in upper case and hyphens).
Errors
| Message | Level | Cause |
|---|---|---|
Failed to connect to NATS: <reason> | Error | The NATS server could not be reached when the node started |
Bad JSON on <subject> | Warning | The announcement of a frame is not valid JSON. The frame is skipped |
Shared memory segment <name> missing for <mac>; awaiting new frames. | Warning | The publisher announced a frame, but its segment is not in the /dev/shm that Node-RED sees. The frame is skipped and the discovery service is asked to list the devices again. Written at most once every 10 seconds per camera |
Frame <subject>: <reason> | Error | The frame could not be read or built: the announcement carries no segment name or no size, the size does not match the width, height and channels, the segment name or size is not valid, the segment is shorter than announced, or Node-RED is not allowed to read it. The frame is skipped |
The errors are logged without a message object, so they appear in the debug sidebar and in the Node-RED log but do not trigger a Catch node.
The nodes of the package and their dialogs share one connection to NATS per Node-RED process, opened the first time one of them needs it. If the first attempt of a collector fails, the node stays in nats error: start the NATS server and restart the flows (a full deploy, or a restart of Node-RED). Once the connection is open, the client reconnects by itself whenever the NATS server comes back, and the node keeps its subscriptions.