Weather
Jubal
Junior Member
I'm using a module that i foud here about weather but i can't make it to view as Dubai. zip code is not working? and dubai dont have zipcode. so how can i mange to work with dubai weather?
Comments
-
I found weather code in yahoo.this is what i get.
<!-- Yahoo! Weather Badge --><iframe allowtransparency="true" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0"
so how can i put it in my touchpane??? i only need dubai weather. -
There is nothing in that code snippet that specifies the location, it's all display data. You are going to have to figure out that the actual POST or GET command the web pages uses to call Dubai weather, and make it fit what the module implements. I've never used that particular module, so I can't be specific, but it's entirely possible it won't do international weather ... most services handle international and domestic weather differently.
-
DHawthorne wrote: »There is nothing in that code snippet that specifies the location, it's all display data
I think what he's referring to is the persistent "cZipCode" variable that is used in the 'GET_FORECAST-' command that is sent to the duet module. It appears to me that, whether you use the "SearchLocalID" or not, the module is designed to return and use a Zip Code.
Unfortunately, Jubal, I'd be willing to bet it was only designed to work with zip codes. No zip code, no weather. I'd try finding another weather module unless you can try, as DHawthorne suggests, to formulate the request yourself and hope that the duet module is designed to simply accept the data it gets whether it's the right zip code or not. -
Your best bet is to perform a HTTP 1.1 GET request from a local weather website and filter out the required information and then use dynamic or custom button graphics scraped from a website.
-
Your best bet is to perform a HTTP 1.1 GET request from a local weather website and filter out the required information and then use dynamic or custom button graphics scraped from a website.
yah i think this is the way i can do but my problem is i dont know how to get it from HTTP. im new in this programming career and didn't try to use web or HTTP to include in my touch panel or program -
HTTP Is accessed via a opening a network socket (use 0:3:0 or higher as your device, that opens a port on the NIC to use)
then use IP_CLIENT_OPEN to open a port, then SEND_STRING a crafted HTTP 1.1 GET response. If you're unsure how to do this, a few minutes of googling "raw HTTP request header" should get you what you need.
It should spit back a raw html file. Look through the HTML and look to see what information you will need to parse then just use FIND_STRING to get at it. If you get stuck, post some code up here. -
Check out Wireshark. It's an excellent tool for learning how devices are communicating over IP. It's actually what I used to learn how to GET a webpage.
-
Here's the actual W3C RFC on HTTP 1.1
http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html
It ends up being:
GET <URL> HTTP/1.1
for example,
GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1 -
Here's the actual W3C RFC on HTTP 1.1
http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html
It ends up being:
GET <URL> HTTP/1.1
for example,
GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1
sorry but i really dont have idea about HTTP. how can i edit the module i get to make it as dubai?? -
Pay someone else to write it?
-
nicholasjames wrote: »Pay someone else to write it?
thanks for your suggestion but i think i will talk to client not to include this one. -
I just posted a module I which does weather and controls the ENV-VST-C. Its over in the technical forum and called Y-Weather. It supports international location codes if you download the 0.96 version. Read the posts snd delete the dvRel reference which I forgot to remove.
Sent from my Kindle Fire using Tapatalk 2 -
-
thanks for this. i use it now. but still it only allow zipcode. when i put specific location like dubai, Error occure but when i put any number representing zipcode its working. also the picture display for weather icon didnt appear -
thanks for this. i use it now. but still it only allow zipcode. when i put specific location like dubai, Error occure but when i put any number representing zipcode its working. also the picture display for weather icon didnt appear
now its working. i go to weather.com and check for the number in the URL and put it in your zip/location and its working thanks -
the only thing that is not working is the display image for weather icon
-
Did you load the sample panel? The sample panel contains all of the images. The Viewstat images will just work based on code obviously.
Sent from my Kindle Fire using Tapatalk 2 -
If you are just copying and pasting the pages, you'll need to export all of the weather images from the sample panel resource manager and then import them into your panel.
Sent from my Kindle Fire using Tapatalk 2 -
If you are just copying and pasting the pages, you'll need to export all of the weather images from the sample panel resource manager and then import them into your panel.
Sent from my Kindle Fire using Tapatalk 2
yah i only copy paste it. ok i will try it tom. thanks for your code. -
Thanks for this, very nicely done : )
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums