JMRI: LocoNet "Bushby" Forwarder Script
Author: B. Milhaupt
Keywords: JMRI Digitrax LocoNet Bushby

# LocoNet "Bushby" Forwarder

Since JMRI 4.25.2

The `LnBushbyForwarder.py` script provides a mechanism to selectively convert the "normal" LocoNet turnout control messages, for selected turnout addresses, into "special" LocoNet turnout control messages. This script may be useful in cases where a Digitrax command station is configured with its "Bushby" feature enabled.

Such "special" messages can be important if any hardware gets its turnout control messaging from either the DCC track signal or the "RailSync" wires on the LocoNet cable. The "Busbhy" feature, when enabled, prevents the command station from forwarding "normal" LocoNet turnout commands to the DCC track signal (and the RailSync signals). The net result is that a LocoNet agent, including throttles, will be _unable_ to control any accessory devices which get their control messages from the DCC track signal (or the Railsync signals), unless they are capable of sending the special LocoNet turnout control messaging. Since most LocoNet devices are not able to send the special turnout control messaging, most LocoNet devices will not be able to control those accessories.

This script provides a mechanism which watches for "normal" LocoNet switch control messages, and, for certain user-configurable LocoNet switch addresses, sends the equivalent "special" LocoNet switch control message. The command station recognizes those special LocoNet switch control messages and forwards the appropriate DCC packet to the DCC track signal (and RailSync signals).

## What this script does

The `LnBushbyForward.py` script, in the `jython` directory of the JMRI program installation, provides a mechanism which will monitor LocoNet for "normal" turnout control messages, and, selectively, send the corresponding "special" turnout control message, if appropriate.

In the context of this script, "selectively", and "appropriate", as used above, means a check of the "normal" LocoNet turnout control message's turnout address, against a list of turnout addresses:

- if the normal turnout control message is for an address in the list, then a special turnout control message will be generated and sent to LocoNet, or
- if the normal turnout control message is for an address which is not in the list, then the script ignores the message.

## Configuring the script

As written, the script is designed to generate "special" turnout control messages only for "normal" LocoNet turnout control messages for addresses 10, 11, 12, 13. The list may be updated to meet the needs of your specific situation by changing the list which is coded in the line:
`toBeForwarded = [10, 11, 12, 13]`
As an example, if you wish the script to generate "special" turnout control messages for turnout addresses 5, 21, 76, 45, and 33, then the following line would be appropriate:
`toBeForwarded = [5, 21, 76, 45, 33]`

## See also

See this discussion of turnout control message retries, including Bushby details for more information.