more G-Labs products

Author Topic: weather underground config  (Read 2538 times)

May 07, 2015, 04:58:47 PM
Read 2538 times

bruce-t

  • *
  • Information
  • Newbie
  • Posts: 5
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

May 07, 2015, 05:07:41 PM
Reply #1

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
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.

May 07, 2015, 05:16:53 PM
Reply #2

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
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.

June 16, 2015, 08:19:07 PM
Reply #3

marc

  • *
  • Information
  • Newbie
  • Posts: 5
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

September 10, 2015, 05:46:49 PM
Reply #4

sylwester_r

  • *
  • Information
  • Newbie
  • Posts: 4
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?

September 10, 2015, 10:25:43 PM
Reply #5

nolio

  • *****
  • Information
  • Global Moderator
  • Posts: 544
Are you sure the data value :

September 11, 2015, 10:13:45 AM
Reply #6

sylwester_r

  • *
  • Information
  • Newbie
  • Posts: 4
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?

September 11, 2015, 02:37:46 PM
Reply #7

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
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

Cheers
Dani

September 11, 2015, 04:55:41 PM
Reply #8

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
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).