Announcement

Collapse
No announcement yet.

Google Latitude script

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

    #76
    I got V4 to sort of work but its not as fast / good as the simple one I am using..

    Back on that, I think as there are a lot of options in the script that are user specific if you start to delete some it trhows up errors.

    I commented out a lot of it as I only use 1 User, 1 Location and all the stuff about milesfromcape etc are causing the errors.

    TrOjAn

    Comment


      #77
      long way from home at home

      I I set the home coordinates to my current coordinates I am around 9000km from home. Do I do something wrong?

      Originally posted by TrOjAn View Post
      I got V4 to sort of work but its not as fast / good as the simple one I am using..

      Back on that, I think as there are a lot of options in the script that are user specific if you start to delete some it trhows up errors.

      I commented out a lot of it as I only use 1 User, 1 Location and all the stuff about milesfromcape etc are causing the errors.

      TrOjAn
      Best,
      Jakob Sand, I automate everything!

      Comment


        #78
        I'm running version 4 now without any scripting problem, but I have the same issue that it seems that I'm 2000 km from home....
        Regards,

        Rien du Pre
        The Netherlands
        Using:
        Homeseer PRO latest HS4 BETA on a Raspberry
        Plugin's:
        RFXCOM, mcsMQTT, Z-Wave

        Comment


          #79
          I debugged a few problems with some people-- and you need to ensure your badge is set to "enable and show best location available". Someone had it set to city level, and it misplaced his position by a few miles. Not sure where you get 9000 km-- but I would check your badge and see where it is putting you. Possibly it is the wrong location.

          If you want you can email me your badge and I can try to see what is wrong.

          Version 2 is quite simple-- 3 and 4 add features and may indeed run slower. I added a second user-- but made it configurable so that I could track more phones if need be. These later version also take the position and send it back to google maps api to get further details about the location. If you don't need this-- probably should comment it out.

          I also added logic in the script to figure out my location. This would need to be editted as needed.

          The error warning in the log file-- I get this when my internet can't obtain the badge-- so I see it in my log on occasion. If you manage to put in the wrong user code-- you will see this consistently. If any sharp software people know how to turn this error into a warning I am all ears.

          Another way to possibly speed up the script would be to make all the arrays as small as possible. I'll try to make them dynamically sized to the number of users.
          HS3 Pro Edition 3.0.0.435 (Windows Server 8.1 on ESXi box)

          Plug-Ins Enabled:
          Z-Wave:,RaspberryIO:,AirplaySpeak:,Ecobee:,
          weatherXML:,JowiHue:,APCUPSD:,PHLocation:,Chromecast:,EasyTr igger:

          Comment


            #80
            Originally posted by Rien du Pre View Post
            I'm running version 4 now without any scripting problem, but I have the same issue that it seems that I'm 2000 km from home....
            Can you send a screenshot of your devices?
            HS3 Pro Edition 3.0.0.435 (Windows Server 8.1 on ESXi box)

            Plug-Ins Enabled:
            Z-Wave:,RaspberryIO:,AirplaySpeak:,Ecobee:,
            weatherXML:,JowiHue:,APCUPSD:,PHLocation:,Chromecast:,EasyTr igger:

            Comment


              #81
              Originally posted by wpiman View Post
              Can you send a screenshot of your devices?
              In the badge I use the best positioning method possible. (Not only city).


              here is a screendump.

              Devicecode is changed from Z to G otherwise exactly as you create them.

              in my getversion4scrip I have the following homeadress Position:

              latitudePosition(0) = 55.87554
              longitudePosition(0) = 12.51218
              distanceCode(0, 0) = "G6"
              distanceCode(1, 0) = "G16"

              Why is G6 so large a number?
              Attached Files
              Best,
              Jakob Sand, I automate everything!

              Comment


                #82
                Can u email me your script with changes?

                My username here at gmail
                HS3 Pro Edition 3.0.0.435 (Windows Server 8.1 on ESXi box)

                Plug-Ins Enabled:
                Z-Wave:,RaspberryIO:,AirplaySpeak:,Ecobee:,
                weatherXML:,JowiHue:,APCUPSD:,PHLocation:,Chromecast:,EasyTr igger:

                Comment


                  #83
                  And here is my screenshot, and part of the script.

                  ' Add your locations- virtual devices for distances to those units
                  ' home
                  latitudePosition(0) = 52.007076
                  longitudePosition(0) = -5.557451
                  distanceCode(0, 0) = "Z28"

                  And I emailed my script to you as well

                  Thanks in advance,
                  Attached Files
                  Regards,

                  Rien du Pre
                  The Netherlands
                  Using:
                  Homeseer PRO latest HS4 BETA on a Raspberry
                  Plugin's:
                  RFXCOM, mcsMQTT, Z-Wave

                  Comment


                    #84
                    Originally posted by Rien du Pre View Post
                    And here is my screenshot, and part of the script.

                    ' Add your locations- virtual devices for distances to those units
                    ' home
                    latitudePosition(0) = 52.007076
                    longitudePosition(0) = -5.557451
                    distanceCode(0, 0) = "Z28"

                    And I emailed my script to you as well

                    Thanks in advance,
                    Got your email-- that position is in the middle of the St. George Channel. I think you mean +5.557451. That falls within the Netherlands.

                    I checked it on a website and it appears that should be around 475 miles-- or 700 something kilometers.

                    Positive is E, negative is west.

                    Let me know if that works.
                    HS3 Pro Edition 3.0.0.435 (Windows Server 8.1 on ESXi box)

                    Plug-Ins Enabled:
                    Z-Wave:,RaspberryIO:,AirplaySpeak:,Ecobee:,
                    weatherXML:,JowiHue:,APCUPSD:,PHLocation:,Chromecast:,EasyTr igger:

                    Comment


                      #85
                      European issue

                      Ok,
                      I have figured out and fixed the European issues. Originally I though it was a problem being east of the prime meridian, but it has to do with the numbering system.

                      Google list locations with comma separated decimals. ie. 100,000 is one hundred thousand

                      European PCs see googles positions such as 41.17521 as four hundred and something thousand rather than 41 and change.

                      This would cause huge miscalculations in the distance.

                      I added a constant called "periodSeparatedDecimal". If 41 and one half looks like

                      41.5 to you-- set this to zero
                      41,5 to you-- set this to a one.

                      I will put this up shortly. Let me know if you see more issues.
                      HS3 Pro Edition 3.0.0.435 (Windows Server 8.1 on ESXi box)

                      Plug-Ins Enabled:
                      Z-Wave:,RaspberryIO:,AirplaySpeak:,Ecobee:,
                      weatherXML:,JowiHue:,APCUPSD:,PHLocation:,Chromecast:,EasyTr igger:

                      Comment


                        #86
                        I can confirm the V5 version works great in Europe.

                        Status: I'm at home and distance is 0

                        regards,

                        jeroenkl

                        Comment


                          #87
                          Denmark is a go now too!

                          Please consider make this fantastic script into a plugin. so config data are seperated, devicecode dynamic etc. I will pay!!!

                          Originally posted by jeroenkl View Post
                          I can confirm the V5 version works great in Europe.

                          Status: I'm at home and distance is 0

                          regards,

                          jeroenkl
                          Best,
                          Jakob Sand, I automate everything!

                          Comment


                            #88
                            Originally posted by Jakob.Sand View Post
                            Denmark is a go now too!

                            Please consider make this fantastic script into a plugin. so config data are seperated, devicecode dynamic etc. I will pay!!!
                            Thanks-- not sure I have time for that but configuration is difficult-- I know.

                            I'll try to look into it.

                            I am seeing an issue where multiple copies of the script run-- I need to figure this out. It caused me to crash.
                            ---------------------------------------------
                            Well duh- when you fire the event for the script- you can specify don't allow multiple copies to run.

                            I am still seeing some issues in the log file on occasion. I added some debug statements and I will see if I can modify the code to eliminate these.
                            Last edited by wpiman; August 25, 2010, 10:56 PM.
                            HS3 Pro Edition 3.0.0.435 (Windows Server 8.1 on ESXi box)

                            Plug-Ins Enabled:
                            Z-Wave:,RaspberryIO:,AirplaySpeak:,Ecobee:,
                            weatherXML:,JowiHue:,APCUPSD:,PHLocation:,Chromecast:,EasyTr igger:

                            Comment


                              #89
                              Update v6......

                              I added an update which will exit the script gracefully if the XML pages don't load. It will display warnings in the log rather than errors. If the XML for your badge doesn't open-- it will say so-- if the KML doesn't open-- same thing.

                              If you are getting issues like...

                              20-8-2010 11:02:28 - Error - Running script, script run or compile error in file: getPosition_v4.txt 424:Object v: 'temp(...)' in line XXX More info: Object required: 'temp(...)'

                              in your log on occasion- it will replace them with warnings and a graceful script exit. Be sure to allow only one copy of the script to execute as well.


                              If you see lots of these warnings (every time the script runs)-- your connection probably is down or your badge number is no good.
                              HS3 Pro Edition 3.0.0.435 (Windows Server 8.1 on ESXi box)

                              Plug-Ins Enabled:
                              Z-Wave:,RaspberryIO:,AirplaySpeak:,Ecobee:,
                              weatherXML:,JowiHue:,APCUPSD:,PHLocation:,Chromecast:,EasyTr igger:

                              Comment


                                #90
                                Finally updated to V6. Wow, awesome!

                                I set the script to run every 3 min.

                                Setup my phone (wife doesn't have lattitude), modified the script up to clean up the extra stuff.

                                Works very well.

                                If I get time, maybe I'll try to convert to .net (I think this is the ONLY non .net script on my system).

                                I liked your example for setting "home", "far away", etc.

                                So, I think I should get my RFID stuff running again, in my car. I picked up a great deal on ThingFling. Got 10 each 120VAC to 5VUSB and 12VCar to 5VUSB for $12 or something like that. So, now I have power supplies for my RFID stuff!

                                As well as the Jon00 BT connector.

                                That would be totally AWESOME!

                                --Dan
                                Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

                                Comment

                                Working...
                                X