How to update device GPS state via MQTT?

Hi

I created a property type GPS String named GPS

then I send a payload to topic deviceId/state via MQTT

that looks like this

{“data”:{“GPS”:"$GNGGA,203315.00,3243.91473,N,03510.22142,E,1,12,0.84,172.0,M,18.6,M,*4E\r\n"}}

and I get a this error, A provided attribute is not defined on the device, or the data type is incorrect.

image

when I send the payload to a string type property it works.

What am I missing here?

Based on the screenshot, it looks like you’re attempting to send data to the attributed named GNGGA instead of the attributed named GPS. I’d recommend double checking the MQTT client code to ensure the attribute name is correctly set.

Hi Brandon

Posted this late last night without the most updated screenshot.

I do have a variable called GPS STRING type variable: GNGGA

and I am getting the error still,

image

and this is the object i am sending via mqtt:

{“data”:{“GNGGA”:"$GNGGA,020108.00,3243.91172,N,03510.21778,E,1,10,1.11,172.2,M,18.6,M,*46\r\n"}}

any idea?

We currently support GPS strings in $GPGLL and $GPGGA formats. We don’t support the $GNGGA format. You’ll have to convert your GPS data one of those formats.