TagoIO MQTT Relay: Bridging your MQTT Broker to new possibilities!

Hi everyone!

We are thrilled to announce the launch of our newest feature, the TagoIO MQTT Relay, which is available right now. This open-source and highly scalable software will enable you to seamlessly connect your preferred MQTT Broker (e.g., HIVEMQ, EMQX, etc.) to the TagoIO platform.

What is TagoIO MQTT Relay?

The TagoIO MQTT Relay acts as a bridge between your MQTT Broker and the TagoIO platform, facilitating smooth integration and data flow. By subscribing to predefined topics on your MQTT Broker, the MQTT Relay ensures that incoming data is redirected to your TagoIO Devices.

What are the main benefits?

  1. Standard MQTT Connection: Enjoy the full functionalities of a standard MQTT connection.

  2. Scalability: Benefit from a highly scalable solution that grows with your needs.

  3. Broader Range of Solutions: Unlock new possibilities with the open-source nature of the MQTT Relay.

Implementation Guide

To get started with the TagoIO MQTT Relay, check out our comprehensive guide here: Connecting your MQTT Broker to TagoIO.

Hi,

after I followed the instructions from GitHub - tago-io/mqtt-relay: TagoIO | MQTT Relay, the connection is established, but I have this ERROR:

[2024-07-07T07:24:55Z INFO info] Config file loaded successfully

[2024-07-07T07:24:55Z INFO network] Verifying network token for relay: self-hosted

[2024-07-07T07:24:56Z INFO info] Starting Publish API on: [::]:3001

[2024-07-07T07:24:56Z INFO mqtt] Running relay task for client ID: self-hosted

[2024-07-07T07:24:56Z INFO tagoio_relay::services::mqttrelay] Connection to MQTT broker was successful

[2024-07-07T07:24:56Z INFO mqtt] Connected to MQTT broker successfully

[2024-07-07T07:24:59Z INFO mqtt] [Broker] Received message on topic stat/tasmota_D9BB9E/RESULT

[2024-07-07T07:25:00Z ERROR error] Failed to forward buffered messages to TagoIO: CustomError { status: 400, body: “{\“status\”:false,\“message\”:\“Serial can’t be found\”}”, message: “Request failed with status: 400 Bad Request” }

[2024-07-07T07:25:00Z ERROR mqtt] Failed to forward message to TagoIO: “Status: 400 Bad Request, Body: {\“status\”:false,\“message\”:\“Serial can’t be found\”}, Message: Request failed with status: 400 Bad Request”

[2024-07-07T07:25:00Z INFO mqtt] [Broker] Received message on topic stat/tasmota_D9BB9E/POWER

[2024-07-07T07:25:00Z ERROR error] Failed to forward buffered messages to TagoIO: CustomError { status: 400, body: “{\“status\”:false,\“message\”:\“Serial can’t be found\”}”, message: “Request failed with status: 400 Bad Request” }

[2024-07-07T07:25:00Z ERROR mqtt] Failed to forward message to TagoIO: “Status: 400 Bad Request, Body: {\“status\”:false,\“message\”:\“Serial can’t be found\”}, Message: Request failed with status: 400 Bad Request”

Hello markosplit,

To address your issue, you need to include the Serial number that was entered during the device creation process in the topic when performing the uplink. For instance, the topic should look like this: stat/serial.

For more detailed instructions, I recommend watching this video: Watch Here.

Hello, thank you for the answer and especially for the instructions in the video demonstration!

Very nice and detailed explanation, please put a link to the video in the documentation!

I managed to get the thing going :wink: , and I have a question about the “Subscribe topic” item (.tagoio-mqtt-relay.toml file).

The device sends the following message(s) on each state change (Tasmota flashed device):

topic: stat/123123123/RESULT

payload: {“POWER”:“ON”}

and

topic: stat/123123123/POWER

payload: ON

If I set the topic to: “stat/123123123/#”, the console returns:

[2024-07-11T08:37:49Z INFO mqtt] [Broker] Received message on topic stat/123123123/RESULT

[2024-07-11T08:37:50Z ERROR error] Failed to forward buffered messages to TagoIO: CustomError { status: 400, body: “{\“status\”:false,\“message\”:\“Serial can’ t be found\”}”, message: “Request failed with status: 400 Bad Request” }

[2024-07-11T08:37:50Z ERROR mqtt] Failed to forward message to TagoIO: “Status: 400 Bad Request, Body: {\“status\”:false,\“message\”:\“Serial can’t be found\”}, Message: Request failed with status: 400 Bad Request”

[2024-07-11T08:37:50Z INFO mqtt] [Broker] Received message on topic stat/123123123/POWER

[2024-07-11T08:37:50Z ERROR error] Failed to forward buffered messages to TagoIO: CustomError { status: 400, body: “{\“status\”:false,\“message\”:\“Serial can’ t be found\”}”, message: “Request failed with status: 400 Bad Request” }

[2024-07-11T08:37:50Z ERROR mqtt] Failed to forward message to TagoIO: “Status: 400 Bad Request, Body: {\“status\”:false,\“message\”:\“Serial can’t be found\”}, Message: Request failed with status: 400 Bad Request”

and if I set the topic to: “stat/123123123/RESULT/#” it returns the following message/error:

[2024-07-11T08:40:33Z INFO mqtt] [Broker] Received message on topic stat/123123123/RESULT

[2024-07-11T08:40:33Z ERROR error] Failed to forward buffered messages to TagoIO: CustomError { status: 400, body: “{\“status\”:false,\“message\”:\“Serial can’t be found\”}”, message: “Request failed with status: 400 Bad Request” }

[2024-07-11T08:40:33Z ERROR mqtt] Failed to forward message to TagoIO: “Status: 400 Bad Request, Body: {\“status\”:false,\“message\”:\“Serial can’t be found\”}, Message: Request failed with status: 400 Bad Request”

The question is how to set/use topic(s) after the serial number?

Also another question, is it “normal” that the “Live inspector” does not show activity but data comes to the Bucket?

Thank you for your reply!

Greeting

Marko