Announcement

Collapse
No announcement yet.

Ver 4.0.0.33 - improvements on location change detection

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Ver 4.0.0.33 - improvements on location change detection

    I noticed that the location reported by Traccar server can be noisy - even if device is not moving - it still reports changes. Which causes unnecessary Maps API request (can cause unnecessary charges, especially from Google).

    In ver 4.0.0.33 I added a lot of functionality to help avoid this. The LocChange HS device shows when plugin detects the change in position and sends Map API requests:

    a. for address reverse geocoding (if not setup on server side)
    b. for map image (if "Show Map" is selected)
    c. for StreetView image (if "Street View" is selected)

    Click image for larger version  Name:	LocChange device.jpg Views:	0 Size:	13.1 KB ID:	1468941

    So, ver. 4.0.0.33:

    1. Added "Positions Only" log level, so the plugin only logs information necessary for troubleshooting location change and Maps API requests.

    2. Added moving average filter separately for latitude and longitude. Bigger window size will reduce the noise and false position change detection, but may reduce the address/map update frequency.

    3. Same (but reverse) for "Location change sensitivity" - higher number will increase the address/map update frequency.

    4. Diagnostics statistics shows the average Map API request interval (mm::ss) and Lat/Lon detected change interval.

    5. Maps API calls counters - Daily (auto reset) and Total (manual reset). Helps to monitor and trigger alarm if calling API too often

    The above settings may differ for different device types, i.e. mobile phone location reporting is more noisy, but update speed is less important (so the filter size can be increased, but sensitivity reduced). For car GPS tracker the location reporting is more precise, but speed is more important, so filtering can be reduced.

    Note: setting "Location filter size" to 1 disables moving average filter.
    Click image for larger version  Name:	device_config.png Views:	0 Size:	382.1 KB ID:	1468942
    On "MyDevices" screen (auto refreshed) you you can see when Position (Location) change is triggered and also the statistics of the change detection and Maps API requests.
    Click image for larger version  Name:	image_101277.jpg Views:	0 Size:	47.0 KB ID:	1483340
    Click image for larger version  Name:	new-mydevices - Copy.png Views:	31 Size:	42.9 KB ID:	1469148

    #2
    Thanks, will try before switching.. there were also settings in Traccar recommended tolimit hits, do you recommend adding these ?

    G
    Ubuntu on the Intel NUC ( 8i5BEK ), 32 G, 250G SSD, V4 Pro 😎

    Comment


      #3
      up'd to .33, reinstalled Google
      do I need to set anything new ?


      Click image for larger version  Name:	33 param.JPG Views:	0 Size:	64.3 KB ID:	1468966
      Ubuntu on the Intel NUC ( 8i5BEK ), 32 G, 250G SSD, V4 Pro 😎

      Comment


        #4
        This statistics is accumulated over time, starts from 0.

        You need to balance "Location change sensitivity" - higher value is better, but may cause more Map API requests. I think for real GPS tracker it can be higher i.e. 6, for my mobile phone I set to 4.1

        Make sure that log is set to "Positions Only", and monitor in log for messages my2: Lat CHANGED: diff 8.24000000676506E-06(freq 05:55) If it happens too often without moving - decrease "Location change sensitivity" (by 0.1 steps). But if you set sensitivity too low - you may not get location change when you move.

        Watch the LocChange HS device for change - when you are not moving it shouldn't show Motion, and vice versa, when you move - it should show Motion.

        Comment


          #5
          Geary, in ver. 4.0.0.34 I added the stats to the "MyDevices" screen (auto refreshed).

          Also I added the copy of LocChange device state to the root device - so you can see when position change is triggered from the grid view - see "online - motion" state on the second screenshot.
          Click image for larger version  Name:	new-mydevices - Copy.png Views:	0 Size:	42.9 KB ID:	1469151
          Click image for larger version  Name:	new-grid.png Views:	0 Size:	47.5 KB ID:	1469152

          Comment


            #6
            Originally posted by alexbk66 View Post
            This statistics is accumulated over time, starts from 0.

            You need to balance "Location change sensitivity" - higher value is better, but may cause more Map API requests. I think for real GPS tracker it can be higher i.e. 6, for my mobile phone I set to 4.1

            Make sure that log is set to "Positions Only", and monitor in log for messages my2: Lat CHANGED: diff 8.24000000676506E-06(freq 05:55) If it happens too often without moving - decrease "Location change sensitivity" (by 0.1 steps). But if you set sensitivity too low - you may not get location change when you move.

            Watch the LocChange HS device for change - when you are not moving it shouldn't show Motion, and vice versa, when you move - it should show Motion.
            Alex,

            When I go to "Location change Sensitivity" I see all values 10 times or so.
            Click image for larger version

Name:	image_101149.png
Views:	140
Size:	28.7 KB
ID:	1469856

            Comment


              #7
              antoon what HS version and what AKTraccar version?

              Click image for larger version

Name:	2021-04-20 (1).png
Views:	138
Size:	11.2 KB
ID:	1469858

              Comment


                #8
                Alex,

                I am on HS version 4.1.15.0
                Traccar 4.0.0.36

                Comment


                  #9
                  Hmm, strange, https://docs.homeseer.com/display/HS...lease+4.1.15.0 should fix it. What's the start and end numbers? How many all together? What if you refresh the page?

                  Comment


                    #10
                    Originally posted by alexbk66 View Post
                    Hmm, strange, https://docs.homeseer.com/display/HS...lease+4.1.15.0 should fix it. What's the start and end numbers? How many all together? What if you refresh the page?
                    Start number is 3 and endnumber is 7 and all together 41.
                    Refreshing the page doesn't solve it.
                    I also try to use other browser, but same problem.

                    I found onother thing with this version.
                    The adress is not working anymore.
                    It says NOT FOUND (1)
                    Was working perfect with the older versions.

                    Attached Files

                    Comment


                      #11
                      What provider are you using? What's the address request URL in the log?

                      Comment


                        #12
                        What do you mean with provider?
                        In the log I see the adress

                        [9980] Opel Corsa: http://192.168.0.190:8082/api/positions?id=200407: [{"id":200407,"attributes":{"ignition":false,"status":4294949 887,"io1":"204","io2":"04","io3":"00212","io4":"5149","dista nce":0.74,"totalDistance":631017.5,"motion":false,"hours":36 300000},"deviceId":3,"type":null,"protocol":"h02","serverTim e":"2021-04-21T06:05:53.459+00:00","deviceTime":"2021-04-21T06:05:51.000+00:00","fixTime":"2021-04-21T06:05:51.000+00:00","outdated":false,"valid":true,"latitu de":51.81840166666667,"longitude":5.7556183333333335,"altitu de":0.0,"speed":0.01,"course":0.0,"address":"6 Einsteinstraat, Wijchen, GE, NL","accuracy":0.0,"network":null}]

                        Comment


                          #13
                          By provider meant Google, Bing, etc.

                          So I see two issues.

                          1. You do get the address from the server - so I really should be using it, and it's the way it's supposed to work, so I must have broken something, should be easy to fix.

                          2. And since I still request the address from Google - is it possible that at this point the address from Traccar server was empty? You are getting "NOT FOUND (1)", so I need to check the request URL, which I think is only logged when you set "Trace" log level.

                          Comment


                            #14
                            I am using Google
                            Found an issue in my traccar xml file after I updated traccar yesterday.
                            So it can be that I now have to move my car to get the adress?

                            Comment


                              #15
                              Ok, ignore the previous post and try ver 4.0.0.37

                              Comment

                              Working...
                              X