Support Forums
Trouble with MQTT Decoding

I'm having trouble getting a value from a Microhard Bullet into VTSCADA from my mosquitto broker, I am trying to get the value of temperature,

{
  "file_format_version" : "3.1",
  "main" : [ {
    "temperature" : "43.27",
    "voltage" : "12.48",
    "uptime" : "1120074",
    "devicetime" : "2022-03-16 14:38:10 MDT"
  } ],

I am using the default decoder and the address I'm trying is

Microhard++main.0.temperature

Any advice to get me going in the right direction would be appreciated

I'm having trouble getting a value from a Microhard Bullet into VTSCADA from my mosquitto broker, I am trying to get the value of temperature, ```` { "file_format_version" : "3.1", "main" : [ { "temperature" : "43.27", "voltage" : "12.48", "uptime" : "1120074", "devicetime" : "2022-03-16 14:38:10 MDT" } ], ```` I am using the default decoder and the address I'm trying is > Microhard++main.0.temperature Any advice to get me going in the right direction would be appreciated

Have you tested:

Microhard++main[0].temperature
----
Microhard/++main[0].temperature

I just created a dummy broker and tested it successfully using

rdstopic/++main[0].temperature

As a note, I did need to update the JSON format from your post to the following:

{
    "file_format_version": "3.1",
    "main": [{
        "temperature": "43.27",
        "voltage": "12.48",
        "uptime": "1120074",
        "devicetime": "2022-03-16 14:38:10 MDT"
    }]
}
Have you tested: ```` Microhard++main[0].temperature ---- Microhard/++main[0].temperature ```` I just created a dummy broker and tested it successfully using rdstopic/++main[0].temperature As a note, I did need to update the JSON format from your post to the following: ```` { "file_format_version": "3.1", "main": [{ "temperature": "43.27", "voltage": "12.48", "uptime": "1120074", "devicetime": "2022-03-16 14:38:10 MDT" }] } ````

Trihedral Engineering Ltd.

edited Mar 17 '22 at 12:47 am

Dave,

That worked for me. I used;

Microhard++main[0].temperature

Thank you for your help

Dave, That worked for me. I used; ```` Microhard++main[0].temperature ```` Thank you for your help
63
2
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft