Model Train Script
Model Train Automation
Free · In-App Purchases · Designed for iPad. Not verified for macOS.
ModelTrainScript offers you easy automation of your Z21 or ECoS controlled model train layout. It allows you to configure and run simple automation scripts directly from you iPhone, iPad or Mac.
There are a lot of great open source solutions available to automate your layout, however ModelTrainScript has the focus to make automation as easy as possible. We try to do that by offering a user friendly interface for composing scripts and by reducing the amount of physical components you need. No need for a dedicated computer as central unit, just connect your iPhone (or iPad/Mac) and you are ready to go.
In short ModelTrainScript has the following features:
- Provide easy automation of your layout with scripts
- Manual control your layout with graphical representation
- Provide a catalog of your vehicle collection
- Data is synced via iCloud over all your Apple devices
- Ability to use your device camera to control your vehicles
ModelTrainScript requires a command station supporting the Z21 or ECoS lan protocol, it supports the following standards:
- Feedback: RBus, CBus and LBus (LocoNet)
- RailCom (over CBus, LocoNet and ECoSLink) for occupancy detection.
For more information visit our website or feel free to contact us in case of any questions or feedback!
more This version brings major improvements to the conditions:
- Conditions now support sub-groups, enabling you to build more complex logic by combining AND and OR at multiple levels
- Reusable conditions: define a condition once and link it from multiple scripts, sections, or actions
- Copy and paste conditions via the toolbar menu
- Redesigned condition editor with live summary and drag & drop support
10.8.0 5 days ago
Bugfix release for DCCext support
10.7.1 7 Mar
This version introduces variables (integer based). This variables can be used to add conditionality to your scripts via the conditions and events. Variables can be modified via the setVariable action. To monitor them you can add a variable on your layout.
Also some small bugs have been fixed.
10.7.0 2 Mar
This version focuses on stability and ux improvements.
- Inline browsing between list elements like sections, actions and vehicle functions
- MTS menu now contains recently edited items and shortcuts
- Set Path action: MTS finds a path between two points on your layout and set turnouts in the right position
- Beta AI Assistant: It can support you to control or create automation (early beta), you will need an internet connection available while using.
- Fix: occasional incorrect iCloud sync
- Fix: occasional disconnect issues
10.6.0 27 Jan
Happy holidays!
This version moves the main menu behind a main button making it easier to edit catalog while running your layout.
Also new:
- A new layout improving performance for older devices
- Improved usability for the layout editor
- New layout elements: Three way turnout and Windmill
- House, Factory and Windmill support accessories for lights or interaction
- Animation for layout elements
- Feedback not occupied by feature for conditions and execute events
10.5.0 27/12/2025
This version brings a debug mode. With debug mode you can test your scripts in isolation, you can test how your scripts will respond to events.
Other improvements:
- Stop all automation button
- More prominent indicator for syncing with command station
- Turntable item for layout (visual only)
- Ability to customize order of accessory states in layout items
- DCC Accessory deactivation has been removed, if needed can be enabled via settings
- Several UI Tweaks and minor bug fixes.
Thank you for using Model Train Script!
10.4.0 01/12/2025
Vehicles
- Support for decoder consisting (NMRA advanced consisting)
- Consist Function icon for enabling/disabling consist mode
Tools
- Basic programming support for Z21
Overall
- Improved UX for creating and deleting automation items
- Improved input fields
10.3.0 06/11/2025
New:
- Icons on layout buttons
- Support for Digikeijs DR4088LN modules
- System logging across app runs
Fixes:
- Slow startup if no internet is available
10.2.0 17/10/2025
License
This version introduces a license model. Model Train Script will still be free to use, however there will be restrictions than can be lifted by buying a license. Tap on the more info in the license section of the information screen.
Features
- Improved image recognition for camera control
- Input validation for vehicle, feedback and accessory addresses
Fixes
- Yamorc Z21 message processing crashes
- Yamorc and Digikeijs loconet support
10.1.0 01/10/2025
A new major version of Model Train Script!
This version focuses on improved stability and iOS 26 support.
UI
- updated design to support iOS/iPadOS 26
- iPadOS 26 windowed mode support
- Lots of smaller ui and textual improvements and consistency fixes
- Built-in library for vehicle avatars
- Sync indicator around power button
Automation
- condition now supports vehicle profile and camera detection
- camera now has an expiration time for detection events (valid time)
- WaitAccessory, WaitFeedback and WaitCamera actions have been replaced by WaitForCondition; including all options of a condition
- Extended built-in library of sounds
- VehicleProfile now has option for functions to set to on, off or to ignore
System
- improved threading, more stable connection with command station
- files (in settings) now have last access time to identify abandoned files
- extended Demo profile
- demo now sends occupancy events
- drop support Zimo ZCAN
- drop support of iOS/iPadOS 17
10.0.0 15/09/2025
- Add bridges and tunnels for your layout
- Several smaller bugfixes
9.10.0 20/07/2025
- Show vehicle avatar as RailCom occupancy in layout (configurable in settings)
- Ability to add custom labels on actions
- Reduce pulse time for vehicle functions
9.9.0 04/06/2025
- DCCext support for signals on Z21
- Five new vehicle functions: headlights low beam, high beam, parking lights, raise pantograph, shunting mode and smoke unit
- New layout assets: house and factory
- For Z21 reverse accessory states to match Z21 app: straight = green = 1
- Several bugs have been resolved
9.8.0 16/05/2025
Vehicles
- Vehicles can now have different profiles. These are shortcuts to easily set the speed, direction and functions of a vehicle. A profile can be set manually via the throttle or via the SetVehicleProfile action in your script.
Automation
- For an easier overview scripts can now be ordered in a folder structure. They are also from now on alphabetically sorted, to keep your current order the scripts get a numerical prefix during migration.
- Three new script execution events: Startup, Script Execution and Vehicle Profile. As an example Startup allows you to set your layout to a default state on connect.
- The new ShowNotification action allows you to show notifications during script execution.
- Selecting accessory states is now with a graphical presentation of the state.
Layout
- Two address doubleslipswitch. For recognition the two addresses is marked by two dot, the single address with one dot.
- The (Track)switches are extended from just on/off to different color states.
Other
- Speedsteps in throttle now shown in percentages instead of absolute speedsteps
- Sounds are no longer muted when played on iPhone with ringer muted
- Several small bugfixes and inconsistencies
Please feel free to reach out in case of questions or remarks!
9.7.0 28/04/2025
Fixes minute timer for script execution and timetables.
9.6.2 19/04/2025
Bugfix to support yamorc command station
9.6.1 09/04/2025
Layout
- Add uncoupler element
Automation
- Execute conditions on script are evaluated for ExecuteScript action and manual execution in the throttle
- "Wait for script" on ExecuteScript action, the action will pause until a script is available that meets its execute conditions
9.6.0 01/04/2025
Bugfix release
- Fix multiple addresses on (track)switches are not stored properly
- Fix occasional crash while syncing layout state
9.5.1 12/03/2025
Automation
- Introduction of routes
- Ability to timeout script
- Wait action time now in seconds instead of milliseconds
Layout
- Ability to connect multiple dcc addresses to a (track)button
Throttle
- Recently used vehicle selection for vehicle control
- Ability to lock the layout for user interaction
And several other smaller improvements and bugfixes
Feel free to reach out in case of questions or suggestions!
9.5.0 02/03/2025
Ability to add random behavior in your scripts to make them extra dynamic ;-)
- Random script selection in TimeTables and ExecuteScript action
- Ability to make a vehicle function only
- Fixes import vehicles from ECOS with special characters in their name
- Several smaller bugfixes
9.4.0 13/02/2025
- Ability to play local sounds in your automation scripts
- Better quality images for vehicle avatars
- Changed profile export format
- Several smaller improvements and bugfixes
9.3.0 03/02/2025
This version introduces the following new features and improvements:
Automation
- Introducing of the "store and restore" vehicle state actions. This allows you to store the current state of a vehicle, modify the state and restore it later in your script.
- Ability to select the function in the setvehicle function action based on the icon of a function instead of the index. This is useful to make generic scripts while having vehicles with different function mapping.
- Improve wait for initial state sync with command station: Now also waiting for RailCom occupancy data.
Usability
- Insert before for vehicle functions
Other
- Improved speed of cloud synchronisation
- Z21: poll RailCom data on connect
- ZCan20: several improvements and fixes
9.2.0 19/01/2025
This version has a focus on supporting refactoring of scripts.
Automation
- Ability to hard link to elements like accessories, vehicle or feedback, changes will automatically be applied to your scripts.
- Via the links you have insight into the usages of elements via a dependency graph
- Background events are now only triggered after the initial load
- The automation tab of the throttle now provided insight into the automation evaluation state.
Storage
- Improved cross devices syncing
- Unlimited amount of profiles, backed up into iCloud
- Profile selection is now per device
Layout
- New layout elements for platforms, railway crossing, labels and decorative items
- Haptic feedback during interaction
Other
- More icons for automation elements to improve recognition
- Several smaller bugfixes and improvements
9.1.0 13/01/2025
A major new version with brand new styling!
This version brings you a lot of improvements on several areas
Logic:
- Conditions and Events now include vehicle states and flags
- Multiple events on scripts
- Ability to select the operator for conditions (OR or AND)
- Conditions can now also be configured on Actions
- WaitFeedback now has the ability to wait for occupancy of the selected vehicle
Vehicles:
- Vehicles functions now has a wide collection of dedicated function icons that will be displayed in the throttle
Layout:
- The layout now has an infinite size
- Introduction of signal types, beside the light signal you can now also select a semaphore signal.
- On iPad the layout can be made fullscreen in the throttle
- Undo functionality for the layout editor
Other:
- New manual site
9.0.0 10/12/2024
Fixes iPad layout issues
8.3.1 12/10/2024
This version brings major improvements to the conditions:
- Conditions now support sub-groups, enabling you to build more complex logic by combining AND and OR at multiple levels
- Reusable conditions: define a condition once and link it from multiple scripts, sections, or actions
- Copy and paste conditions via the toolbar menu
- Redesigned condition editor with live summary and drag & drop support
more Version 10.8.0 5 days ago
Data Not Collected The developer does not collect any data from this app.