JMRI: OpenLCB SupportThe support on this page is rapidly evolving; the actual code might be ahead or behind the documentation on any given day.
NamingThe system letter for OpenLCB connections is "M". OpenLCB event and object names are introduced below, with additional details and formats on a separate page.
JMRI associates OpenLCB events with individual
JMRI objects (Sensors, Turnouts, etc) via the
JMRI system names. A system name like
defines a Sensor that follows the "220.127.116.11.18.104.22.168"
and "22.214.171.124.126.96.36.199" OpenLCB events
to change state.
Another format for event IDs is a continuous hexadecimal string, such as "x0102030405060709".
These system names can get very long, in which case the "user names" become much more useful.
SensorsOpenLCB messages coming into JMRI applications can be accessed via JMRI Sensor objects. The Sensor's system name determines which OpenLCB events it corresponds to.
A sensor is defined by two events: The one that sets it ACTIVE, and the one that sets it INACTIVE. The event numbers are essentially arbitrary, and are defined by the OpenLCB nodes that send them. Because events are not intrinsically associated with specific hardware objects, and because people can use event IDs in many ways, the specific event IDs for a sensor must be supplied. You create Sensors using the Add... button on the Sensor Table. If you supply two event IDs, the first will set the sensor ACTIVE and the second will set it INACTIVE. If you provide just one, it will set the sensor ACTIVE, and it will automatically reset itself to INACTIVE shortly after. This can be used for events that indicate momentary things on the layout like "it's noon".
TurnoutsThe scheme for Turnouts is similar to Sensors above, except JMRI is emitting the OpenLCB frames instead of receiving them, and the type letter is "T" instead of "S", e.g. "