The Tiles Hub

From MakeProAudio MediaWiki
Jump to navigation Jump to search

Architecture in the network

What is the purpose of the Tiles Hub?

The software we call Tiles Hub allows access to a USB connected tile chain over the network via IP sockets. So it is the link between the hardware and the application. Currently, the Tiles Hub can only manage one tile chain at a time. In the future this limitation will no longer exist and multiple Tile Chains can be connected to the Tiles Hub.

Where does the application run?

Because the Tiles Hub communicates with the application over the network, the application can run either "somewhere" on the network or on the same host machine as the Tiles Hub.

This allows for all kinds of applications. So you can even break your project down into multiple devices. For example, it is possible to have one device for operation on the table, but the controller with the application in a top hat rail in the basement.

Supported platforms

The following list only mentions the environments tested so far. Some older or newer versions of operating systems/platforms may well support the operation of the Tiles Hub without any problems.

Valid (tested) versions
Windows Windows 10 (1903, 1909, 2004)
macOS X Catalina (10.14.x), Mojave (10.15.x)
Linux (x86/x64) (none tested yet)
Raspberry Pi All B models from version 2 upwards, i.e. 2B, 3B, 4B
running Raspbian/Raspberry Pi OS

Windows

Download

The Tiles Hub for Windows is delivered as a ZIP archive. Download your copy here:

https://www.makeproaudio.com/downloads/TilesHub-Windows-0.9.4.zip

Installation

The only installation step is to unzip and copy the release into a directory of your choice.

Package Structure

The relevant folders are mentioned below:

/
    app/
        config/
            globals.cfg
    TilesHub.exe

The globals.cfg file is thoroughly commented to guide the user through setup.

Configuration

Find the correct serial port

To enable the Tiles Hub to recognize and integrate the Tile Chain, it must know the serial port under which the USB bridge can be reached. There are two ways to determine this port:

  1. Open the Windows Device Manager and search for the corresponding entry under "Ports (COM & LPT)". It should read something like USB Serial Port (COM3)
  2. Open a command prompt or Powershell and enter the command mode. In the resulting list, find the newly added device, it has the designation COM followed by a number, e.g. COM3.

Edit the configuration file

Navigate to the file app/config/globals.cfg and open it with a text editor of your choice.

Find the line tileshub.serial.port-names= and add the serial port from above, e.g. tileshub.serial.port-names=COM3

If you want to access the Tiles Hub via Network, e.g. to use the API on another computer, find the following lines

js-server.address.host=localhost
js-server.address.port=8192

and change localhost to the IPv4 address of the host which runs the TilesHub. Changing the default port should only be necessary if it is already used by another application in your setup.

Start the Tiles Hub

Double click TilesHub.exe from an explorer window or open a command prompt, navigate to the Tiles Hub directory and enter the command TilesHub.exe.

macOS

Download

The Tiles Hub for macOS is delivered as a ZIP archive. Download your copy here:

https://www.makeproaudio.com/downloads/TilesHub-macOS-0.9.4.zip

Installation

The only installation step is to unzip and copy the release into a directory of your choice.

Package Structure

The relevant folders are mentioned below:

/
    app/
        config/
            globals.cfg
    TilesHub

The globals.cfg file is thoroughly commented to guide the user through setup.

Configuration

Find the correct serial port

To enable the Tiles Hub to recognize and integrate the Tile Chain, it must know the serial port under which the USB bridge can be reached. To determine this port, open a terminal window and enter the command ls -lrt /dev/tty*.

In the resulting list, find the newly added device, it typically has a name like /dev/tty.usbmodem14201.

Edit the configuration file

Navigate to the file app/config/globals.cfg and open it with a text editor of your choice.

Find the line tileshub.serial.port-names= and add the serial port from above, e.g. tileshub.serial.port-names=/dev/tty.usbmodem14201

If you want to access the Tiles Hub via Network, e.g. to use the API on another computer, find the following lines

js-server.address.host=localhost
js-server.address.port=8192

and change localhost to the IPv4 address of the host which runs the TilesHub. Changing the default port should only be necessary if it is already used by another application in your setup.

Start the Tiles Hub

Open a terminal window, navigate to the Tiles Hub directory and enter the command ./TilesHub.

Linux (x86/x64 and Raspberry Pi OS)

Prerequisites

