Re: Getting weather data from Weather Display
Posted: Tue Feb 09, 2010 10:37 am
jimM wrote:Do you think it could be configured either at the WD end (via POST) or in Indigo as I'm sure users would have many different reasons as I for wanting different intervals. Also, just for my own info, WD does a lot of posting to other websites both through file transfer and through a URL which the user actually selects some parameters as well as the timing, so could the plugin be like a "listener" that once active, just listens for posts from WD to a port (tcp or otherwise) then sets and or creates/sets the variable? or am I way off base here.
That's exactly how the LWC plugin works. It's just a URL in IWS that receives a POST or GET, takes the values from the HTTP request, and populates Indigo variables with the value. So no polling because it's passive until something else (LWC, WD, etc) hits the URL with data. If WD's generic POST/GET mechanism can be set up to post once a minute, then that's great.
I don't believe I made it completely general (like the AppleScript for instance - to autocreate variables), but a bit of work could probably do something like that. That plugin, in fact, could be made into a general purpose POST/GET catcher - anything posted to the plugin could get autopopulated - although I think I'd rather have only specific values inserted rather than random values updated.
BTW, since IWS plugins are really just Python code, anyone can write them - and any of the plugins you download will have the source clearly visible/editable (including LWC) so it doesn't take us doing anything - rename and update the LWC plugin as you (or anyone else) sees fit.