Documentation > nControl > Getting Started
This article explains how to generate and use web interfaces. With web interfaces you can control your layout using a phone or tablet.
What are web interfaces?
A web interface is a web page version of your nControl project. It allows you to control and monitor your layout from a web browser. As such you can control your layout with any device that can run a web browser: iPhone, Android phone, iPad, Android tablet, kindle fire tablet, etc. without having to install any additional apps.
The web interface does not have any 'intelligence'. It's essentially a remote control: when you press a tile it will forward that information to the computer running nControl. When nControl changes something in your layout, it will broadcast that to the web interface so you can monitor what's going on.
You can simultaneously connect multiple web interfaces to the same nControl session. For example, you can use a phone to control the switches and use a tablet to monitor your track layout. The MQTT broker in nControl will take care of the communication between all the connected devices and make sure they are remain up-to-date with the current situation.
Generating a web interface
Before you start, make sure you have a 4DBrix account and that nControl is linked to your account.
Web interfaces are generated from nControl projects. Open your project and select File>Upload Interface.... in the main menu. If nControl is correctly linked to your 4DBrix account it will open the Upload Interface dialog box. Enter a Title and a short Description; and click the Upload button. If all goes well you will see the dialog box generating the web interface and uploading it to your 4DBrix account.
The web interfaces are 'read only', you cannot modify your layout with them. If you want to make a change, modify your nControl project and regenerate the web interface.
Starting the MQTT broker
The web interfaces will communicate with nControl through the internal MQTT broker. Before you can open a web interface you have to start the MQTT broker. Select File>MQTT Broker... to open the MQTT Broker dialog box. Click the Start button to launch the broker.
Note that the broker communicates through a Internet/WiFi router. If your computer is not connected to a router the MQTT broker will not be able to start. The MQTT Broker dialog box shows the IP address of the MQTT broker. That's the address that your web interfaces will need to connect to nControl.
Opening the web interface
Before opening a web interface, make sure you have nControl, and its MQTT broker, running. To open a web interface, launch a web browser on the device you want to use and go the 4DBrix website. Scroll down to the footer and select Control Panel in the Account column. This will take you to the log in page.
Enter your e-mail address, password, check the CAPTCHA verification check box and click the Log In button. This will take you to your control panel. There you will see a table with all your interfaces.
Locate the web interface you want to open; you can identify the correct interface using the title and description that you entered while generating it. To open it, click on the button.
The web interface will first ask you to confirm the IP address of the MQTT broker it has to connect to. It will suggest the IP address of the computer that was used to generate the interface. If you want to connect to that computer, just click the Connect button. If you want to connect to another system, enter the IP address of the MQTT broker of that computer before hitting the Connect button. You can find the IP address of the MQTT broker by selecting File>MQTT Broker... in nControl.
If the interface fails to connect to the MQTT broker:
Using the web interface
The web interfaces have three tabs:
Who can connect?
The MQTT broker will use your local network, either Ethernet or WiFi. Any device that is connect to your local network can potentially make a connection with nControl and be used to control your layout. Devices that are not on your local network cannot connect to nControl and control your layout.
Make sure your mobile devices are connected to your WiFi network. You cannot control your layout through a mobile data connection, unless your Internet router allows outside access. By default, for security reasons, outside access is blocked by your router; access from the outside will only be possible if you explicitly configure your Internet router to allow it.