Skip to main content

model-railway-signalling

A fully featured DCC Command Station, with a focus on enabling prototypical operation of your model railway in terms of route setting, signal interlocking and signalling automation. Layout schematics can be be designed and configured via the UI without the need for any code or bespoke electronics. The application is primarily intended for the Raspberry Pi, but will also run on other platforms (albeit without some of the Raspberry-Pi specific interfacing functions).

  • Provides a full DCC Command station for your model railway layout:
    • Control your locos via on-screen throttles or via your tablet/smartphone.
    • Control all your DCC accessories intuitively via the on-screen schematic.
    • Includes a DCC programming utility for both 'one touch' and CV Programming.
  • Enables signalling schematics to be easily created with route lines, points and signals:
    • Supports most types of UK colour light signals, semaphore signals, and ground signals.
    • Supports complex trackwork formations such as crossovers, slips and 3-way points.
    • Get the schematic looking how you want by changing the styles of objects as required.
  • Enables intuitive and prototypical control of your DCC Accessories via the schematic:
    • Supports all standard DCC signals, points and other DCC accessory decoders.
    • Provides full interlocking of the signals and points on your layout.
    • Simply click the schematic to change the signals and points on your layout.
  • Enables full signalbox simulations to be realised for your layout:
    • Add virtual 'Signal box Levers' to the schematic to control your signals/points.
    • Add virtual 'Block Instruments' for communication and coordination between signal boxes.
    • Supports integration with physical levers (such as the Cobalt-S Levers)
  • Uses the RPi GPIO inputs (connected to external track sensors) to detect train movements:
    • Add 'Track Sections' to the schematic to provide a mimic diagram of train location.
    • Watch the trains 'move' through the schematic based on 'signal passed' events.
    • Alternatively, use 'track circuits' for an absolute indication of block occupancy
  • Provides "one click" or 'NX' (Entry/Exit) set-up and clear-down routes:
    • Interlocking is preserved - Routes are disabled if conflicting movements are set.
    • Routes can be highlighted on the schematic to show they have been successfully set.
    • Supports automated set-up and clear-down of routes based on GPIO sensor events.
  • Incorporates MQTT networking to allow multiple signalling applications to be linked.
    • Allows multiple signalling areas or signal boxes to be created for larger layouts
    • Multiple applications use the same DCC command station for control of your layout.
    • Provides easy expansion of the number of external Track Sensors that can be used.
  • Full documentation and several example layout files are packaged with the application.

The application also provides a Public API to support custom layout control interfaces.

Example Screenshot

Configured / pre-installed systems are now available to purchase from: https://www.model-railway-signalling.co.uk/ The website also included a number of user guides that can be downloaded (in PDF format).

My youTube channel also has a number of videos demonstrating the use of the application: https://www.youtube.com/@DCCModelRailwaySignalling

What's new for Release 6.4.0:

  • New feature (under general settings) to inhibit the manual toggling of track sections:
    • Prevents unintentional manual changes to track occupancy during layout operation
  • New feature to save regular 'snapshots' of track occupancy during running sessions:
    • Snapshots are saved to file every 5 seconds (this can be changed under general settings)
    • User can recover the last snapshot on layout load (if the application exited unexpectedly)
  • New 'Export as Image' function to generate a 'png' image of full schematics
  • Minor bugfix to NX route setting (fix edge case seen when route selection in progress)
  • Keyboard shortcuts (see help=>help) will now work for both upper case or lower case keypresses)
  • Minor editor performance improvements - when moving large numbers of selected objects
  • Improve robustness of GPIO sensor triggering (mainly for the scripting interface)
  • Improve thread safety for handling external events in the Tkinter main loop
  • Improved diagnostic logging - log files are timestamped with their creation time/date
    • Easier to identify and retain log files of interest for further diagnosis.
    • Log files older than 24 hours are automatically deleted on application start

Example Screenshot2

Bug reports and feedback is welcome and appreciated:

  • What aspects are intuitive? What aspects aren't?
  • What aspects do you particularly like?
  • What aspects particularly irritate you?
  • What new features would you like to see?

