This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Parsing sensor data to a JSON file through MQTT Broker

Hi Dev team,

I am working on a nrf9160DK and transmitting my sensor data to a MQTT Client. I tested this through an application : MQTT.fx (Using mqtt.eclipse.org as open source broker) and I was able to get my data published.

Now, I need to parse my sensor data to a JSON file using the same broker : mqtt.eclipse.org on topic : my/publish/topic.

I have attached the JSON file where my data needs to be passed.

8867.config.rar

I would like to know the steps that would be required to parse data from my code to a JSON file.

I used the mqtt_simple client example in NCS v1.3.0 to publish the data outside. Can it be modified to parse the data to a JSON file.

Regards,

Adeel.