Announcement

Collapse
No announcement yet.

PHLocation V2 Discussion

Collapse
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • sooty
    replied
    [QUOTE=MNB;n1284108]Paul, I was snooping around the various internet Apple forums and found the following which suggest that speed and direction is possible albeit it would require your programing skills as I do not believe it is a standard output.. Mike


    Try something like this:

    PHP Code:
    - (idinit
    {
    self = [super init];
    if (
    self != nil) {
    self.manager = [[CLLocationManager allocinit];
    self.manager.delegate self;
    [
    self.manager startUpdatingLocation];
    }
    return 
    self;
    }

    - (
    void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
    {
    NSLog(@"Speed = %f"newLocation.speed);

    That code looks like it relates to developing an app for iOS. Speed and course will be available on the physical device if an app is coded to use it.

    The plug-in obtains data about a device through the FindMyiPhone service when I last looked this did not include speed and course. FollowMee and Life360 are examples of iOS apps that do ask the device for its speed and subsequently report this to their respective server.

    Paul..

    Leave a comment:


  • rprade
    replied
    Originally posted by slbuck View Post

    On the Android side of the house, if you could do something like Backitude which gives the option to only steal locations, that would be great. I notice no battery drain by having Backitude running all the time. It only steals locations from other apps when they query for GPS (like Google maps, Waze, WeatherBug etc.) and if nothing is utilizing GPS, then it will report what it can from Wi-Fi/Cellular, but only if it meets the minimum accuracy allowed, which is user configurable. This has been pretty much flawless for me and requires no geofences to be created.


    I understand what you are saying except: "requires no geofences to be created". Do you mean you don't have to create them on your device? Known Locations in the plug-in are geofences, I am guessing you are using those.

    Leave a comment:


  • slbuck
    replied
    Originally posted by sooty View Post

    I was hoping to create a companion (iOS & Android) mobile app for the plug-in to remove dependency on third party apps but the way things are going right now I don't know when I'll find the time

    Paul..
    On the Android side of the house, if you could do something like Backitude which gives the option to only steal locations, that would be great. I notice no battery drain by having Backitude running all the time. It only steals locations from other apps when they query for GPS (like Google maps, Waze, WeatherBug etc.) and if nothing is utilizing GPS, then it will report what it can from Wi-Fi/Cellular, but only if it meets the minimum accuracy allowed, which is user configurable. This has been pretty much flawless for me and requires no geofences to be created.



    Leave a comment:


  • MNB
    replied
    Originally posted by goldriver View Post

    Actually that is what I started 2 hours ago and I still have probably another couple hour to complete and fine tune.

    Thanks


    Envoyé de mon iPhone en utilisant Tapatalk
    I did say "relative" all thou it doesn't help your situation, (I think there should be some words of encouragement here!) Mike

    Leave a comment:


  • MNB
    replied
    Paul, I was snooping around the various internet Apple forums and found the following which suggest that speed and direction is possible albeit it would require your programing skills as I do not believe it is a standard output.. Mike
    Claude31 Oct 21, 2018 7:27 AM (in response to Josh587) Tested in simulator (Apple location):
    1. func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
    2. let newLocation = locations[locations.count - 1]
    3. locationManager.stopUpdatingLocation()
    4. print("Location", newLocation!)
    5. }


    I get:
    Location <+37.33233141,-122.03121860> +/- 50.00m (speed -1.00 mps / course -1.00) @ 10/21/18, 4:10:11 PM Central European Summer Time

    So, you get
    - the speed in newLocation!.speed (in meters per second)
    - the direction in newLocation.course :The direction in which the device is traveling, measured in degrees and relative to due north.)
    [quote]Try something like this:

    PHP Code:
    - (idinit
    {
        
    self = [super init];
        if (
    self != nil) {
            
    self.manager = [[CLLocationManager allocinit];
            
    self.manager.delegate self;
            [
    self.manager startUpdatingLocation];
        }
        return 
    self;
    }

    - (
    void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
    {
        
    NSLog(@"Speed = %f"newLocation.speed);

    Leave a comment:


  • goldriver
    replied
    Originally posted by MNB View Post

    Ah! so it's GeoFency, yes it does create a new reference id for new GF as you modify the PHL2api. I found though simply changing one and update ones events wasn't a big task.. (I guess that's relative) but as I created and test each one I was able to change the various associated events relatively easy with my 4 iBeacons and 3 Virtual Fences. Mike
    Actually that is what I started 2 hours ago and I still have probably another couple hour to complete and fine tune.

    Thanks


    Envoyé de mon iPhone en utilisant Tapatalk

    Leave a comment:


  • MNB
    replied
    Originally posted by goldriver View Post

    Unfortunately, when I modify my Geofency device in my iPhone to communicate via phl2api, this creates new devices and old devices are not updated anymore.


    Envoyé de mon iPhone en utilisant Tapatalk
    Ah! so it's GeoFency, yes it does create a new reference id for new GF as you modify the PHL2api. I found though simply changing one and update ones events wasn't a big task.. (I guess that's relative) but as I created and test each one I was able to change the various associated events relatively easy with my 4 iBeacons and 3 Virtual Fences. Mike

    Leave a comment:


  • goldriver
    replied
    Originally posted by MNB View Post

    Bruno, when I installed PHL2 along with PL1 I do not recall my device ref ID's changing in PHL2 in fact they were the same so that one would be able to transition events from on version to the other. Mike
    Unfortunately, when I modify my Geofency device in my iPhone to communicate via phl2api, this creates new devices and old devices are not updated anymore.


    Envoyé de mon iPhone en utilisant Tapatalk

    Leave a comment:


  • MNB
    replied
    Originally posted by goldriver View Post
    Question

    I have more than 20 geofences ibeacon set in 5 different iphones with about 10 events related to each of these 5 phones/ibeacon.

    Is there a way I can keep the original Geofence device "reference Id" moving to V2 once I remove V1 ?
    Bruno, when I installed PHL2 along with PL1 I do not recall my device ref ID's changing in PHL2 in fact they were the same so that one would be able to transition events from on version to the other. Mike

    Leave a comment:


  • MNB
    replied
    Thanxs for the confirmation Paul. If I stop posting silly inquiries will that help with more time! , Mike

    Leave a comment:


  • sooty
    replied
    Originally posted by MNB View Post

    So I can safely assume that iCloud/iPhone and/or GeoFency do not support Course or Speed or is there something I have to do on my end to enable them?
    Last time I checked iCloud did not report speed and / or course as part of the location data. Never checked but I don't expect Geofency will report that info given its primary purpose.

    I was hoping to create a companion (iOS & Android) mobile app for the plug-in to remove dependency on third party apps but the way things are going right now I don't know when I'll find the time

    Paul..

    Leave a comment:


  • goldriver
    replied
    Question

    I have more than 20 geofences ibeacon set in 5 different iphones with about 10 events related to each of these 5 phones/ibeacon.

    Is there a way I can keep the original Geofence device "reference Id" moving to V2 once I remove V1 ?

    Leave a comment:


  • MNB
    replied
    Originally posted by sooty View Post

    Course and speed are currently in there as child devices but only for services that report it directly as opposed to using calculated values. I suppose they could also be done with calculated values using last > current location although not as accurately.

    Not sure about closest street. I'll have a look and see which (if any) mapping services support that.

    Paul..
    So I can safely assume that iCloud/iPhone and/or GeoFency do not support Course or Speed or is there something I have to do on my end to enable them?

    Leave a comment:


  • sooty
    replied
    There was an issue in versions 3.0.0.57 and 3.0.0.58 where on each start-up the plug-in could create an additional message panel device.
    If this occurs you will see error messages in the HS3 log at startup as there can only be 1 message panel device per HS3 instance.

    The problem is fixed in version 3.0.0.59 but if you installed one of the above versions then use the HS3 device management page to see if there are multiple "Message Panel" devices. If so, then delete all but one of them from the device management page then re-start with version 3.0.0.59 or later.

    Apologies for any inconvenience.

    Paul..

    Leave a comment:


  • sooty
    replied
    Originally posted by MNB View Post
    Paul, question is it possible to have a few more children; 1) Moving direction e.g. N/S/E/W current or last, 2) current/closest street name, 3) moving speed in miles or Km
    Course and speed are currently in there as child devices but only for services that report it directly as opposed to using calculated values. I suppose they could also be done with calculated values using last > current location although not as accurately.

    Not sure about closest street. I'll have a look and see which (if any) mapping services support that.

    Paul..

    Leave a comment:

Working...
X