Details
-
Type:
Monitor
-
Status: Closed
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: FIWARE-TECH-HELP
-
Labels:
Description
Created question in FIWARE Q/A platform on 12-07-2021 at 17:07
Please, ANSWER this question AT https://stackoverflow.com/questions/68351709/fiware-iot-agent-data-for-orion
Question:
FIWARE - IoT Agent - Data for Orion
Description:
I have installed FIWARE on my machine (Ubuntu 18.04) and I am currently trying to work with the IoT Agent, using the HTTPBindings.js (my data is sent via LoRaWAN and I've changed the parseData function in order to use my own data "protocol" [id=1&temp=12&humidity=10], which brings me here to ask 2 questions for someone who is more experienced and can help me with:
function parseData(req, res, next) {
let data;
let error;
let payload;
let obj;
try {
let newPayload = new Buffer.from(payload, "base64").toString("ascii");
var ps = newPayload.split("&").reduce((accum, x) => {
const kv = x.split("=");
return { ...accum, ...
};
}, {});
data = ulParser.parse(newPayload.replace(/&/g, "|").replace(/=/g, "|"));
} catch (e)
{ error = e; }if (error)
{ next(error); }else
{ req.ulPayload = data; config.getLogger().debug(context, 'Parsed data: [%j]', data); next(); }}
After changing this function, I can't get the data to be updated in the orion/v2/entities.. Would someone explain me how does this work?
How can I add a proxy to usenter code heree in the Wirecloud? I've created it using the FIWARE servers, but testing on my own, I do not have this.
Thank you in advance.
2021-07-13 05:31|CREATED monitor | # answers= 0, accepted answer= False