Rocweb

The Browser solution for mobile and stationary Rocrail clients.


One for all…

This is an exclusive goodie for supporters of the project, who have a valid Support Key installed.
Without a key 5 demo minutes are available after server start.


Overview

Rocweb is a WEB Browser based Rocrail client for all platforms including mobile devices.
The jQuery Mobile Toolkit 1.4.5 is used as base for Rocweb.



  • Rocweb supersedes all other Mobile Rocrail Clients.
  • Rocweb needs zero install; Just connect to the Rocrail server and go.


Features

  • Operating System independent
  • Zero installation
  • Multiple SVG theme support
  • Train management
  • Consist/Multihead management
  • Fast clock support
  • On the fly guest loco creation
  • Many actions for running automatically
  • Zoomable layout
  • System actions
  • Binary state control
  • Optional speed buttons for shunting
  • Many options to modify Rocweb as needed
  • Control and slave codes to reduce control for guests
  • Loco list categories
  • Save the options on the Rocrail server in case the browser will delete all data on close


Browser Requirements

An up to date browser is needed which supports:

Tested browsers

Browser Version Remark OS
Safari 8 OS X Yosemite, iOS 8, iOS 91)
Chrome 43 OS X, Windows, Linux, Android
Firefox 38 Highly recommended for Android is version 54+. OS X, Windows, Linux, Android
Opera 29 OS X, Windows, Linux, Android
Edge 10 Windows 10 64bit

A complete list of supported browsers is found on the jQuery Mobile Site.


Prerequisites

  • An up to date Rocrail installation.
  • A valid Support Key installed on the Rocrail server.
  • WLAN (WiFi) in case of mobile devices. The quality of the signal should be at least 50%.


Setup

In the Rocrail properties dialog there is a RocWeb Tab on which the needed port and directories can be set. This must be done for every individual Workspace.
The SVG Theme paths are identically interpreted as by Rocview.

The images of locs, wagons etc. are only displayed in rocweb, if the image path in rocrail setup is correctly2) defined.

Windows

Install directory. Rocrail RocWeb properties.

In the install directory of Rocrail a directory named web should exist; If not the the Rocrail install must be updated.
This directory contains the HTML and JavaScript files needed for Rocweb.

Mac OSX

If Rocrail was installed in the Applications directory the web is found here:

/Applications/Rocrail/rocdata/web

Linux

The web directory is found here:

/opt/rocrail/web


Browser URL

RocrailServer-IP:Port
Example:

http://192.168.1.67:8088


Notes:

  • This is only an example IP address which should be replaced with the IP address of the Rocrail Server computer.
  • Do not use to same port number as used for the HTTP Service Port.

The “Help/Info” dialogue of Rocview will show you the IP address.

Parameters

Needs Rocrail revision 11.200+

ZLevel

With the optional parameter z a ZLevel can be preselected.
Example of selecting ZLevel 1:

http://192.168.1.67:8088/?z=1


RocwebXS


RocwebXS is a lightweight HTML client with only the throttle as main page. It is for devices with a small display.
RocrailServer-IP:Port
Example:

http://192.168.1.67:8088/xs

Parameters

Speed buttons

Speed buttons can be activated with the optional parameter speedbuttons.
Example:

http://192.168.1.67:8088/xs?speedbuttons=true

Bin State Control

The Bin State Control can be activated with the optional parameter binstate.
Example:

http://192.168.1.67:8088/xs?binstate=true

Language

The language can be selected with the optional parameter lang.
Example:

http://192.168.1.67:8088/xs?lang=de

or

http://192.168.1.67:8088/xs?speedbuttons=true&lang=es

Supported translations:

Value Language
de German
en English (default)
es Spanish
fr France
it Italian
nl Dutch
ru Russian


The header icons

The header icons are short cuts for commonly used Rocrail functions as listed below:

Source for translations: rocweb-icons-en.html.zip

The following buttons are hidden in case the display width ⇐ 640:

  • Zoom
  • Stop all locs

Both actions can also be accessed via the menu and automatic popup.


Menu


Information

Information about Rocrail and the connected Server.


System

This will pop up the system dialog for some common actions:

Init field

See: Init field

Start of day

Emergency break

Shutdown server

Shutdown the Rocrail Server if its not in console mode and Rocweb is not in slave mode.
This action needs a confirmation.

Automatic

This will pop up the automatic dialog:

Start all locs

Start all locos in auto mode.
This action needs a confirmation.

Stopt all locs

Stop all locs in auto mode.

Soft reset

Reset all except for block reservations.

Reset all

Reset all including block reservations.
This action needs a confirmation:

Options

This will pop up the options dialog for setting individual options:

Debug

If the developer tool JavaScript/Error console is open this option will write into it all events.
This is for tracing issues with Rocweb. Normally this option should be disabled to avoid using too much system resources.