You need an installed Java Runtime Environment on your system to run the Tiles Hub on Linux. We strongly recommend a Java 8 runtime environment. The Tiles Hub may run on Java version 9 or higher, but we do not (yet) support these versions.

Please note: The Tiles Hub has not yet been tested by us on Linux (x86/x64). We are looking forward to your feedback regarding your experience!

Please consult the documentation of your Linux distribution to install Java 8.

We found a good guide for installing Java on Raspberry Pi OS at phoenixNAP.

Download

The Tiles Hub for Linux is delivered as a Tarball. Download your copy here:

https://www.makeproaudio.com/downloads/TilesHub-java-0.9.4.tar

Installation

The only installation step is to extract the archive and copy the contents into a directory of your choice.

Package Structure

The relevant folders are mentioned below:

/
    config/
        globals.cfg
    TilesHub.sh

The globals.cfg file is thoroughly commented to guide the user through setup.

Configuration

Find the correct serial port

To enable the Tiles Hub to recognize and integrate the Tile Chain, it must know the serial port under which the USB bridge can be reached. To determine this port, open a terminal window and enter the command ls -lrt /dev/tty*.

In the resulting list, find the newly added device, it typically has a name like /dev/ttyACM0.

Edit the configuration file

Navigate to the file config/globals.cfg and open it with a text editor of your choice.

Find the line tileshub.serial.port-names= and add the serial port from above, e.g. tileshub.serial.port-names=/dev/ttyACM0

If you want to access the Tiles Hub via Network, e.g. to use the API on another computer, find the following lines

js-server.address.host=localhost
js-server.address.port=8192

and change localhost to the IPv4 address of the host which runs the TilesHub. Changing the default port should only be necessary if it is already used by another application in your setup.

Start the Tiles Hub

Open a terminal window, navigate to the Tiles Hub directory and enter sh TilesHub.sh.

Output

When you have successfully started the Tiles Hub with connected MPA hardware, you should get an output like the following in your terminal or command prompt (this example is from a Windows machine):

MakeProAudio - TilesHub - Version 0.9.4

21.40.157 | INFO  | c.m.n.embedded.jshack.io.Manager         | jsserver running on /127.0.0.1:8192
21.40.168 | INFO  | c.m.n.e.jshack.iomqtt.ClientPaho         | Using generated clinetId "f445e74e-2271-4ddd-a10f-2bb9d04a00b0"
21.40.517 | INFO  | c.m.n.e.jshack.iomqtt.ClientPaho         | connected to MQTT broker - tcp://test.mosquitto.org:1883 (reconnect=false)
21.52.904 | INFO  | c.m.n.e.s.system.chain.ScChainEvent      | opened tiles chain - ScChain {
    type     = ScChainEvent,
    uid      = c67d719ab783c3adb7eaa1703cff22f75cefb58b,
    boards   = [
        board-01 = ScBoard {
            network-id          = 0x01,
            board-id/ver        = UIM_4FAD-1.0.0,
            firmware-id/ver/cat = UIM_4FAD-1.6.0 (APPLICATION),
        },
        board-02 = ScBoard {
            network-id          = 0x02,
            board-id/ver        = UIM_4FAD-1.0.0,
            firmware-id/ver/cat = UIM_4FAD-1.6.0 (APPLICATION),
        },
        board-03 = ScBoard {
            network-id          = 0x03,
            board-id/ver        = UIM_8ENC_8BUT-1.0.0,
            firmware-id/ver/cat = UIM_8ENC_8BUT-1.5.0 (APPLICATION),
        },
        board-04 = ScBoard {
            network-id          = 0x04,
            board-id/ver        = UIM_8RGB_8BUT-1.0.0,
            firmware-id/ver/cat = UIM_8RGB_8BUT-1.3.0 (APPLICATION),
        },
    ],
}
21.52.911 | INFO  | c.m.n.e.s.n.r.ScRxTxSerialToBlock        | opened com-port COM3

A few notes on the above:

  • In the first line you see the version of the Tiles Hub, so you can easily refer to it in case of problems.
  • The second and third "INFO" lines you will only get if you have MQTT enabled. (And yes, we know about the typo. It will be fixed in the next release.)
  • The line that says opened tiles chain - ScChain tells you that your hardware was found by the Tiles Hub. The details below this line show you the number and type of MPA Tiles found (among others).
  • The line uid = ... tells you the ID of the Tile Chain, which you will need especially for MQTT applications.