| Author |
Message |
|
ereuter
Joined: Dec 15, 2009 Posts: 16 Location: Kittery, ME
|
 WeatherTracker Library?
I have a weather station on the way (WMR200), and am looking at using WeatherTracker to integrate with Indigo.
Trouble is, Script Editor can't seem to see its library. Anyone else have this problem?
I like the UI better than WeatherSnoop, but scriptability is more important.
Thanks, Eric
|
| Fri Sep 03, 2010 7:10 pm |
|
 |
|
AfterTenSoftware
Joined: Sep 09, 2010 Posts: 4
|
 Re: WeatherTracker Library?
Latest beta version 1.4b2 should solve this issue for you. http://www.afterten.com/support/viewtopic.php?f=8&t=1283Also let me know what may be lacking, in terms of data you need, from the dictionary. Next release should have all the highs and lows in the dictionary.
|
| Thu Sep 09, 2010 10:00 am |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6662 Location: Austin, Texas
|
 Re: WeatherTracker Library?
Great, thanks! Weather is quite a popular topic around here so it's great to see you're actively working on the scripting.
And welcome to the forums!
_________________ Jay (Indigo Support)
|
| Thu Sep 09, 2010 11:11 am |
|
 |
|
bobeast
Joined: Apr 16, 2003 Posts: 392
|
 Re: WeatherTracker Library?
AfterTenSoftware wrote:Latest beta version 1.4b2 should solve this issue for you. http://www.afterten.com/support/viewtopic.php?f=8&t=1283Also let me know what may be lacking, in terms of data you need, from the dictionary. Next release should have all the highs and lows in the dictionary.
Looking forward to the highs and lows data. Especially temps and wind gusts. One other thought. Is it possible to limit the number of decimal places returned for real data elements? Its possible to do so in AppleScript, but is quite cumbersome. maybe something like "Extra Temp 1 as real with 2 places" or some such, or even a global setting.
_________________ Choose to chance the rapids.
Dare to dance the tide.
|
| Thu Sep 09, 2010 11:13 am |
|
 |
|
ereuter
Joined: Dec 15, 2009 Posts: 16 Location: Kittery, ME
|
 Re: WeatherTracker Library?
Thanks for the reply. I did manage to get most of it working with assistance from the After Ten forum. I'll download the beta and look at the library, though.
I second the request for limiting the number of decimal places. I'm getting temperatures that look like 64.500000001 or similar.
Thanks- Eric
|
| Thu Sep 09, 2010 11:49 am |
|
 |
|
AfterTenSoftware
Joined: Sep 09, 2010 Posts: 4
|
 Re: WeatherTracker Library?
OK, I added that as a request on my own forum.
|
| Thu Sep 09, 2010 12:50 pm |
|
 |
|
AlaskaDave
Joined: Oct 16, 2008 Posts: 215 Location: Juneau, Alaksa
|
 Re: WeatherTracker Library?
ereuter wrote:Thanks for the reply. I did manage to get most of it working with assistance from the After Ten forum. I'll download the beta and look at the library, though.
I second the request for limiting the number of decimal places. I'm getting temperatures that look like 64.500000001 or similar.
Thanks- Eric
Eric, I have the WMR100 in route for bringing indoor temp/humidity into Indigo and plan to use WeatherTracker as well due to being able to connect to two weather stations simultaneously. The plan is to have a Davis outside in the near future. Considering that you are using WeatherTracker and Indigo may I use you as a resource if questions crop up? I found your post soon after down loading 1.3.1 off of the site last night and not being able to see its Apple Script Library. I'll grab the copy above...
|
| Fri Sep 10, 2010 4:59 pm |
|
 |
|
ereuter
Joined: Dec 15, 2009 Posts: 16 Location: Kittery, ME
|
 Re: WeatherTracker Library?
I'm brand new at it. I just got my WMR200 installed on Saturday and WeatherTracker up and running. From various advice I found here at at the AfterTen forums, I am using the following script to extract a few bits of data and put them into variables. I'm really rusty with Applescript, so I'm not really sure what these classes are all about. I don't see them in the dictionary that is visible with the new beta. This script is working fine, though. - Code: Select all
tell application "WeatherTracker" set Wind_Speed_Avg to «class WINS» of «class WSTA» "Reuter" set Wind_Speed_Gust to «class WIGS» of «class WSTA» "Reuter" set Wind_Dir to «class WIND» of «class WSTA» "Reuter" set Out_Temp to «class OTMP» of «class WSTA» "Reuter" set Baro to «class CPRS» of «class WSTA» "Reuter" set Out_Humidity to «class OHUM» of «class WSTA» "Reuter" set Out_Dew to «class ODEW» of «class WSTA» "Reuter" end tell tell application "IndigoServer" set value of variable "Wind_Speed_Avg" to Wind_Speed_Avg set value of variable "Wind_Speed_Gust" to Wind_Speed_Gust set value of variable "Wind_Dir" to Wind_Dir set value of variable "Out_Temp" to Out_Temp set value of variable "Baro" to Baro set value of variable "Out_Humidity" to Out_Humidity set value of variable "Out_Dew" to Out_Dew end tell
|
| Fri Sep 10, 2010 8:22 pm |
|
 |
|
AlaskaDave
Joined: Oct 16, 2008 Posts: 215 Location: Juneau, Alaksa
|
 Re: WeatherTracker Library?