Simulate sensors

Enable a click on a sensor symbol to simulate a sensor event.

Show all schedules

To list up schedule which contains a block but its not at the first entry.
This option is used in the Block popup.

Module view

Switch directly to module view in case the loaded plan is modular.

Block occupancy

Show the occupancy in tracks, signals and sensors related to a block.
Disable to increase performance.

Show routes

Show routes over tracks, sensors and signals.
Disable to increase performance.

Show routes on switches

See: Show routes on switches Disable to increase performance.

Use all speed steps

Send new speed commands wenn moving the speed slider.
The delta is 3 to avoid too much commands.
In the mode the slider will not be updated by loco events.

Speed buttons

Replaces the slider with two buttons for controlling the loco speed.

Binary State Control

An extra control field, in the Throttle, for binary state commands on the primary/secondary decoder. (NMRA S-9.2.1)

Register Set = 1 Reset = 0 Primary
Secondary
decoder

Speed preset buttons

Buttons for Vmin, Vmid, Vcru and Vmax.

In future revisions a long click is needed to activate Vmax.

Show block IDs

Show block the ID in front of the Loco ID in occupied normal blocks.

Show train IDs

Show Train ID in block.

Show loco image in block

Show Loco Images in block symbols.

Fast clock

Add an extra panel with an Analog Clock.

Second hand

Shows the second hand in the fast clock.

Trace

Activates Tracing.
This option needs extra CPU resources depending on the amount of traffic.

Loco selection category

The loco selection popup can be ordered by these three categories:

  • Engine
  • Era
  • Roadname
  • All → All locos sorted in just one list.

Loco sorting order

The loco selection popup can be sorted by these two attributes:

  • ID
  • Decoder Address

Background color

A user defined background color in RGB format.
The check button must be clicked to take over the new values.

Slider delta

In case of “Speed buttons” or “Use all speed steps” this value is used to increase and decrease the loco speed.

Control code

Slave code

See: Slave code

Save on server

Save the Rocweb options on the Rocrail Server.
If the used browser deletes all data after closing it the options will be requested from the server at Rocweb start .

For experts

The Rocweb options are saved in the rocrail.ini in the node http→webclient→rocweb:

  <http port="0" refresh="0">
    <webclient port="8088" refresh="0" me="true" imgpath="/Users/rob/Projects/Rocrail/unxbin/virt/images" webpath="web" svgpath1="svg/themes/SpDrS60" svgpath2="svg/themes/Accessories" svgpath3="svg/themes/Roads" svgpath4="." svgpath5=".">
      <rocweb binstate="true" allspeedsteps="false" category="engine" color="blue" debug="false" lang="nl" locoSelected="E03" locoSelected0="NS2418" locoSelected1="E03" locoSelected2="" locoSelected3="" moduleview="true" monitor="true" scale="1" secondhand="true" showblockid="true" showlocoimage="true" showocc="true" showroutes="true" showtrainid="true" simsensors="true" slavecode="33" sliderdelta="5" speedbuttons="false"/>
    </webclient>
  </http>


Guest loco


To add a loco on the fly a guest loco can be added.
At least the address must be set before add.
See for more information: Rocview Guest Loco


Zoom


The zoom range is from 50% to 200% and in steps of 10%.

  • Zoom in plus
  • Zoom 100% home
  • Zoom Out minus


Help

Throttle long click functions:


Trace

If the Trace option is activated this popup shows the last trace lines in reverse chronological order without time stamp:

This popup will be updated, when visible or not, if new lines come in.
Lines are starting with the trace level in brackets.
The Clear messages button removes all trace lines.

Level

With the level selector another level can be activated.

Background color

Select a background color.
The user defined color can be set in the Options Popup.
A reload of the page is needed and will be automatically requested.

Language

Select the wanted language to use with Rocweb:

  • Deutsch
  • English
  • Nederlands
  • Français
  • Italiano
  • Russian (русский язык)
  • Español

Missing your language, or if you wish a change of translations? Report it in the Rocweb Forum.


Throttle

Speed slider Optional Speed Buttons instead of slider.
See Options.
Optional Binary State Control field.
See Options.
Optional speed preset buttons.
See Options.

Click on the image to select another loco. If no loco is selected click on the image place holder:

The lines under the loco image are:

  1. Loco ID, train ID(length,weight) and [mode].
  2. Loco description.
  3. Slave locos of the consist. If the selected loco is self a slave, the master will be listed as first. A click on the master ID will select the master loco in the throttle.

Long clicks

