I’ve been trying for hours now to get the GPS coordinates from Mosquitto into HA.
It’s broadcasted, and I can see the following in the MQTT explorer:
{
"Base": {
"time": 1764073526,
"local_time": "25/11/2025 13:25:26",
"time_iso_8601": "2025-11-25T13:25:26+0100",
"fw": "RUTX_R_00.07.18.3\n",
"name": "AllInOne",
"id": "28"
},
"GPS": {
"latitude": xxx,
"longitude": xxx,
"altitude": xxx,
"angle": 0,
"speed": 0,
"accuracy": 0.7,
"satellites": 10,
"fix_status": 0,
"timestamp": 1764077126,
"date": "25/11/2025 14:25:26",
"date_iso_8601": "2025-11-25T14:25:36+0100"
...
I try to get the latitude value with value_template: '{{ value_json.latitude }}'
but the sensor is shown as “unknown”. It doesn’t cause any error messages.
From the same MQTT broker, I successfully receive the data of opendtu to HA, which has HA_autodiscovery enabled. This is not available with the device I want to add now. It’s a Teltonika RUTX09.
As said, I receive messages with MQTT Explorer on a PC in the same network as my HAOS server.
Can anyone help me with the syntax to extract the JSON value correctly?