Local Weather APP in Home Automation...
-
- Posts: 160
- Joined: 03 May 2014 07:02
Local Weather APP in Home Automation...
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...
Locate this piece of code in the index.js of the moduleMike 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?
Code: Select all
this.timer = setInterval(function() {
self.fetchWeather(self);
}, 3600*1000);
self.fetchWeather(self);
};
To get the the temperature you call something like (not tested)
Code: Select all
http://raspberry:8083/ZAutomation/api/v1/devices/OpenWeather_XX
-
- Posts: 160
- Joined: 03 May 2014 07:02
Re: Local Weather APP in Home Automation...
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...
What are you exactly looking for?
-
- Posts: 160
- Joined: 03 May 2014 07:02
Re: Local Weather APP in Home Automation...
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...
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.