Button Function
Loco image Opens the Block popup if the selected loco is in a block, or if not the Select Block popup.3)
RE Power OFF
FG Emergency Break
F1-F4 Throttle selection
F5 Add a car to the train
F6 Leave a car from the train
F7 Load a car of the train
F8 Empty a car of the train
F9 Add a consist loco
F10 Delete a consist loco
F11 Show the complete consist including the master loco
F13 Manual mode ON/OFF (Zimo MX10)
F14 Shunting ON/OFF (Zimo MX10)
Lights Dispatch
Direction Stop (V=0)


Select Block


With a long click on the throttle loco image click, this popup will be visible if the loco is not in a block.
After selecting a block from the list the loco will be put in the block after a click on the select button.

Turntable & FiddleYard

A click/push on a turntable or fiddleyard in the layout will open following popup:

Go to the next track.

Go to the previous track.

Go

Go to the selected track from the list.


Block

A click/push on a block in the layout will open following popup:

Long clicks

Button Function
Half automatic Set the loco in manual mode
Soft reset Reset the loco from manual mode

Loco image

Select another loco from the list to set in this block.
If no loco is in this block one can be selected after clicking on the dummy loco image:

With a long click the loco will be removed from this block.

Reset Locomotive assignment

Use a long click on the loco image.

Schedule

Select a schedule or tour from this drop down list to use with “Start train”.
Default only schedules and tours are listed which starts in this block. In the options menu this can be changed.

Block

Select a destination block from this drop down list to use with “Start train”.
If a schedule is also selected the block destination will be ignored.

Assign train

Assign a train selected from the list.
To release a train if the first item, “Train”, of the list is selected.

Start train

Start the train in this block in automatic mode with the optional selected schedule or tour.

Stop train

Stops the train in this block running in automatic mode.

Half automatic

Start the train in this block in half automatic mode with the optional selected schedule or tour.

Soft reset

Reset the loco in this block without removing it from the block.

Swap placing/enter side

Open/Close

Open or close this block.


Loco selection

The loco selection is used in the throttle and block popup by clicking on the loco image.

The categorie type can be changed in the Options.


Consist management

A loco consist can be managed using the following long clicks in the throttle:

Button Function Description
F9 Add a consist loco Opens al loco selection list without the already existing members.
F10 Delete a consist loco Opens al loco selection list with all existing members.
F11 Show the complete consist including the master loco.


Fast clock


A click/touch on the level title will open the fast clock popup:

The Set, Freeze and Resume commands can be used.
See for more information: Clock Service Commands.

Note: On small devices the title is probably hidden; Landscape could help out.

If a text field has set the option “Fast clock” this popup can also be activated by a click/touch on that text field.

Analog clock

The clock is not available in module view.

An extra level is generated for the analog clock:

A click/touch on the clock will open the Fast Clock popup.
The used SVG is based on the 3Quarks SVG Railway Station Clock. (http://www.3quarks.com/images/svg/german-clock.svg) 4)


Layout

Tooltips

Tooltips are available for all layout objects except for tracks.

Touch feedback

To show feedback if an object was really touched the background will get a red color until an event came in for this object from the Rocrail server.

Touch red background. Normal background color after the event came in.


Module layout

Rocweb can show the module layout in one level:

This example shows 6 modules.
See for more information about this layout: Plan-F.


Block labels

BlockID : LocoID _ TrainID BlockEnterSide

Default placing


Reverse placing


The loco ID is underlined.


Small devices

On small devices, like smart-phones, the best way to get the full screen for Rocweb is to add it to the home screen.

  • On iOS with Safari
  • On Android with Chrome


Desktop shortcut

Some browsers offer to create a shortcut on the Desktop for a Web-App like Chrome:

Trouble Shooting

Plan does (partial) not load

Check the plan if it is XML well formed with a tool like "XmlSpy".
Or use the W3C service: http://validator.w3.org/#validate_by_upload
Rocrail and Rocview are using the Rocs parser which is not so strict as the JavaScript one.


Links and Files

Video demonstrating the handling of Rocweb

This video explains the operation of a layout by Rocweb (in German). It includes the following chapters:

  1. Installation and setup
  2. Starting Rocweb in a web browser [03:40]
  3. Operating Rocweb part 1 (basic configuration, options, system) [07:52]
  4. Operating Rocweb part 2 (layers, zoom, track power, automatic mode) [11:46]
  5. Operating Rocweb part 3 (loco functions) [13:36]
  6. Operating Rocweb part 4 (switches, signals, block functions and a concluding demo) [18:40]


1) For iOS 9 Rocrail must be at least 9907.
2) The path must be achievable from the server
3) 12.490+
4) Hallo Rob, vielen Dank für Deine Mail. Die Verlinkung so ist prima, auch dafür vielen Dank. Eine schönes Programm - rocrail - hast Du da geschrieben. Viel Erfolg damit und viele Grüße aus Hamburg Rüdiger

Personal Tools