Stand with Ukraine flag
Try it now Pricing
Cloud
Europe
How to connect ACE MQTT 4G GPS Gateway to ThingsBoard?
Getting Started Documentation Devices Library Guides API FAQ
On this page

How to connect ACE MQTT 4G GPS Gateway to ThingsBoard?

Introduction

ACE MQTT 4G GPS Gateway The ACE Automation MQTT 4G GPS Gateway is a cutting-edge device that revolutionizes data communication and connectivity for industrial and IoT applications. Equipped with 4G capabilities, this gateway ensures reliable and high-speed data transmission over cellular networks, even in remote locations. It integrates GPS technology for real-time location tracking, ideal for asset and vehicle management. With MQTT as the communication protocol, data exchange becomes lightweight and efficient, enabling seamless integration into existing IoT ecosystems. Its robust industrial design guarantees reliable operation in harsh environments, making it a valuable solution for optimizing operations and harnessing real-time data. Simplify your connectivity and data management with the ACE Automation MQTT 4G GPS Gateway.

Prerequisites

To continue with this guide, we will need the following:

Import Rule chain

Download ACE Rule Chain and import.

To import rule chain from а JSON file, you should:

  • Navigate to the “Rule chains” page and click on the “+” button in the upper right corner of the screen and then choose “Import rule chain” option. The toolbar import popup window will appear. Upload a JSON file and click on the “Import” button;

  • The imported rule chain will open. Click on the “Apply changes” button to save the rule chain. Then, go back to the main “Rule chains” page;

  • Rule chain is imported.

Create device profile

Now, we are ready to create device profile. For this, follow steps below:

  • Go to Profiles > Device profiles and click on “Add” button > “Create new device profile”;

  • Input Name field with “ACE routers” value, and select “ACE routers” imported rule chain from the step above;

  • Click on “Transport configuration” tab, select MQTT transport type and change Telemetry topic filter value from “v1/devices/me/telemetry” to “siemens/+”, click on “Add” button;

  • Device Profile created.

Create device

For simplicity, we will provide the device manually using the UI:

  • Open the Devices page. By default, you navigate to the device group “All”. Click on the “+” icon in the top right corner of the table and then select “Add new device”;

  • Input device name. For example, “ACE Gateway”. Select created device profile from the step above, in our case, “ACE routers”;

  • Click on “Credentials” tab. Check “Add credentials” and select “MQTT Basic” credentials type. Click on “Generate” button on each field. Click “Add” button;

  • Device added.

Gateway connection

According to the official user manual and this guide, you can connect the gateway to the network and get access to the WebUI in two ways:

  1. Go to Network > Wireless, click on “Scan” button;
  2. Select a network you want to join;
  3. Enter the passphrase/password if exists;
  4. Let the name of the new network (wwan);
  5. Click on “Save & Apply” button on the “Device Configuration” page;
  6. Click on “Save & Apply” button on the “Interface Configuration” page;
  7. Check your new IP address on WWAN:
    • In Network > Interfaces check the new IP address on WWAN interface.
  8. To check your connection to Internet:
    • Go to Network > Diagnostics and ping the “openwrt.org” server on the Internet. As above (Via its WAN RJ45 port connected to your network).
  9. With your browser, go to the ACE-GTW-MQTT web interface by entering its IP address: 192.168.8.1;
  10. Enter the username(Default: root) and password(Default: root), and click Login.

Your PC must be on the same network as the Gateway: 192.168.8.XXX. If that’s not the case, change the IP address of your PC.

doc warn icon

WARNING: Don’t use an IP address already taken by a device on your network!

For Windows:

  1. Go to “Control Panel” > “Network and Internet” > “Network and Sharing Center”, then click “Ethernet” (May have different names);
  2. Go to “Properties” > “Internet Protocol Version 4(TCP/IPv4)” and select “Use the following IP address”, then assign a static IP manually within the same subnet of the gateway;
  3. Go to the ACE-GTW-MQTT web interface with your browser by entering its IP address: 192.168.8.1.
  4. Enter the username and password.



For macOS:

  1. Go to “System Settings“ > “Network“, then click “USB 10/100/1000 LAN” (May have different names);
  2. Go to “Details…” > “TCP/IP“ and select “Manually”, then assign a static IP manually within the same subnet of the gateway;
  3. Go to the ACE-GTW-MQTT web interface with your browser by entering its IP address: 192.168.8.1.
  4. Enter the username and password.



For Ubuntu Linux:

  1. Go to “Settings“ > “Network“, then click “Wired Settings” (May have different names);
  2. Go to “IPv4” and select “Manually”, then assign a static IP manually within the same subnet of the gateway;
  3. Go to the ACE-GTW-MQTT web interface with your browser by entering its IP address: 192.168.8.1.
  4. Enter the username and password.



Now, you can configure the gateway.

Once you are connected to the ACE-GTW-MQTT, you can change its IP address if you wish:

  • Network > Interfaces;
  • Click on “Edit” the LAN interface;
  • Enter a new IP address that is not already being used by another device on your network.
doc warn icon

WARNING: Don't forget to change default password.

Now we are ready to configure the MQTT connection, topics for data transmission, and establishing the Modbus connection.

Let’s first configure Modbus Connection. As mention above, we use Siemens LOGO! with AM2 RTD module (used for connecting PT100) - which is the perfect choice for the fast, uncomplicated, and space-saving solution of simple control and regulation tasks. LOGO! has long since established itself as an intelligent logic module in small automation projects.

Follow the next steps:

  • Go to Gateway > MQTT Configuration > ETHERNET STATIONS LIST (under MQTT Broker section);
  • Fill in all required fields with correct information about your device;
  • Click on “Save & Apply” button.

