Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE REQUEST: Location Tracking (automatic) #243

Open
jtfeatures opened this issue May 21, 2024 · 2 comments
Open

FEATURE REQUEST: Location Tracking (automatic) #243

jtfeatures opened this issue May 21, 2024 · 2 comments

Comments

@jtfeatures
Copy link

I have enabled GeoLocation and now need a way for the devices to report their location back when checking into MC. I have read everything I can and I see that this was never implemented (in an automated way). This is a huge deal for me and I want to help but I am still in the VERY early stages of learning programming and this beautiful program is far above me. But, I wrote a PowerShell program that reports the devices location every 3 seconds and I would live to add that to the meshcentral installer so that the device (at least windows for now) will report its location or at least a close location with IP decoding if the GPS is not implemented. How can I/We help get this option implemented?

@si458
Copy link
Collaborator

si458 commented May 21, 2024

this is already partly possible with the web ui but its console based
you go into the console tab of a device and run location and it will return a JSON array from ipinfo.io of data
ALSO
you can enable geoLocation in your config.json like below, and it might be helpful too

{
  "domains": {
    "": {
      "geoLocation": true,
      "iplocation": true
    }
  }
}

DONT USE GEOLOCATION AS IT DOESNT WORK!

@si458
Copy link
Collaborator

si458 commented May 21, 2024

ive fixed the geoLocation and ipLocation in the latest docker master image.
can you share ur powershell script?
the is already code built into the web ui for gpsLoc i just dont have a device with a physical GPS attached to it

var markers = [], types = ['iploc', 'wifiloc', 'gpsloc', 'userloc'], boundingBox = null;

if (node.iploc) { loc = node.iploc; t = 1; }
if (node.wifiloc) { loc = node.wifiloc; t = 2; }
if (node.gpsloc) { loc = node.gpsloc; t = 3; }
if (node.userloc) { loc = node.userloc; t = 4; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants