Skip to main content

Reply to "Python code to issue TMCC, Legacy, and PDI Commands"

Just added the ability to "replay" a set of commands at start-up. With this feature, and tools already built into the OS of the Raspberry Pi and MacOS (and probably Windows as well) you can:

  • Activate an accessory at a specific time of day
  • Start and stop trains based on some external event
  • Turn on your layout lights at sundown and off at sunrise (if you pulled an all nighter )
  • Blow the horns of all active trains at noon
  • and many other...

The PyTrain startup option to do this is -replay followed by the name of a text file containing the commands to run at startup. The command can be run from a PyTrain client or server.

  -- Dave

×
×
×
×
×