Local Weather APP in Home Automation...

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
Mike Yeager
Posts: 160
Joined: 03 May 2014 07:02

Local Weather APP in Home Automation...

Post 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?
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Local Weather APP in Home Automation...

Post 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
Mike Yeager
Posts: 160
Joined: 03 May 2014 07:02

Re: Local Weather APP in Home Automation...

Post 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. :-(
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Local Weather APP in Home Automation...

Post by pz1 »

What are you exactly looking for?
Mike Yeager
Posts: 160
Joined: 03 May 2014 07:02

Re: Local Weather APP in Home Automation...

Post 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....
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Local Weather APP in Home Automation...

Post 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.
Post Reply