Asset Tracker GPS real-time google map


#61

#62

Thanks very much


#63

Yello! I’ve tried to get this to run last night for hours…
I manged the HTML / API part of it but flashing my electron fails.

I had a look at the files but can’t wrap my head around the .cpp and .h files, I only ever used the Arduini IDE or the particle.io web IDE. Neither of them seem to like the .cpp or .h files in the git repo.

Is my IDE setup wrong, what setup do I need?
Do I simply need a different file extension (tried that, failed)?

Any other pointers on how to get the right code on the electron to start tracking is much appreciated…!

Thanks in advance!


#64

If you are using Paritcle Build (Web IDE) then you’d just need to go to the libraries drawer (bookmark symbol on the left), click on ASSETTRACKER, there click 1_GPS_FEATURES.CPP and press USE THIS EXAMPLE.
Then you just need to make sure you’ve got the correct device selected and also the correct target firmware version and hit build

These might help too
https://docs.particle.io/guide/getting-started/build/photon/#using-libraries
https://docs.particle.io/guide/getting-started/build/photon/#wait-what-is-firmware-


BTW, if you are refereing to a particlular repo/sample/… it’s always good to repeat the link in your own post to avoid confusion of which repo/sample/… you are refering to and saves peoplo who intend to help from having to search for it and/or guess (possibly wrong) the respective source.


#65

This is so badass. Thanks! Exactly what I needed as the other half of a working tracker.


#67

Thanks for this great project and the code.

Mine currently isn’t connecting. Im getting the GPS error still on the web UI. Is there anything else you need to do once you tell the browser your device and insert the API key? I feel like im missing something, but not sure. Will try connecting again tomorrow.

Nic


#68

What exact error on which Web UI?


#69

Thanks for the response. on the html mapview provided by Hypno I’m getting “Waiting for GPS events…” on the bottom. Loaded his html code from github onto my server. (and used my own api key). but I still get “Waiting for GPS events…” on both mine and his.

Thanks!


#70

Do you see the coordinates published by your AssetTracker on https://console.particle.io/logs ?
And if you are using the .js file from this post how do you tell the server which devices to listen to?


#71

I did not. Is that something that should be posted in the log on its own? Or do I have to setup the log to print the coordinates ?


#72

As I understand the firmware that should be running on your Electron, it Particle.publish()es the coordinates to the Particle cloud and the js-server subscribes to these events.
But if you don’t see them in the console, the server hasn’t got anything to look for.
And since these events are also marked PRIVATE you could only subscribe to these events when the server is also using your Particle account.

Maybe @Hypnopompia can chime in to guide you through the exact setup process of that project.


#73

Yeah, the first step here before messing with the map web page is to get your electron sending gps events and seeing them on the console.particle.io logs. Double check that the firmware was loaded correctly to the electron and the electron is properly connected to the gps tracker. Take the tracker outside and/or get an external antennae for it.

Once you get the events showing up in the console log, then the map should start working.

Here’s the firmware library you want to upload to the electron:

https://docs.particle.io/datasheets/particle-shields/#asset-tracker-library


#74

Hi guys, and @Hypnopompia ,
if you place the asset tracker along with the external antenna inside the glove compartment of a car, or the trunk (or inside a container by that matter), what would the GPS do?
will the GPS ever get a location, even if very inaccurate? or it will not give a location at all?

thanks!
Gustavo.


#75

I have great luck with getting a good signal with an external antenna. It even worked in the basement of my house. I’m pretty sure with a good antenna, it would work fine in your glove compartment.


#76

the havocstudios.com/assettracker/ link uses the “https://cdn.jsdelivr.net/sparkjs/0.5.9/spark.min.js” , the system works really well. I’ve had some small connection issues trying to get the maps to display different asset tracker units. I use the access token to retrieve the information and a php file sends the device information to the php page with the maps api and the access token. I guess my question would be how long do you think the spark.min.js will work before I have to use particle.min.js? and would you have any example of how to use the particle.min.js with the access token allowing the user to access devices?
and Thank you for the Example you provided !! it really helped me out.


#77

Ancient thread I know… but has anyone who’s using mfa with their particle.io account used this? I’m curious if since this is still “spark” functions if there is anyone out there who’s already updated it to use the particle login process.

Also curious if anyone has been able to skip the login process completely and just track a specific asset using particle API keys and tokens.