HomeGenie Forum

General Category => Troubleshooting and Support => Topic started by: petediscrete on December 17, 2015, 12:25:55 AM

Title: Weather Underground stopped working
Post by: petediscrete on December 17, 2015, 12:25:55 AM
Foe no apparent reason Weather Underground has stopped working. The following error code reported: "Unable to get data from service.Argument out of range. Parameter name: index.". I've made no changes to the program or my details on Wunderground. Any ideas on this problem.
Title: Re: Weather Underground stopped working
Post by: petediscrete on December 17, 2015, 12:44:10 AM
Just updated to latest version r507 and everything working again
Title: Re: Weather Underground stopped working
Post by: codedmind on December 20, 2015, 06:26:45 PM
To me stop working after update to 1.1 always get the monn_phase error

Code: [Select]
Program.Notification = "{"Title":"Weather Underground ERROR!","Message":"Unable to get data from service. `string' does not contain a definition for `moon_phase'"}"
Title: Re: Weather Underground stopped working
Post by: petediscrete on December 22, 2015, 01:50:35 PM
It's been a bit flaky for me since updating to 1.1 r505. I'm going to have a closer look to see what the problem is when I get the time.
Title: Re: Weather Underground stopped working
Post by: codedmind on January 07, 2016, 09:40:50 AM
Any find about the problem?
Title: Re: Weather Underground stopped working
Post by: kevin1 on January 07, 2016, 12:48:38 PM
WeatherUnderground working in r505 for me.  I have @Sunset @Sunrise controlling my landscape lights, I just checked yesterday after work and they were off during the day, and then on this morning before sunrise.  Maybe log into weatherunderground site and check your key?
Title: Re: Weather Underground stopped working
Post by: Michel on January 07, 2016, 01:07:52 PM
I run HG on Raspberry Pi and I got the "moon_phase" error yesterday after upgrading to r511. I tried to restart Weather Underground several times with no luck. I finally reboot the Raspberry and WU has been OK since.
Title: Re: Weather Underground stopped working
Post by: bkenobi on January 07, 2016, 04:07:31 PM
I've gotten the moon_phase error too.  I don't think it's a field included in all cities for some reason.
Title: Re: Weather Underground stopped working
Post by: howardtopher on January 12, 2016, 05:01:47 AM
I'm getting the same error.  Running r512 now.  It was working fine on r511 and broke after I ran the update.
Title: Re: Weather Underground stopped working
Post by: Britton on January 18, 2016, 06:41:04 AM
Haven't gotten it to work after updating to r512.  Get an "cannot perform runtime binding with a null reference."
Title: Re: Weather Underground stopped working
Post by: Britton on January 21, 2016, 06:31:01 PM
Weather Underground is now working OK with v 512.  I forgot that the city is formatted:  " TX/Dallas "
Title: Re: Weather Underground stopped working
Post by: codedmind on March 10, 2016, 11:44:36 PM
The problem of moon_phase could be the _ ?

I'm getting the string error, but the moon_phase exist in the object... could this be a raspeberry/c# issue?
Title: Re: Weather Underground stopped working
Post by: codedmind on March 11, 2016, 12:13:49 AM
This is stupid... but i can0't put it to work. I assume the issue is with the rpi plus hg version + mono... can't figure it :(

Code: [Select]
var iplocation = Net.WebService("http://freegeoip.net/json/").GetData();
Program.RaiseEvent("IP to IP", iplocation,"");
Program.RaiseEvent("IP to City", iplocation.city,"");
Output
Code: [Select]
23:10:47.305 Program.Notification {"Title":"IP ERROR!","Message":"Unable to get data from service. `string' does not contain a definition for `city'"}
23:10:47.248 IP to IP {"ip":"188.37.44.66","country_code":"PT","country_name":"Portugal","region_code":"02","region_name":"Beja","city":"Quinta","zip_code":"","time_zone":"Europe/Lisbon","latitude":37.4903,"longitude":-7.8659,"metro_code":0}
Title: Re: Weather Underground stopped working
Post by: cbb on March 14, 2016, 09:40:40 PM
I have the same problem, began a few days ago.
Did Weatherunderground change the interface slightly?
Title: Re: Weather Underground stopped working
Post by: bkenobi on March 14, 2016, 10:02:48 PM
I had an issue with WU a while back.  I looked at the json file that HG was pulling and figured out the issue.  I don't recall the problem I had (most likely unrelated), but I'd recommend looking at the file that is served by WU to verify it's formatted as expected and contains the right information.
Title: Re: Weather Underground stopped working
Post by: petediscrete on March 14, 2016, 10:06:17 PM
A program restart while the Web API is running usually solved the problem
Title: Re: Weather Underground stopped working
Post by: cbb on March 15, 2016, 09:11:55 PM
Did not help for me.
Title: Re: Weather Underground stopped working
Post by: nolio on March 15, 2016, 10:26:25 PM
Hi cbb,

I have the same problem, began a few days ago.
Did Weatherunderground change the interface slightly?


WeatherUnderground still work on my side ... So probably no interface change ..
Did you try to get the json like ?
http://api.wunderground.com/api/ (http://api.wunderground.com/api/)<your api key>/geolookup/astronomy/lang:<your lang>/q/<your town>.json
Title: Re: Weather Underground stopped working
Post by: cbb on March 16, 2016, 06:46:54 PM
The response looks ok, this is the section around moon_phase:

   "id":"ITRAISKI21",
      "lat":48.008183,
      "lon":16.251448,
      "distance_km":4,
      "distance_mi":2
      }
      ]
      }
      }
   }
      ,   "moon_phase": {
      "percentIlluminated":"61",
      "ageOfMoon":"8",
      "phaseofMoon":"First Quarter",
      "hemisphere":"North",
      "current_time": {
      "hour":"18",
      "minute":"25"
      },
      "sunrise": {
      "hour":"6",
      "minute":"05"
      },
      "sunset": {
      "hour":"18",
      "minute":"02"
      },
      "moonrise": {
      "hour":"11",
      "minute":"14"
      },
      "moonset": {
      "hour":"1",
      "minute":"42"
      }
   },


There is a tab directly before moon_phase, perhaps this causes the trouble?

HG complains "...'string' does not contain a definition for 'moon_phase'"
Title: Re: Weather Underground stopped working
Post by: codedmind on March 16, 2016, 10:53:49 PM
@ccb what version do you have?
I solve my problem doing a backup then install the latest version and restore, the modules/plugins are updated and now it works, i can't understand why, but i loose the string error...

I do some debug in the previous version and some cities work in hg others don't but using the same request via a browser always works, i give up and install the latest version..

My best option is that the problem is somewhere inside a file that hg or mono use the  get the values, because the simple example of json get isn't working in my previous version...
Title: Re: Weather Underground stopped working
Post by: cbb on March 28, 2016, 09:25:00 AM
Sorry for the late reply, was on a business trip.

The version I am using is 1.1.r514.
The strange thing is: it already worked. I also tried different locations but now no request finishes without the moon_phase error.