LowPowerLab Forum

Hardware support => Moteino => Topic started by: luisgcu on February 05, 2017, 11:20:49 AM

Title: Realtime GPS tracker using Moteino(rfm95) and Node-red
Post by: luisgcu on February 05, 2017, 11:20:49 AM
Hello guys,
As usual another project that I doing for fun, using moteino LoRa to send GPS data back to home where I have  a second moteino  feeding the gps data to a raspberry pi running  Node-red where I use a node called "World-Map" to place all the  gps points on the map (in real time) each point will display the rssi and distance to home.
the idea is to easy map the range of the HopeRF LoRa modules, while I play with different spreading factors, coding rates and band width and antennas.
I am in the early beginning of the project , and also learning how to code on node-red.

if anyone is interested here is the flow that I  have created,
(//)
[{"id":"ceec71e4.c7c26","type":"serial in","z":"f9e1ca47.d6be58","name":"","serial":"4e44479b.36a868","x":101,"y":315.7395935058594,"wires":[["cb33307.f3cfdd","7262b5b4.828fec","48c8cab2.f15c04"]]},{"id":"4f2bae7.94b815","type":"debug","z":"f9e1ca47.d6be58","name":"Data_to_map","active":true,"console":"false","complete":"payload","x":1005.7529296875,"y":373.60321044921875,"wires":[]},{"id":"a5883ed7.63f24","type":"worldmap","z":"f9e1ca47.d6be58","name":"GPSTRACKER_WORLDMAP_NODE","lat":" 26.132148","lon":"-80.353006","zoom":"6","layer":"Esri","cluster":"3","maxage":"1000000","usermenu":"show","panit":"true","x":1078.857177734375,"y":454,"wires":[]},{"id":"2f307360.de001c","type":"comment","z":"f9e1ca47.d6be58","name":"  Debug","info":"","x":1001,"y":233,"wires":[]},{"id":"7401e2bf.d144bc","type":"comment","z":"f9e1ca47.d6be58","name":"Read_serial_port","info":"","x":107,"y":256,"wires":[]},{"id":"cb33307.f3cfdd","type":"csv","z":"f9e1ca47.d6be58","name":"Parse_Serial","sep":",","hdrin":"","hdrout":false,"multi":"one","ret":"\\n","temp":"lat,lon,rssi,dist","x":533,"y":457,"wires":[["6bd4a985.db7768","249cba17.774cc6"]]},{"id":"7262b5b4.828fec","type":"debug","z":"f9e1ca47.d6be58","name":"RAW_SERIAL","active":false,"console":"false","complete":"true","x":1006,"y":273,"wires":[]},{"id":"6bd4a985.db7768","type":"function","z":"f9e1ca47.d6be58","name":"ADD_data","func":"//var int ;\nlat  = msg.payload.lat;\nlon = msg.payload.lon;\nrssi = msg.payload.rssi;\ndist = msg.payload.dist;\n//color= \"aqua\";\n//iconColor =msg.payload.color;\nlayer= \"test\";\ncommand = {zoom :18};\ntime = new Date().toString();\n//var ID=ID+1;\nmsg.payload ={name:time,lat,lon,rssi,dist, layer,command,iconColor:\"BlueViolet\" };\nreturn msg;\n","outputs":1,"noerr":0,"x":761,"y":455,"wires":[["4f2bae7.94b815","a5883ed7.63f24"]]},{"id":"48c8cab2.f15c04","type":"file","z":"f9e1ca47.d6be58","name":"GPS_TRACKER_CSV","filename":"/tmp/LOG/gps.csv","appendNewline":true,"createDir":false,"overwriteFile":"false","x":1017,"y":178,"wires":[]},{"id":"4d9986a3.da1748","type":"file in","z":"f9e1ca47.d6be58","name":"READ_CSV_FILE","filename":"/tmp/LOG/gps.csv","format":"utf8","x":299,"y":457,"wires":[["cb33307.f3cfdd"]]},{"id":"a1bb5e3.417f4a","type":"inject","z":"f9e1ca47.d6be58","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":108,"y":457,"wires":[["4d9986a3.da1748"]]},{"id":"249cba17.774cc6","type":"debug","z":"f9e1ca47.d6be58","name":"Data_to_map","active":false,"console":"false","complete":"payload","x":1005,"y":324,"wires":[]},{"id":"4e44479b.36a868","type":"serial-port","z":"","serialport":"/dev/ttyAMA0","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false}]
Title: Re: Realtime GPS tracker using Moteino(rfm95) and Node-red
Post by: Felix on February 06, 2017, 08:16:26 AM
Interesting, thanks for sharing this. Would be nice to see it on a map that shows topology and buildings, that could help explain where/why packets don't reach.
And of course will be great to see the different results for different radio settings, to compare the outcomes.