Skip to the content

(3) A look at the requirements

Before we launch off and start writing code (no matter how tempting that is), we ought to think about what it should be doing. Good old user requirements. For a start, lets keep it simple, this is, after all a demo on a model railway and not controlling real trains on railtrack. Though some might argue that wouldn't be a bad idea.

The first most basic thing, is to start and stop trains so we'll have the system respond to the command 'Start the train xxx' and 'Stop the train xxx' where xxx is, the name given to a locomotive or train. For example, 'Start the diesel'. We'll add in a 'Stop All trains' that does what it says and can used in an emergency (though in practice, hitting the big red STOP button will still likely get used in real emergencies).

We could also think about having Alexa respond to where trains are, lets suppose when a train has completed a pre defined sequence (more on that later), it might say 'Train xx has arrived at its destination'.

Finally, we can control track as well by setting points to make routes. So we can ask Alexa to 'Set the track to yyy' where yy is the name of a predefined route.

I'm sure once this is up and running we'll do all manner of clever things, but for now this should be enough to get the hang of things and do some end to end testing.

comments powered by Disqus

Blue Tang Innovations

Fourth Floor
5 Rose Street


Get in touch for a friendly chat to establish how we can help, or simply to ask a question without any obligation.