FUXA
FUXA copied to clipboard
How to change the json body of MQTT publish
Hi! It is possible to change the json body of the MQTT publish as follows:
{ "data": { "temperature": 72 }, "time": { "$date": "2016-11-04T19:42:06.710Z" } }
Hi, make sense but we need a configurable payload.
Hi, Do you have an example of how to change the mqtt publish payload?
Hi, I'm not sure but you can add this code on line 551 of FUXA\fuxa\server\runtime\devices\mqtt\index.js
topicTopuplish = { data: { temperature: topicTopuplish['value'] }, time: { '$date': topicTopuplish['timestamp'] } }