No output in the worldmap

I suggested using a change node - but as you already have a function node then in there may well be easiest. I would move hardware_serial to name and latitude to lat etc.

Im sure i didnt got you explanation right, what node should i edit? I dont see any hardware_serial and so on..

That came from your original message.... so I assumed you had that in your function node...

image

Thanks for the reply, i have a small succesful update that the map is working, i used your suggestion and used instead a change node with an inject button on the back and then to the map. Used the following object as a JSON in change {"name":"Joe", "lat":41.1613, "lon":24.1386} and i get my point on the map manually. Question is how i will feed the same off the ttn_uplink using a path copy of my lon and lat in the same brackets and the type of the syntax. Just for reference
payload_fields: object
altitude: "159.9m"
barometer: "989.7hPa"
battery: "3.79V"
gasResistance: "11.83KΩ"
humidity: "57%RH"
latitude: "41.1612°"
longitude: "24.1387°"
temperature: "22.3°C"
and if i copythe path i get this "payload_fields.latitude"
tried different syntax respect to
{ "name":"Jason", "lat":51.05, "lon":-1.35 } but nothing

So you have msg.payload object like

{  
   altitude: "159.9m"
   barometer: "989.7hPa"
   battery: "3.79V"
   gasResistance: "11.83KΩ"
   humidity: "57%RH"
   latitude: "41.1612°"
   longitude: "24.1387°"
   temperature: "22.3°C"
}

so you need to ffed this to a change node that is set to
move [msg.]payload.latitude to [msg.]payload.lat
move [msg.]payload.longitude to [msg.]payload.lon
set [msg.]payload.name to [string]Some_name_of_your-Choice

then feed it into the worldmap


did something like that, but im sure i didnt understood it

Look at what I typed. Move not set

Thanks for the clarification, im not very proficient in this.
How will it parse the actual data im curious with that.

As there is nothing in the recent object that you shared that could be a name just SET msg.payload.name to a string of some words of your choice

Here is a simple example flow to show you - based on your payload above.

[{"id":"434f2d44.298a94","type":"inject","z":"8df32294.80f4f","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":260,"wires":[["fe0977bb.728668"]]},{"id":"fe0977bb.728668","type":"function","z":"8df32294.80f4f","name":"create dummy input","func":"msg.payload = {  \n   altitude: \"159.9m\",\n   barometer: \"989.7hPa\",\n   battery: \"3.79V\",\n   gasResistance: \"11.83KΩ\",\n   humidity: \"57%RH\",\n   latitude: \"41.1612\",\n   longitude: \"24.1387\",\n   temperature: \"22.3°C\",\n}\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":260,"wires":[["42512ca5.9631c4"]]},{"id":"42512ca5.9631c4","type":"change","z":"8df32294.80f4f","name":"","rules":[{"t":"set","p":"payload.name","pt":"msg","to":"My_Super_Device","tot":"str"},{"t":"move","p":"payload.latitude","pt":"msg","to":"payload.lat","tot":"msg"},{"t":"move","p":"payload.longitude","pt":"msg","to":"payload.lon","tot":"msg"},{"t":"set","p":"payload.altitude","pt":"msg","to":"payload.alt","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":320,"wires":[["43e3cbe8.307ee4","688913c4.7d992c"]]},{"id":"43e3cbe8.307ee4","type":"worldmap","z":"8df32294.80f4f","name":"","lat":"","lon":"","zoom":"13","layer":"","cluster":"","maxage":"","usermenu":"show","layers":"show","panit":"true","panlock":"false","zoomlock":"false","hiderightclick":"false","coords":"none","showgrid":"false","path":"/worldmap","x":560,"y":320,"wires":[]},{"id":"688913c4.7d992c","type":"debug","z":"8df32294.80f4f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":570,"y":380,"wires":[]}]

I loaded it, it works with a click, now i have either find a way to write some code in the function node to parse the data from ttn_uplink or some solution with the change node ( i think it need some kind of conversion of the path were the data is to a JSON accepted format)

Yes - if you actually show us what comes out of a debug node attached to your TTN feed we may be able to help - Or we could try mind reading.

1 Like

If i time stamp i get the following on debug window and worldmap respectively



If i connect the ttn_uplink i get the same debug info from the dummy input as it triggers it and also i direct connected the uplink with debug for the live data. Map still gets the canned data from the dummy output.

i also tried to change the coding from TTN to Cayene LPP and added to the change node as JSON {"name":"Joe", "lat":payload.gps_1.latitude, "lon":payload.gps_1.longitude} but its not valid hence no data to the map

@dceejay dceejay, i finally made it work. i get my location on the map. i used the function node and edited a script i found online. it still gives invalid JSON property but it works.
var msg1 = {
"payload" : JSON.parse(JSON.stringify(data))
};
return msg1;

In your picture above you linked the TTN node to the dummy data node... it should go direct to the change node as it already has the data...

@dceejay Yes that purpose was only for you see the payload example in the debug window, thanks though!
It worked as i altered the decode function in TTN and edited the fuction script within the function.