HomeGenie Forum

General Category => Troubleshooting and Support => Topic started by: bruce-t on May 07, 2015, 04:58:47 PM

Title: weather underground config
Post by: bruce-t on May 07, 2015, 04:58:47 PM
Where are the configuration parameters for weather underground widget define – like the format for the city/state.  I obtained an API key, but it still will not update to the current conditions
Title: Re: weather underground config
Post by: dani on May 07, 2015, 05:07:41 PM
You have to give the name of your City with your Country separate by comma.
For exemple : Paris,France
Be carrefull, if your city is not record in weather underground, it will not work. In that case you need to choice a greater city near you home.
Title: Re: weather underground config
Post by: bkenobi on May 07, 2015, 05:16:53 PM
I would recommend using a web browser to verify that your city provides a .json file with all the information HG will look for.  Just put the full url that HG grabs in your web browser and replace things like location, language, API code, etc.  If the file is mostly empty, try a different location.

Oh, and if you haven't already tried, check out the other weather widget.  I have stopped using the WU tool once the other script was provided since it provided better data for my location and didn't require API setup.
Title: Re: weather underground config
Post by: marc on June 16, 2015, 08:19:07 PM
Hi,

I use for my weather underground config not the name of my city, but i use the name of the weather station. In the past i have the same problem with my city name, because the name was not unique enough.
You can look on the weather underground map, which weather station is the next in your area. You can fillout the location field with this station name leading pws:"weather station name". Pws stands for the name of the weather station instead of the location/city name. It works.

Best regards

Marc
Title: Re: weather underground config
Post by: sylwester_r on September 10, 2015, 05:46:49 PM
Hi,

I have configured pws like Marc suggested but after saving and restarting the module I can see in the HG log:

2015-09-10T17:41:52.4763730+02:00       HomeAutomation.HomeGenie.Automation     34      Automation Program      Program.Notification    {"Title":"Weather Underground ERROR!","Message":"Unable to get data from service. Cannot perform member binding on `null' value"}

and the API key I have entered.... any ideas?
Title: Re: weather underground config
Post by: nolio on September 10, 2015, 10:25:43 PM
Are you sure the data value :
Title: Re: weather underground config
Post by: sylwester_r on September 11, 2015, 10:13:45 AM
Hi Nolio,

Thanks for suggestion... I actually dig into the widget program code and took the URL from it and tried to manually, similarly what you suggested, to get the data and in fact I was using wrong API key. After I have changed the API key to the correct one (it was working at least in "manual fetch") I have applied it and .... initially nothing changed but after few restarts I started getting:

2015-09-10T18:45:13.0621710+02:00       HomeAutomation.HomeGenie.Automation     34      Automation Program      Program.Notification    {"Title":"Weather Underground ERROR!","Message":"Unable to get data from service. `string' does not contain a definition for `moon_phase'"}

I tried to look for the reason, shortly, but gave up for the day and today, I just looked into the logs and I can see:

2015-09-11T07:23:53.9925170+02:00       HomeAutomation.HomeGenie.Automation     34      Automation Program      Program.Notification    {"Title":"Weather Underground ERROR!","Message":"Unable to get data from service. `string' does not contain a definition for `moon_phase'"}
2015-09-11T07:54:04.9662220+02:00       HomeAutomation.HomeGenie.Automation     34      Automation Program      Program.Notification    {"Title":"Weather Underground ERROR!","Message":"Unable to get data from service. `string' does not contain a definition for `moon_phase'"}
2015-09-11T08:24:16.2370970+02:00       HomeAutomation.HomeGenie.Automation     34      Automation Program      Program.Notification    {"Title":"Weather Underground ERROR!","Message":"Unable to get data from service. `string' does not contain a definition for `moon_phase'"}
2015-09-11T08:57:15.2850200+02:00       HomeAutomation.HomeGenie.Automation     34      Automation Program      Program.Notification    {"Title":"Weather Underground","Message":"Updated."}
2015-09-11T09:27:19.2100260+02:00       HomeAutomation.HomeGenie.Automation     34      Automation Program      Program.Notification    {"Title":"Weather Underground","Message":"Updated."}
2015-09-11T09:57:22.9621560+02:00       HomeAutomation.HomeGenie.Automation     34      Automation Program      Program.Notification    {"Title":"Weather Underground","Message":"Updated."}


My jaw bounced off the floor, my eyes become of size of 2 euro coin and I asked myself: WTF???!!!

I can see now the details of the current conditions and the forecast... I am only wondering how long will it work...
I have also noticed in the log a lot of periodic errors of SQLite like this:
2015-09-11T10:01:36.7019400+02:00       HomeAutomation.HomeGenie        Service.StatisticsLogger        SQLite error
table ValuesHist has 6 columns but 7 values were supplied       Exception.StackTrace      at System.Data.SQLite.SQLite3.Prepare (System.Data.SQLite.SQLiteConnection cnn, System.String strSql, System.Data.SQLite.SQLiteStatement previous, UInt32 timeoutMS, System.String& strRemain) [0x00000] in <filename unknown>:0
  at System.Data.SQLite.SQLiteCommand.BuildNextCommand () [0x00000] in <filename unknown>:0


That's why I am wondering how long will my WU plugin work....
Did you guys have similar SQLite error? Or maybe similar WU widget errors regarding the moon phase?
Title: Re: weather underground config
Post by: dani on September 11, 2015, 02:37:46 PM
You have to replace your database file by the new one. Now each row has 7 columsinstead of 6.
Look at that item :
http://www.homegenie.it/forum/index.php?topic=976.msg5968#msg5968 (http://www.homegenie.it/forum/index.php?topic=976.msg5968#msg5968)

Cheers
Dani
Title: Re: weather underground config
Post by: bkenobi on September 11, 2015, 04:55:41 PM
I saw that error with "moon_phase" or similar in the past.  I looked at the data the server was sending back and found that not all data fields were available from all weather stations.  I don't know if that's your problem here, but it might be something worth noting.  Full weather stations (government/schools/etc) have all fields available.  Personal systems only report a subset of the full information that could be provided and so not everything will be sent in the json file (or at least that's my suspicion).