iPhone Locator with Here maps

This is my second variant of the plugin, this time using Here Maps as the source of traffic/distance/time instead of google map.

The main advantage is the cost if you have multiple devices or use a very polling rate as Here maps free tier offers 250K calls/month Vs. Googles $200 dollar equivalent which is 20K combined calls/month.

To use it, you will have to register to a dev account just like for google.


After that you will need to obtain an app_ID and an app_code which you will plugin to the device variables of the plugin.

To install the plugin, install it as normal and download the two L_IPhone.lua and J_IPhone.js from the repo and upload them to the /etc/cmh-ludl folder of the vera or openluup or you can use the apps/develop apps/luup file menu and do a drag and drop.

After using it for little over 1 week without problems on openLuup/ALTUI. I think it is now ready for those of you who want to try it. I think I have completely replaced google map and reproduced all the functionalities with Here. A couple of additional changes I made: The plugin does not make a call to Here to get address and distance if no device has not moved.

1 Like

Rafale can the Here version and the Google version co-exist?

Cheers

C

Not as is. It would require some refactoring. I have been using this version successfully for a few months now. Maybe I will adapt it so it can be merged into @amg0’s google version when I get the time.

OK Ta

The only reason I ask is that I’ve broken Google this month messing around with polling rates for Mrs C. And now she’s stuck in traffic and I have no idea where (and of course our ‘geofence’ won’t work)

I might give it a try , but probably not tonight.

C

Gave it a try, signed up for developer, uploaded the files and put in the App ID and and App Code was not able to see the map. Reloaded the engine a few times and still not showing up.

Not reloading the engine but instead go to the map again after clicking on another tab within the plugin.

Are you using it on openluup or on the vera?

Did that and no map is showing up, also im using it on vera

Hmm I did not test it on UI7. Now that I have some veras laying around, let me try it there. And it is not on UI7 and not ALTUI right?

UI7, for the time being if i delete the files i uploaded the plugin will still work how it did before correct?

No need to delete. Just overwrite with the original plugin files.

1 Like

back up and running on google maps, I will upload your files and test once you’ve got it working :slight_smile:

Just to be sure. Are you not seeing any map at all or are you seeing an empty map.
As is, this is what I am seeing on UI7:


and on the same vera this is what I see on ALTUI

So I think it works. I just have not yet setup the API keys to here map correctly

I was getting no map showing up at all, but in the device page where it shows the polling etc. it was showing the correct street.

Maybe it is my lack of instructions. After uploading the two files to your pre-existing iPhone locator app:

  1. J_IPhone.js
  2. L_IPhone.lua
  3. reload luup (should be done automatically)

you should get the following new variables in the iPhone locator plugin device:

  1. APIkey
  2. AppCode
  3. AppID
    These should be given to you by your Here API account.

I just tested it on a near virgin vera plus and it works fine.

I inputed the API key and AppCode not the AppID. I was wondering if that was needed but assumed since it wasn’t mentioned that it wasn’t. Will give this another go!

The screenshots above were before I inputted any of the variables… It still showed an empty map. After the variables are set, I get a map. The map is displayed through javascript which is pretty universal. Not sure why it would not work.

So it was just the App ID I was missing. Map showed up perfectly for me. Only issue that I see right now is the polling map doesn’t show up, the range does though.

1 Like

Thanks for reporting back! I have not looked at the polling map as I never used it. Let me look into what it does and see if I can transfer it over.

1 Like

So im tracking 3 iPhones and prior to adding the new Maps they’ve been polling just fine. Now one of them is saying no location information for that device. Could this have to do with the fact that the maps has max quota of 2 uses?

© 2019 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy