Announcement

Collapse
No announcement yet.

Reverse Geocode error

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

    #16
    Originally posted by sooty View Post
    Claude,

    Would you mind emailing or PMing me one of the actual recent entries from your log sowing the error. I'm searching the plug-in code for the exact error that Rvtravlr posted and I can't find it which is leading me to think that it was produced by an older version of the plug-in.

    I do have all the previous versions archived so I can go back through and see when it changed, but I'm just being lazy

    Paul..
    See attachment. I sent you a PM for opening it.
    Attached Files

    Comment


      #17
      Thanks for the logs etc.

      I tested a few of the coordinates from your logs with the Google Geocoding API and they all come back OK so the issue is not that it can't find an address for the given coordinates.

      What I did notice during testing is that sometimes (but not always) when making a reverse geocode request without specifying an API key it would fail but then a few seconds later would succeed.

      This did not happen when an API key was specified which could suggest a number of causes. Perhaps requests with a key are prioritised at busy times and non-key requests are refused. I really don't know the answer.

      What you should see in the plug-in is that it will set Country, Town, Address etc to "Unknown" or "Not Available" if a reverse lookup fails.

      I could possibly put something in so if a lookup fails it will wait a couple of seconds and try again. I'll think about that...

      Paul..

      Comment


        #18
        Yesterday I had added the google api, the wife just now left, she is now in country unknown

        the google api key does not seem to change it...

        Wim
        -- Wim

        Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

        1210 devices/features ---- 392 events ----- 40 scripts

        Comment


          #19
          Originally posted by w.vuyk View Post
          Yesterday I had added the google api, the wife just now left, she is now in country unknown

          the google api key does not seem to change it...

          Wim
          What do you get if you take the latitude and longitude of your wife's current location and enter them in the following url on a browser?

          https://maps.googleapis.com/maps/api/geocode/xml?latlng={latitude},{longitude}

          latitude and longitude are decimal values using the "." dot as a separator.

          I'm currently working on implementing a "Non-Google" free alternative for things like reverse geocode and driving distance etc.

          Paul..

          Comment


            #20
            Paul,

            First time I got the address correctly, a repeated post delivered this:

            <GeocodeResponse>
            <status>OVER_QUERY_LIMIT</status>
            <error_message>
            You have exceeded your daily request quota for this API. We recommend registering for a key at the Google Developers Console: https://console.developers.google.co...ials?project=_
            </error_message>
            </GeocodeResponse>

            What I noticed also is that the response in the log is a bit different: a first message (coming from an event) is showing the address, but within seconds a second messages comes and this is the error. Looks like the plugin is sending the request twice for the same Iphone here?

            Code:
            sep-27 15:57:08	 	Pushover 3P	Pushover Notification Sent - Message Title Joy is nu in een ander land aangekomen!
            sep-27 15:57:08	 	Pushover 3P	Pushover Notification Sent - Message Title Joy is nu in Unknown
            sep-27 15:57:06	 	Event	Running script in background: C:/HS3/scripts/speak.vb("Main","Joy is in een ander land aangekomen")
            sep-27 15:57:06	 	Event	Event Trigger "Locatie Joy ander land"
            sep-27 15:47:47	 	PHLocation Error	(UpdateUserDevice) Error getting reverse geocode for [2927] Lat: xx.2122264374534 Lon:x.9537963289823
            sep-27 15:47:44	 	Locatie	Joy is nu op locatie Asselsestraat xxx, xxxxxxxxxxn, Netherlands @ 27-9-2017 15:47:10 Acc: 50m
            sep-27 15:44:20	 	Huis	Bovenetage vrij
            Does the plugin have to be restarted once you added the api key?

            Wim
            Last edited by w.vuyk; September 27, 2017, 09:02 AM. Reason: added more logging
            -- Wim

            Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

            1210 devices/features ---- 392 events ----- 40 scripts

            Comment


              #21
              Paul,

              Reviewed my log on this and it seems to be this way everytime, a first query gets the location and the next within seconds generates the error.

              It seems to have started on September 20 according to my log. Must be something Google changed.

              Wim
              -- Wim

              Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

              1210 devices/features ---- 392 events ----- 40 scripts

              Comment


                #22
                Originally posted by w.vuyk View Post
                Paul,

                First time I got the address correctly, a repeated post delivered this:

                <GeocodeResponse>
                <status>OVER_QUERY_LIMIT</status>
                <error_message>
                You have exceeded your daily request quota for this API. We recommend registering for a key at the Google Developers Console: https://console.developers.google.co...ials?project=_
                </error_message>
                </GeocodeResponse>

                What I noticed also is that the response in the log is a bit different: a first message (coming from an event) is showing the address, but within seconds a second messages comes and this is the error. Looks like the plugin is sending the request twice for the same Iphone here?

                Code:
                sep-27 15:57:08	 	Pushover 3P	Pushover Notification Sent - Message Title Joy is nu in een ander land aangekomen!
                sep-27 15:57:08	 	Pushover 3P	Pushover Notification Sent - Message Title Joy is nu in Unknown
                sep-27 15:57:06	 	Event	Running script in background: C:/HS3/scripts/speak.vb("Main","Joy is in een ander land aangekomen")
                sep-27 15:57:06	 	Event	Event Trigger "Locatie Joy ander land"
                sep-27 15:47:47	 	PHLocation Error	(UpdateUserDevice) Error getting reverse geocode for [2927] Lat: xx.2122264374534 Lon:x.9537963289823
                sep-27 15:47:44	 	Locatie	Joy is nu op locatie Asselsestraat xxx, xxxxxxxxxxn, Netherlands @ 27-9-2017 15:47:10 Acc: 50m
                sep-27 15:44:20	 	Huis	Bovenetage vrij
                Does the plugin have to be restarted once you added the api key?

                Wim
                OK Wim I think I know why it may be querying the reverse geocode API more than once in quick succession but I'll need to check the code.

                I think this will only happen with iCloud accounts. The reason is that it can poll iCloud multiple times before it gets a valid fix and I think that each poll will result in a reverse geocode query even if the fix isn't used.

                Yes, the plug-in will need to be restarted for the API key to take effect.

                Paul..

                Comment


                  #23
                  Paul,

                  We are indeed using icloud here, for 2 iphones.
                  I did restart the pluygin to have the api key take effect, but - altough less frequent - it keeps getting the reverse geocode error here regularly.

                  Thanks,

                  Wim
                  -- Wim

                  Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

                  1210 devices/features ---- 392 events ----- 40 scripts

                  Comment


                    #24
                    I've seen it also a couple of times ,
                    I checked the log right now and in total from the 23-09 till today it happend 5 times.. so its not that much

                    I keep an eye on it ,

                    Regards

                    Originally posted by w.vuyk View Post
                    Paul,

                    We are indeed using icloud here, for 2 iphones.
                    I did restart the pluygin to have the api key take effect, but - altough less frequent - it keeps getting the reverse geocode error here regularly.

                    Thanks,

                    Wim
                    Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
                    Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




                    HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

                    Comment


                      #25
                      It's happening here every few times phlocation runs, SMS Gateway has the same problem!
                      sigpic
                      A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

                      Comment


                        #26
                        I've been testing an alternative reverse geocode service over the last couple of days. If it proves reliable over a week or so then I'll add it as an option or possibly use it as a backup.

                        Paul..

                        Comment


                          #27
                          i found a good website that offers 10k queries a day for reverse geo

                          https://locationiq.org/

                          Regards
                          Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
                          Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




                          HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

                          Comment


                            #28
                            Hi paul,

                            I'm getting the error every time now.
                            can you please add this api to the plugin https://locationiq.org/ u have 10k free requests a day.

                            I can't use the lookup now, i get constantly the error.

                            regards
                            Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
                            Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




                            HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

                            Comment


                              #29
                              Originally posted by Malosa View Post
                              Hi paul,

                              I'm getting the error every time now.
                              can you please add this api to the plugin https://locationiq.org/ u have 10k free requests a day.

                              I can't use the lookup now, i get constantly the error.

                              regards
                              Google reverse geocode is working fine here without an API key. What do you get if you put this url into a browser ?

                              https://maps.googleapis.com/maps/api...08,-1.11649607

                              I'm currently making a lot of changes to the plug-in and adding support for alternative API's for things like reverse geocoding and distance matrix lookups etc is part of those changes.

                              This is not a 5 minute job because as well as making all the changes in the plug-in and making sure it doesn't screw things up for existing users, I also have to update the user guide before releasing a new version.

                              If you want to test a beta version with support for alternative API's, then send me an email and I will contact you when I have something available for testing.

                              Paul..

                              Comment


                                #30
                                Hi Paul,

                                when i click the link it returns normal.
                                but on your plugin i get an reverse api error,
                                also my devices don't update only battery etc.

                                But i send u an email i really want to beta test if u have something available

                                regards


                                Originally posted by sooty View Post
                                Google reverse geocode is working fine here without an API key. What do you get if you put this url into a browser ?

                                https://maps.googleapis.com/maps/api...08,-1.11649607

                                I'm currently making a lot of changes to the plug-in and adding support for alternative API's for things like reverse geocoding and distance matrix lookups etc is part of those changes.

                                This is not a 5 minute job because as well as making all the changes in the plug-in and making sure it doesn't screw things up for existing users, I also have to update the user guide before releasing a new version.

                                If you want to test a beta version with support for alternative API's, then send me an email and I will contact you when I have something available for testing.

                                Paul..
                                Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
                                Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




                                HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

                                Comment

                                Working...
                                X