email: enquiries@model-railway-signalling.co.uk (if reporting bugs then please attach the sig file, application logs and any relevant screenshots)

Installing the application (Raspberry Pi or Linux)

For a first time installation use:

$ python3 -m pip install model-railway-signals

When installing the application on later versions of python you may get the following error:

error: externally-managed-environment

To overcome this, add the '--break-system-packages' argument to the command - i.e.

$ python3 -m pip install --break-system-packages model-railway-signals 

To upgrade to the latest version use:

$ python3 -m pip install --upgrade model-railway-signals

To remove the application:

$ python3 -m pip uninstall model-railway-signals

To install a specific version of the application the application:

$ python3 -m pip install model-railway-signals==4.5.0

Running the application

The python package should be run as a module (note underscores):

$ python3 -m model_railway_signals

If required, a layout schematic can be loaded at startup:

$ python3 -m model_railway_signals -f layout_file.sig

If required, the logging level can be specified at startup (ERROR, WARNING, INFO or DEBUG)

$ python3 -m model_railway_signals -f layout_file.sig -l DEBUG

Full documentation is packaged with the application (access by selecting Help => Docs from the main menubar).

A number of example layout files are also packaged with the application (access by selecting File => Examples from the main menubar)

My youTube channel also has a number of videos demonstrating the use of the application: https://www.youtube.com/@DCCModelRailwaySignalling

Note that I have seen problems running the application on some of the more recent Debian releases (such as Bookworm) that use Wayland as the backend compositor rather than X11 - specifically significant degredation in GUI performance (especially when editing a schematic), button rendering issues (not fully rendered until the cursor hovers over them) and window management issues (e.g. windows not being bought to the front when un-minimised). I also saw these issues with other applications/

The fix was to switch the GUI Compositor back to X11 - Run "sudo raspi-config", select 'Advanced Options' then 'Wayland' and select X11.

Metadata

Release files for model-railway-signals 6.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for model-railway-signals 6.4.0
File Size Uploaded
model_railway_signals-6.4.0.tar.gz 13.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for model-railway-signals 6.4.0
File Interpreter ABI Platform
model_railway_signals-6.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.3 MB

Release files / model_railway_signals-6.4.0.tar.gz

Download URL model_railway_signals-6.4.0.tar.gz
Size 13.1 MB
Tags Source
SHA-256 checksum
How to use checksums
170f32e5f7b19790dbaca4eb19d4ffc4a5f8ba59a20a9348a9fcf157a4cf2938
BLAKE2b-256 checksum
How to use checksums
9da14c52c1bca7a25de8c2e583a6117374d5f16f9b7ac58c2034740feea2a6e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.2

Release files / model_railway_signals-6.4.0-py3-none-any.whl

Download URL model_railway_signals-6.4.0-py3-none-any.whl
Size 13.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
79baaf962a58197d6bb8cc445688759e3ab869f74ab5041bc640d15e640d664f
BLAKE2b-256 checksum
How to use checksums
4b4f1d79e25c0c96b0dc1f1729fe5ae775a70fd38acb2b15a79e28d91f9797f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.2

Release history Release notifications | RSS feed

This release

6.4.0 This release

2 release files

6.3.0

2 release files

6.2.4

2 release files

6.2.3

2 release files

6.2.1

2 release files

6.2.0

2 release files

6.1.0

2 release files

6.0.0

2 release files

5.4.0

2 release files

5.3.0

2 release files

5.2.0

2 release files

5.1.0

2 release files

5.0.0

2 release files

4.9.0

2 release files

4.8.0

2 release files

4.7.0

2 release files

4.6.1

2 release files

4.6.0

2 release files

4.5.0

2 release files

4.4.0

2 release files

4.3.0

2 release files

4.2.0

2 release files

4.1.0

2 release files

4.0.0

2 release files

3.6

2 release files

3.5

2 release files

3.4.1

2 release files

3.4.0

2 release files

3.3.0

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.6.3

2 release files

2.6.2

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.0

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page