In our case, we have the following settings:

For configuring MQTT connection, follow the next steps:

  • Go to Gateway > MQTT Configuration > MQTT Broker (tab);
  • Fill in all required fields with correct credentials and other information for broker access;
  • Click on “Save & Apply” button.

The next thing we have to do is configure MQTT topics for receiving and sending data:

  • Go to Gateway > MQTT Configuration > MQTT Broker (tab);
  • Scroll down to “MQTT TOPICS LIST : Publishing and Subscribing to MQTT Topics” section;
  • Add all topics for publishing data;
  • Add all subscription topics for receiving data;
  • Click on “Save & Apply” button.

In case Siemens LOGO!, we have the following topics list:

If you are using Siemens LOGO! too, you can use the following configuration:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
config mqttconfig
	option baudrate '9600'
	option parity 'None'
	option databits '8'
	option stopbits '1'
	option timeout '3'
	option interframe '1'
	option projectname 'ACE'
	option usbport '/dev/ttyACM0'
	option gnssusbport '/dev/ttyUSB1'
	option port_p '1883'
	option optioncertif '0'
	option advancedmqtt '0'
	option loginpassword '1'
	option optiondebugmqtt '0'
	option qos_q '1'
	option host_h 'eu.thingsboard.cloud'
	option username_u 'YOUR_USERNAME'
	option password_P 'YOUR_PASSWORD'
	option clientid 'YOUR_CLIENTID'

config stations
	option station_nb '2'
	option station_ip_address '192.168.0.3'
	option station_ip_port '510'

config topics
	option sub '0'
	option slaveid '1'
	option active '1'
	option station_mbid '2'
	option poll '10'
	option deadband '-1'
	option regtype 'bit'
	option address '8193'
	option payload '@'
	option topic_t 'siemens/Q1'
	option payload_bit '{"Q1": @[OFF;ON]}'

config topics
	option payload '@'
	option sub '0'
	option slaveid '1'
	option active '1'
	option topic_t 'siemens/Q2'
	option payload_bit '{"Q2": @[OFF;ON]}'
	option station_mbid '2'
	option regtype 'bit'
	option address '8194'
	option poll '10'
	option deadband '-1'

config topics
	option payload '@'
	option sub '0'
	option slaveid '1'
	option active '1'
	option topic_t 'siemens/Q3'
	option payload_bit '{"Q3": @[OFF;ON]}'
	option station_mbid '2'
	option regtype 'bit'
	option address '8195'
	option poll '10'
	option deadband '-1'

config topics
	option payload '@'
	option sub '0'
	option slaveid '1'
	option active '1'
	option topic_t 'siemens/Q4'
	option payload_bit '{"Q4": @[OFF;ON]}'
	option station_mbid '2'
	option regtype 'bit'
	option address '8196'
	option poll '10'
	option deadband '-1'

Check data on ThingsBoard

Once you have successfully done all the steps above and ACE MQTT 4G GPS Gateway sent data, you can see it in the Device Telemetry Tab:

  • Click on the device row in the table to open device details;

  • Navigate to the telemetry tab.

Let’s display ACE MQTT 4G GPS Gateway attributes and telemetry on a dashboard. For this, you can create your own dashboard with your custom widgets or use a ready-made dashboard and simply import it.

Import dashboard

You are able to import a dashboard in JSON format. To import a dashboard, you should go to the Dashboard group and click on the “+” button in the upper right corner of the page and choose “Import dashboard”. The dashboard import window should pop up, and you will be prompted to upload the JSON file and click “Import”.

Below, you can find the dashboard JSON file:

Check and control device data dashboard

After importing, we should choose an entity alias for our device.
To do this - we need to press the pen icon and select entity aliases, select alias “My device” and open it for editing by pressing the pen icon.
Then, choose a device with name My device from dropdown list and save entity alias. Now, you should be able to see the data from the device.

If you did everything right, you have to see the following dashboard:

imagePe

Create new dashboard

We will create a dashboard and add the most popular widgets. See the instructions below.

  • Open the Dashboards page. Click on the “+” icon in the top right corner. Select “Create new dashboard”;

  • Input dashboard name. For example, “My New Dashboard”. Click “Add” to add the dashboard;

  • Your dashboard should be listed first since the table sorts dashboards using the creation time by default. Click on the “Open dashboard” icon.

Add Entity Alias

Alias is a reference to a single entity or group of entities that are used in the widgets. An alias may be static or dynamic. We will use the “Single entity” alias, referring to a single entity. In this case, “ACE MQTT 4G GPS Gateway”. It is possible to configure an alias that references multiple devices. For example, devices of a certain type or related to a certain asset. You may learn more about different aliases here.

  • Enter edit mode. Click on the pencil button in the bottom right corner;

  • Click the “Entity Aliases” icon in the top right part of the screen. You will see an empty list of Entity aliases;

  • Click “Add alias”;

  • Enter an alias name. Choose “Single entity” as the Filter type, select “Device” for Type, and begin typing “My New” to trigger autocomplete suggestions;

  • Click “Add” and then “Save”;

  • Finally, click “Apply changes” in the dashboard editor to save the changes. Then you should enter edit mode again.

To add the new widget, we need to select it from the widget library. The widgets are grouped into widget bundles. Each widget has a data source. It is how the widget “knows” what data to display.

Conclusion

With the knowledge in this guide, you can easily connect your ACE Automation MQTT 4G GPS Gateway and use the built-in integration to retrieve data from devices connected to ACE Automation MQTT 4G GPS Gateway.

After connecting the devices to the gateway, you will be able to see and process the data coming from the devices on the ThingsBoard.

Explore the platform documentation to learn more about key concepts and features.