www.homeseer.com    
 

Go Back   HomeSeer Message Board > Developer Support > Scripts & Plug-Ins:Development and Libraries > Script & Plug-In Library Discussion

Script & Plug-In Library Discussion This forum is for discussing scripts that are posted in the Script Library. To keep the Script Libray as neat as possible, replies are not permitted in that forum. Please post questions, comments, scripts in process, etc. to this forum.

Reply
 
Thread Tools Display Modes
  #1  
Old August 6th, 2010, 01:20 PM
wpiman's Avatar
wpiman wpiman is offline
Seer Master
 
Join Date: Jun 2002
Location: Carlisle, MA
Posts: 867
Google Latitude script

This is the discussion for the Google latitude script. This script is pretty basic, but it fundamentally changed the way I used Homeseer and I think it may do the same for others.

It is found here.

I am not a software programmer, so bear in mind it is rough-- but useful nonetheless.

http://board.homeseer.com/showthread.php?t=143249
__________________
HS 2.5.0.21; Z-Seer 1.2 with ZStick (38 devices)
Operating System: Microsoft Windows XP Professional - Work Station;
Plug-Ins Enabled: ZWave Thermostats, HSTouch Server, TED, HSTouch Server Unlimited,
Media Player, HSTouch iPhone, CheaperRFID Plugin, AC RF Processor,
iTunes, WeatherPLUG

HSM100, HRDS1, Schlage Locks, WebController, WDT20, WGL..............

Second house....
2.4.0.72 Zstick
5 2Gig thermostats, Kwikset locks
Reply With Quote
  #2  
Old August 6th, 2010, 01:52 PM
wpiman's Avatar
wpiman wpiman is offline
Seer Master
 
Join Date: Jun 2002
Location: Carlisle, MA
Posts: 867
In answer to a question about line 24....

Try adding "temp" to line 13.

ie. dim cuurentCoridinates, temp, latitude.....


Next that doesn't work-- you may need to add

ScriptingReferences = System.xml;System.xml.dll

To your config/settings.ini file under

[Settings]
Reply With Quote
  #3  
Old August 6th, 2010, 01:58 PM
TrOjAn's Avatar
TrOjAn TrOjAn is offline
Super Seer
 
Join Date: Dec 2003
Location: England
Posts: 1,957
Added Temp as stated and ran the event, same error, checked my settings.ini and that line is there already (for some of Jon00s)

Thanks, TrOjAn
Reply With Quote
  #4  
Old August 6th, 2010, 02:00 PM
wpiman's Avatar
wpiman wpiman is offline
Seer Master
 
Join Date: Jun 2002
Location: Carlisle, MA
Posts: 867
Hmmmm,

Can you send me your userID number-- I want to look at your badge.

Are you by chance east of the prime meridian?

I wonder if that is causing something.....
Reply With Quote
  #5  
Old August 6th, 2010, 02:05 PM
TrOjAn's Avatar
TrOjAn TrOjAn is offline
Super Seer
 
Join Date: Dec 2003
Location: England
Posts: 1,957
SUre can, can I email it? I dont want to post it here.. thanks
Reply With Quote
  #6  
Old August 6th, 2010, 02:07 PM
wpiman's Avatar
wpiman wpiman is offline
Seer Master
 
Join Date: Jun 2002
Location: Carlisle, MA
Posts: 867
Quote:
Originally Posted by TrOjAn View Post
SUre can, can I email it? I dont want to post it here.. thanks
Sure

gmail----

wpiman
Reply With Quote
  #7  
Old August 6th, 2010, 02:23 PM
TrOjAn's Avatar
TrOjAn TrOjAn is offline
Super Seer
 
Join Date: Dec 2003
Location: England
Posts: 1,957
Now working yhanks to wpiman,

the latitude code needed a - in front of the number...

TrOjAn
Reply With Quote
  #8  
Old August 6th, 2010, 02:31 PM
wpiman's Avatar
wpiman wpiman is offline
Seer Master
 
Join Date: Jun 2002
Location: Carlisle, MA
Posts: 867
Glad it is working---

I don't have a minus sign-- perhaps they dole out signed numbers.

So I guess double check the sign of your Userid.
Reply With Quote
  #9  
Old August 8th, 2010, 06:46 AM
travisdh travisdh is offline
Super Seer
 
Join Date: Jan 2010
Location: Melbourne, Victoria, Australia
Posts: 1,645
Thanks for the script post, this is fantastic and is something I have implimented in my setup. I have a query though, I was hoping you might be able to help me. I have a device (Z15) which is a virtual device that I am calling TH Suburb Occupancy. What I want to be able to do is set it so that when the position code (Z1) string = "Beaconsfield Upper VIC, Australia" or "Pakenham, VIC, Australia" to set the Z15 device to "ON" and when it does not equal either of those to set it to "Off". This will allow me to set house occupancy based on suburb (especially for fire calls) as chances are in my case if I am in either suburb I am available for calls and the house can allow events to run if required.

Can anyone give me a hand with a simple script, I tried a few if else statements but all errored up, or showed "Off" when they should have shown on.
Reply With Quote
  #10  
Old August 8th, 2010, 04:15 PM
Snelvuur's Avatar
Snelvuur Snelvuur is offline
Seer Plus
 
Join Date: Nov 2006
Location: Netherlands
Posts: 122
have not tried it yet, but perhaps a quick question up front. Do you know if its possible that it will show you somehow on which highway your driving?
Reply With Quote
  #11  
