Meshlium issue to run MQTT

All related to the Kernel, packages system and libraries
Post Reply
Happy_code
Posts: 17
Joined: Wed Jul 17, 2019 12:35 pm
Company: Stockholm University

Meshlium issue to run MQTT

Post by Happy_code » Wed Aug 14, 2019 3:08 pm

Hello,

we are using Smart Water extreme to connect to Meshlium. In the internal database, it collects data and create records in the format like:
"ID", "Date"; "Sync"; "ID Wasp"; "ID Secret"; "Fr. Type"; "Fr. Number"; "Sensor"; "Value"; and then save each item data in the local DB at meshlium.

I would like to use MQTT at Meshliu to Publish all those sensor data to my MQTT broker. However, I am very confused by the "message Template" and "Topic Template" in your Meshlium Cloud connector interface. The tutorial is not clear to when it comes to set up Meshlium for MQTT.

we did Topic as: "MESHLIUM/ID_WASP/SENSOR"
and message template as
{
"id": "ID",
"id_wasp": "ID Wasp",
"id_secret":"ID Secret",
"sensor": "Sensor",
"value": "Value"
"timestamp": "TS("c")"
}

This try to refer to the filed to the data records in local DB.

However, after we subscribe a message in topic "MESHLIUM/ID_WASP/SENSOR" ; we simply received a message like:

{
"id": "ID",
"id_wasp": "ID Wasp",
"id_secret":"ID Secret",
"sensor": "Sensor",
"value": "Value"
"timestamp": "TS("c")"
}

Could you please provide clear information, regarding how can Meshlium read data from the local DB and send by MQTT? In this case what should we put in the "message template"? Do we need to do something to let your Meshlium MQTT client read data from the local DB (I think it should be done by Libelium as your instruction described)?

Thank you!

Happy_code
Posts: 17
Joined: Wed Jul 17, 2019 12:35 pm
Company: Stockholm University

Re: Meshlium issue to run MQTT

Post by Happy_code » Wed Aug 14, 2019 4:33 pm

Plus: how to add GPS in the "message template" to send to MQTT broker? The GPS data and the parsed sensor data are not in the same table.

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Meshlium issue to run MQTT

Post by libelium-dev » Mon Aug 19, 2019 8:56 am

Hi,

The words of the template between # should be substituted by the name of the value in the Meshlium local DB.

The GPS information of the Meshlium is not able to be sent through MQTT, just the GPS data if you have the module in a node and it's sent to the Meshlium.

Regards.

Happy_code
Posts: 17
Joined: Wed Jul 17, 2019 12:35 pm
Company: Stockholm University

Re: Meshlium issue to run MQTT

Post by Happy_code » Mon Aug 19, 2019 11:07 am

Thank you for the reply.

Now I am just wondering. when I send GPS data to the Meshlium. How can I added data to Meshlium MQTT message template?
is it:
"gps":"#GPS#"

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Meshlium issue to run MQTT

Post by libelium-dev » Tue Aug 20, 2019 7:48 am

In GPS case that sentence is ok, the sensor ID for the GPS in the DB is "GPS"

Regards

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest