After a delay caused by a nasty virus infection I have now managed to get all the remaining track laid. The final point at the head shunt/run round is installed and working but I still have to connect the track power feeds to the TOTI units and update the sensor and turnout tables in JMRI.
I have written a more complex script that uses track circuit sensors to detect the locomotive position and then operates points and loco speed and direction. Sound effects are also controlled by the script. This video show the script running. In the video you will see the JMRI Sensor table status, the dynamic track diagram and the output of the script.
You will be able to see the contents of the smaller windows if you play this video in full screen mode.