MQTT-native signal masts (was Re: First 4.21.1 files available

Bob Jacobsen

MQTT-native signal masts aren’t there yet.

The OpenLCB-native masts are perhaps the closest analog, at least in the code sense:


Plus classes to store/load and to provide the creation/configuration GUI:


On Aug 31, 2020, at 4:18 AM, James Anderson <james_anderson_999@...> wrote:

Hi, have tested mqtt sensors, lights and turnouts and they work great. Started to look at signal masts and cannot see how they are added - Just a quick note to ask if they are implemented yet or more likely i have missed something on how to use signal masts with mqtt,

Bob Jacobsen

Ken Cameron

I second the idea of looking at the LCC signal handling for clues with MQTT.
Here is some content I had sent another poster offline.
You may want to look at the way LCC is dealing with signals. At one simple
level (heads) the layout device doesn't know it is a signal. Like we use
turnouts to drive the lamps on a signal. One way is those build into a
signal head which just knows which color lamp to light. All the signal types
I know of work on the basic idea of receiving a new command, turn everything
off, then turn on the one matching the new command.

Then there are masts. This construct may have the concept of an aspect which
means a set of appearances, some set of which lamps on which heads to light.
A mast can be made up of heads. But if the layout device has some smarts,
then it takes the concept of an aspect as what it is commanded to display.
Then the layout device has to know what to light for each of those aspects.
In LCC this is a one to one, aspect equal set of lamps on a set of heads and
that aspect is a single event id message to trigger it.

A side note on signal heads and Digitrax. Their Se8c board is kind of neat.
While using a pair of turnout addresses, it maps to four different lamp
combinations. But it isn't like a normal truth table, it is simply which of
the four possible commands was the last one determines which lamp output
gets turned on (and any other are always turned off). What was on before
doesn't matter.

Key thing is that masts might only have two to 15 or more aspects. Most only
use 3 to 8 of the possible combinations for the number of lamps and heads it
has. But these are very flexible. Very individual as to what is what. Even
what a name might mean for one railroad would be a different set of lamps
for another railroad. Don't try to think of a naming convention that is too
rigid, it should be flexible.

-Ken Cameron, Member JMRI Dev Team