The Rocrail webclient ist tested with FireFox, Opera, Dillo(as from svn 789) and IE. It uses plain standard HTML, and should be working on all graphical web browsers.

rocrail.ini example:

In the rocrail.ini you must define a http.webclient section as shown in the example:

<rocrail planfile="neustadt.xml" runasroot="false">
    <webclient xsize="500" ysize="350" port="53702" symboltype="gif" webcampath="webcam" webcampos="right">
      <webcam title="Hbf Neustadt" imagefile="webcam1.jpg"/>
      <webcam title="Unterstetten" imagefile="webcam2.jpg"/>
  <trace file="rocrail.trc" debug="false" automatic="false"/>
  <digint iid="p50x_1" lib="p50x" device="/dev/ttyS0" fbmod="0" bps="9600" timeout="1000" swtime="500"/>
  <digint iid="hsi88_1" smooth="true" lib="hsi88" device="/dev/ttyUSB0" fbmod="7" fbleft="7" timeout="1000" cr="false"/>
  <ctrl minbklc="20" swtimeout="250" ignevt="5"/>
  • symboltype defaults to “png” (use “gif” when using IE; IE cannot handle png transparency…)
  • port defaults to “53702”
  • xsize/ysize defaults to “320” x “240” (QVGA)
  • the rocrail sever needs the symbols directory in it's working directory to be able to provide the connected browsers all images.

Control line from left to right:

  • level down
  • level up
  • power on
  • power off
  • automatic control on
  • combobox loc selection
  • 000kmh loc velocity (kmh or %)
  • select loc for RIC
  • velocity hint minimal
  • velocity hint stop
  • velocity hint cruise
  • direction change
  • loc lights on/off
  • function 1 to 4


  • The WebClient is NOT updated by event. The polling rate, webclient.refresh, can be modified in the rocrail.ini and is by default 10 seconds.
  • It is not planned to integrate AJAX to get an event driven WebClient.
  • The only drawback is when selecting a train from the list at the same moment a refresh occur: the selection is reseted to the previous setting. But if you desire an event driven front-end: Rocview is there to please you!
  • The WebClient is not ment to replace the rich Rocview, but only to have a second possiblilty to send commands to the rocrail server by HTTP.
  • The Loco names must not contain space or speacial characters. The only allowed special character is a dash.

Open issues:

  • turntable
  • threeway turnout
  • absolute path support in webcampath and symbolpath

Future extensions:

How to set up a WebCam:

Personal Tools