Page 1 of 1
Local Weather APP in Home Automation...
Posted: 10 Aug 2015 19:56
by Mike Yeager
I have the local weather APP running and would like to know if it's possible to retrieve the information from it via an HTTP call? Also, can it be set to poll at a given interval or is it set at a default (appears to be 1hr) that can't be changed?
Re: Local Weather APP in Home Automation...
Posted: 10 Aug 2015 20:12
by pz1
Mike Yeager wrote:I have the local weather APP running and would like to know if it's possible to retrieve the information from it via an HTTP call? Also, can it be set to poll at a given interval or is it set at a default (appears to be 1hr) that can't be changed?
Locate this piece of code in the index.js of the module
Code: Select all
this.timer = setInterval(function() {
self.fetchWeather(self);
}, 3600*1000);
self.fetchWeather(self);
};
The interval is set at 3600 seconds
To get the the temperature you call something like (not tested)
Code: Select all
http://raspberry:8083/ZAutomation/api/v1/devices/OpenWeather_XX
where XX is the virtual device number
ID in your system
Re: Local Weather APP in Home Automation...
Posted: 12 Aug 2015 22:32
by Mike Yeager
Thaks. I'll try this and see what happens. I'm learning that Openweather may not give me what I'm looking for though.

Re: Local Weather APP in Home Automation...
Posted: 13 Aug 2015 09:44
by pz1
What are you exactly looking for?
Re: Local Weather APP in Home Automation...
Posted: 13 Aug 2015 19:46
by Mike Yeager
I was looking to pull the current weather conditions locally about once a minute for a real time display. Right now I have sensors for it but they aren't real accurate....
Re: Local Weather APP in Home Automation...
Posted: 13 Aug 2015 19:57
by pz1
I am not sure if the public weather stations do update that frequently. Also the providers of free weather services may not like it if you do pull to often. I am using Wunderground.com myself. A free account there does allow you to catch it only 6 times per hour.