Old August 8th, 2010, 08:54 PM
wpiman's Avatar
wpiman wpiman is offline
Seer Master
 
Join Date: Jun 2002
Location: Carlisle, MA
Posts: 867
Quote:
Originally Posted by Snelvuur View Post
have not tried it yet, but perhaps a quick question up front. Do you know if its possible that it will show you somehow on which highway your driving?
Right now latitude does not provide that information. If they do, it would be easy to add.

As for the other question, that could be done in the script, but an easier way would be to have an event fire when that status changes, and compare it there and set your virtual device.
Reply With Quote
  #12  
Old August 9th, 2010, 12:22 AM
travisdh travisdh is offline
Super Seer
 
Join Date: Jan 2010
Location: Melbourne, Victoria, Australia
Posts: 1,645
does the status change based on the position you are currently at?.

I know the string does, but at the moment there is no way to have an event to fire if string = x

How might I get it to show the status of Upper Beaconsfield?

Thanks
Reply With Quote
  #13  
Old August 9th, 2010, 12:48 PM
drozwood90 drozwood90 is offline
OverSeer
 
Join Date: Sep 2005
Location: Western NY
Posts: 3,819
So, I see how I am getting geo-position data, but how are you using it to say you are "in" an area?

--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.
Reply With Quote
  #14  
Old August 9th, 2010, 01:45 PM
TrOjAn's Avatar
TrOjAn TrOjAn is offline
Super Seer
 
Join Date: Dec 2003
Location: England
Posts: 1,957
Quote:
Originally Posted by zebrafilm View Post
I get this error:

Script compile error: 'Let' and 'Set' assignment statements are no longer supported.on line 28

I am in Europe so it might be the same minus sign error?
Can you be a bit more specific what you changed to get it working?

Thanks for the scripting effort, it look promising.

Bastiaan
That error is because you have renamed the .txt to .vb, it should be .txt

TrOjAn
Reply With Quote
  #15  
Old August 9th, 2010, 04:53 PM
Jakob.Sand's Avatar
Jakob.Sand Jakob.Sand is offline
Seer Deluxe
 
Join Date: Jan 2008
Location: Denmark, Karlebo
Posts: 461
This looks great.

Quote:
Originally Posted by wpiman View Post
This is the discussion for the Google latitude script. This script is pretty basic, but it fundamentally changed the way I used Homeseer and I think it may do the same for others.

It is found here.

I am not a software programmer, so bear in mind it is rough-- but useful nonetheless.

http://board.homeseer.com/showthread.php?t=143249
__________________
Best,
Jakob Sand, I automate everything!
Reply With Quote
  #16  
Old August 9th, 2010, 10:15 PM
travisdh travisdh is offline
Super Seer
 
Join Date: Jan 2010
Location: Melbourne, Victoria, Australia
Posts: 1,645
Because the position code shows the suburb you are currently in. With my example if I am in suburb X, chances are I am at home, or available. Rather than using the Lat / Long i use the suburb.
Reply With Quote
  #17  
Old August 10th, 2010, 05:19 AM
Snelvuur's Avatar
Snelvuur Snelvuur is offline
Seer Plus
 
Join Date: Nov 2006
Location: Netherlands
Posts: 122
i get :

10-8-2010 0:38:37 - Error - Running script, script run or compile error in file: getPosition.txt424:Object required: 'temp(...)' in line 21 More info: Object required: 'temp(...)'

while my atom badge url does show the geoip locations. (the test url sort of speak)
Reply With Quote
  #18  
Old August 10th, 2010, 07:05 AM
drozwood90 drozwood90 is offline
OverSeer
 
Join Date: Sep 2005
Location: Western NY
Posts: 3,819
Quote:
Originally Posted by travisdh View Post
Because the position code shows the suburb you are currently in. With my example if I am in suburb X, chances are I am at home, or available. Rather than using the Lat / Long i use the suburb.
Gotcha, I'm noticing in my area, it tells me I'm in Rochester, NY or New York, NY.

Which is NOT the case. I am in Rochester when at work, and in my suburb at night. Oh well, I guess I can always use circle math against the coordinates.

--Dan
Reply With Quote
  #19  
Old August 10th, 2010, 08:30 AM
wpiman's Avatar
wpiman wpiman is offline
Seer Master
 
Join Date: Jun 2002
Location: Carlisle, MA
Posts: 867
Quote:
Originally Posted by Snelvuur View Post
i get :

10-8-2010 0:38:37 - Error - Running script, script run or compile error in file: getPosition.txt424:Object required: 'temp(...)' in line 21 More info: Object required: 'temp(...)'

while my atom badge url does show the geoip locations. (the test url sort of speak)
This shows up in my log on occasion. I think this occurs when the site cannot be accessed. I run the script every minute, I might see it once a day. Do you see it consistently? I think i can add something which will remove this error and make it a warning.

I am on vacation, so I might not get to it for A few days. Typing this on my iPhone,
Reply With Quote
  #20  
Old August 10th, 2010, 09:40 AM
Snelvuur's Avatar
Snelvuur Snelvuur is offline
Seer Plus
 
Join Date: Nov 2006
Location: Netherlands
Posts: 122
dont see those errors anymore now though..
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 06:17 PM.


Copyright HomeSeer Technologies, LLC