View Full Version : Weather
October 13th, 2002, 03:55 PM
You'll need to edit the ZIP code in the command line passed by Execute to the script in order to get weather where you are.
October 13th, 2002, 03:55 PM
Here is an update for LUA, which effectively removed integer valued registers.
November 11th, 2002, 09:28 AM
I have the weather script working for me. Their seems to be a problem with the load reg destroying other girder registers/variables. Unfortunately, I do not know java at all. BUT, wouldn't it be simpler to have the java script write a text file that is then opened and parsed using LUA?
November 11th, 2002, 08:20 PM
When the script was first written, file parsing wasn't possible in GVMS. It is now and you're right that it would be more robust to do it that way. I don't really think it would be simpler, though.
Perhaps if Girder had a Merge Registers, as well as Load Registers, that didn't clobber variables not mentioned in the file, trouble could be avoided.
November 11th, 2002, 09:08 PM
SOMEONE :) I wonder who....
I really like the weather for my VFD but current save/load reg kills my other scripts.
I guess I could use LUA to parse the current wthr.xml file instead. If I get around to it I will let you know.
November 11th, 2002, 09:28 PM
I guess it might be possible to implement the whole thing in Lua using the LuaSockets plugin.
Just a thought...
November 17th, 2002, 06:34 PM
I wrote a lua program to parse the xml file rather then load the registers. BUT :) It would be nice if the weather script just wrote a simple text file with the variable names and results. The script fails if there is no preexisting register file saved by girder. It would make the scipt more robust if the if gider could call the program with a temp filename. I would also change the script to return payload to girder with the name of the tempfile and the accid id used to get the data. I have a complicated lua script that retrieves the weather from 3 locations but it requires a lot of check to make sure there that a only one weather request is run at a time. It should be quick and easy but I simply don't know javascipt at all. I had a look at the online documentation and well, it will take me a weekend at least..
BTW have you had a chance to play around with the lcd screen manager?
November 20th, 2002, 09:26 PM
I made the changes to the javascipt myself. I will send them to you to look at.
December 9th, 2002, 07:07 PM
I've continued revising weather along the lines that you've started, eliminating XML and temporary files altogether. I've allowed the script to fetch more than one location at a time and made the GML keep track of several states in a table, as you did. I wasn't sure of the best way to share this state with the rest of Girder, so I stuck to global variables for the latest. I imagine that once there is "standard" support for cycling through multiple screens, the best approach will become clearer. And no, I haven't forgotten about the LCD script. Other things have been demanding time.
December 9th, 2002, 08:56 PM
Looking good. Didn't realize that girder could take so many pld variables :)
January 2nd, 2003, 05:04 AM
I have the weather and MBM stuff all working nicely, except that it overwrites active appliations using the display.
I thought that according to your demo GML file MBM and weather are only displayed of the display is idle.
January 3rd, 2003, 09:23 AM
The idle handling depends on the event handlers for the other applications clearing the idle flag. In the sample GML scripts, there is an Open command that sets Idle to nil and clears the screen if it was non-nil. And a corresponding Close command that clears the screen and sets Idle to 1. What application is having conflicts? Do you have similar logic in your GML file?
January 3rd, 2003, 10:46 AM
OK, I get it now. :oops:
I didn't realize that 'idle' was a variable. I see now how it is set and reset. I'll play around with this a bit more. After looking at all the links and jumps in your example I might be better off starting with that and importing my stuff.
March 3rd, 2003, 06:30 PM
Where can I find these files?
March 8th, 2003, 05:13 PM
The DVDSpy distribution contains the Weather.js script and a DVD2LCD2.gml Girder file with a Weather group that uses it.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.