Cloud Setup

Cloud Setup

The software's cloud segment consists of two primary components:

  • Traccar GPS Server
  • EMQX MQTT Broker

The embedded software establishes communication via MQTT-SN with the MQTT-SN Gateway within EMQX MQTT broker. Each time a device transmits a message to the MQTT-SN gateway (over MQTT-SN protocol), a predefined rule is activated. This rule extracts pertinent device information like location coordinates, battery percentage, GPS accuracy etc and subsequently relays the message to the Traccar REST server utilizing the HTTP protocol.




LightImage

The following instructions are to help you setup the FindMyCat cloud software using docker entirely. Most of the setup has been automated and just involves running a couple start scripts. The only manual step is the Rule Engine configuration.

Pre-requisites:

Regardless of what operating system you choose to host on, make sure the following are installed on it.

Clone Cloud repository

Clone the FindMyCat Cloud repository. Github: https://github.com/FindMyCat/cloud (opens in a new tab)

git clone https://github.com/FindMyCat/cloud.git

Start Traccar Server

The docker-compose.traccar.yml file holds the configuration needed to initiate the Traccar server with a suitable traccar.xml, and it ensures the correct ports are open.

docker-compose -f docker-compose.traccar.yml up -d

A successful run would output something like this:

[+] Running 1/1
 Container traccar  Started

Start EMQX Broker

The docker-compose.emqx.yml file configures the EMQX Broker and enables the appropriate plugins for the Rule Engine and MQTT-SN gateway.

Start the EMQX Broker with:

docker-compose -f docker-compose.emqx.yml up -d

Observe a similar output for a successful run as the Traccar setup step.

Configure EMQX Rule Engine

Most of the setup for EMQX is already done in the previous step, the only thing to configure is the Rule Engine. The Rule engine is responsible for forwarding the incoming MQTT messages from the tracker device / homestation and relay them to Traccar server.

Follow these steps here to configure the EMQX Rule Engine. You can skip the "Enable MQTT-SN Gateway" step as it was already taken care by the docker file.