This is an advanced version of a railway crossing system.
How to control my railroad model actions using an infrared remote.
A mesh of open devices monitoring railway crossings "open-closed" status.
Automated railroad level crossing detects the train approaching the level crossing and alerts the users and closes the gate.
Using Xiaomi smartphone's accelerometer sensor to detect rail vibration with Node-Red