Payload Rejection

Hi,
While sending data through MQTT client running on local machine, the payload is showing it as One or more of your payload properties was rejected.A provided attribute is not defined on the device, or the data type is incorrect.
The json format is valid, still getting the issue.
Kindly suggest.

Thanks!

I don’t see anything wrong in your screenshot; the attribute name in your device config appears to match the name in your state report. My best guess is that the length of the string you’re reporting is too long. The maximum length is 65,535 characters for a string attribute. Are you bumping up against that limit with that state report?

My second guess is that the state report is actually succeeding but the error message is incorrectly getting displayed. After reporting state and seeing the error message, can you then visit the “Debug” tab and see if the state report was recorded in the “Recent Device States” panel?

If neither of those are the issue, can you please copy the content of the device log output for the invalid state report and paste it here so we can take a closer look? (Make sure there isn’t any sensitive information in the string before doing so.)

Thanks.

Thanks Dylan, the string length was the issue I guess.

I am stuck with the payload coming from "Data:Gauge Query’ block.
Its showing data in the form of “[Object Object]” , whereas I am getting the whole data in “Debug” tab ,“Recent Device States” panel .

Kindly help out in parsing the payload.

Thanks.

The result from the Data: Gauge Query Node is going to be in the form of an object; I’m guessing you’re trying to reference the value of the object using a string template, which is attempting to cast that value to a string and the result is “[object Object]”.

If you want to use the stringified version of the object in your workflow, use the {{jsonEncode val}} format helper.