So, with my interest at tracking indoor temp/humidity from remote sensors should the following work? Also, the name in quotations (Kleins) is that the name given to your station, not so sure on this one. I should have my station in a few days but it would be nice to have a few things ironed out before it arrives so thanks for helping out. In looking a the syntax, I'm guessing that in the tell application IndigoServer section that the set value of variable is changing it from what it is in WeatherTracker to how you wanted it presented/stated in IndigoServer or do the two values have to be the same? - Code: Select all
tell application "WeatherTracker" set Extra_Humidity_1 to «class HUM1» of «class WSTA» "Kleins" set Extra_Temp_1 to «class TMP1» of «class WSTA» "Kleins" set Extra_Humidity_2 to «class HUM2» of «class WSTA» "Kleins" set Extra_Temp_2 to «class TMP2» of «class WSTA» "Kleins" end tell
tell application "IndigoServer" set value of variable "Extra_Humidity_1" to Garage_Humidity set value of variable "Extra_Temp_1" to Garage_Temp set value of variable "Extra_Humidity_2" to Crawl_Space_Humidity set value of variable "Extra_Temp_2" to Crawl_Space_Temp end tell
|
| Fri Sep 10, 2010 11:39 pm |
|
 |
|
AfterTenSoftware
Joined: Sep 09, 2010 Posts: 4
|
 Re: WeatherTracker Library?
A previous version had a bug and the dictionary didn't show up so you had to use the direct low-level class and property syntax. The latest beta fixes this problem so you don't have to use the direct designators anymore.
So you can use a code like... set Extra_Humidity_1 to Extra Humidity 1 of Station "Kleins"
|
| Fri Sep 10, 2010 11:47 pm |
|
 |
|
AlaskaDave
Joined: Oct 16, 2008 Posts: 215 Location: Juneau, Alaksa
|
 Re: WeatherTracker Library?
So the WMR100 is set up and collecting data. The station is called Klein Indoors and currently is set up to obtain data for internal temp/humidity from the console and one external sensor (sensor 1) called Garrett's Rm (see image attached). I've set up a date/time action with the following Apple Script embedded: - Code: Select all
tell application "WeatherTracker" set Extra_Temp_1 to Extra Temp 1 of Station "Klein Indoors" set Extra_Humidity_1 to Extra Humidity 1 of Station "Klein Indoors" end tell
tell application "IndigoServer" set value of variable "Extra Temp 1" to Garrett Temp set value of variable "Extra Humidity 1" to Garrett Humidity end tell
When compiled I get, "script error: Expected end of line but found identifier. (-2741) Any assistance would be greatly appreciated.
Attachments:
stationSnapShot.jpg [ 51.46 KiB | Viewed 644 times ]
Last edited by AlaskaDave on Tue Sep 21, 2010 12:12 am, edited 1 time in total.
|
| Mon Sep 20, 2010 11:09 pm |
|
 |
|
AlaskaDave
Joined: Oct 16, 2008 Posts: 215 Location: Juneau, Alaksa
|
 Re: WeatherTracker Library?
With a slight modification (below) I no longer see compile errors but a run-time error of: "script error: IndigoServer got an error: Can't set value of variable "Extra Temp 1" to "Garrett Temp". (-10006) - Code: Select all
tell application "WeatherTracker" set Extra_Temp_1 to Extra Temp 1 of Station "Klein Indoors" set Extra_Humidity_1 to Extra Humidity 1 of Station "Klein Indoors" end tell
tell application "IndigoServer" set value of variable "Extra Temp 1" to "Garrett Temp" set value of variable "Extra Humidity 1" to "Garrett Humidity" end tell
I noticed that in Indigo's Variable List it doesn't allow variables with spaces. In the case of Extra Temp 1, should my variable be named Garrett_Temp? When I changed these I got the same script error as above.
|
| Tue Sep 21, 2010 12:12 am |
|
 |
|
ereuter
Joined: Dec 15, 2009 Posts: 16 Location: Kittery, ME
|
 Re: WeatherTracker Library?
I think you have the variables reversed in the Indigo code. Garrett_Temp and Garrett_Humidity would be your Indigo variables. Try: - Code: Select all
tell application "WeatherTracker" set Extra_Temp_1 to Extra Temp 1 of Station "Klein Indoors" set Extra_Humidity_1 to Extra Humidity 1 of Station "Klein Indoors" end tell
tell application "IndigoServer" set value of variable "Garrett_Temp" to Extra_Temp_1 set value of variable "Garrett_Humidity" to Extra_Humidity_1 end tell
|
| Tue Sep 21, 2010 5:10 am |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6662 Location: Austin, Texas
|
 Re: WeatherTracker Library?
You should also not run that as an embedded script since it's doing a tell to another application - if something goes wrong with WeatherTracker it could stop the IndigoServer from processing. Save the script (from Script Editor) as a compiled script file and have Indigo run it as an external file.
_________________ Jay (Indigo Support)
|
| Tue Sep 21, 2010 7:33 am |
|
 |
|
AlaskaDave
Joined: Oct 16, 2008 Posts: 215 Location: Juneau, Alaksa
|
 Re: WeatherTracker Library?
Progress after changing above script to suggested. Now when I run the script I get the temperature variable but an error for humidity, it reads:
Time/Date Action: Indoor Temp & Humidity Error script error: around characters 289 to 349 Error script error: IndigoServer got an error: Can't set value of variable "Garrett_Humidity" to 69. (-10006)
Once I get the embedded script running I will attach as suggested, thanks for all your help... almost there!
|
| Tue Sep 21, 2010 8:51 am |
|
|