Please login or register.

Login with username, password and session length
Pages: [1] 2 3 4

Author Topic: Net.WebService GetData() problem after Raspberry Pi update  (Read 15363 times)

soxfan1966

  • Hero Member
  • *****
  • Helpful Post Rating: 3
  • Posts: 388

Good morning,

As I periodically do, I checked for updates for my Raspberry Pi this morning.  Seeing these seemed to be an update (see here:  https://www.raspberrypi.org/downloads/) I went thru the process of using Putty to connect to my Pi and then go thru the update.

Everything appeared to work fine, and it boots and HG Loads.

However, I am getting an error with the Weather Widget now - its reported that it cannot find "sys" in a string - but after some troubleshooting, appears that this command in the Weather program (both the "standard" and my updated version):

var weatherData = Net.WebService(webserviceurl_conditions).GetData();

is no longer returning any data, so when the rest of the program tries to parse the results it ends up with the missing sys error.

If you add this line:
Program.Notify("weatherData = " + weatherData);

to the weather program right after the line above, and then under Maintenence options turn on Event History you can see that weatherData is nil - it should be a list of data returned from the OpenWeatherMap API call.

I'm not sure if perhaps the Net.WebService on the pi was not started / enabled after the update, or if something in the update changed / broke how that is supposed to work.  But I'm hoping someone here may have an answer (or even a suggestion).

Thanks :)
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751
Re: Net.WebService GetData() problem after Raspberry Pi update
« Reply #1 on: May 30, 2020, 08:28:52 AM »

Have you tried restarting OW. Have you tried recompiling the OW Program, saving it, disabling and re enabling it. I have seen this problem before usually when the OW server was playing up and the call was returning a null value. As it’s a HG specific issue and not an X10 one you’re probably best reporting it over on HomeGenie.Club.
Logged

soxfan1966

  • Hero Member
  • *****
  • Helpful Post Rating: 3
  • Posts: 388
Re: Net.WebService GetData() problem after Raspberry Pi update
« Reply #2 on: May 30, 2020, 08:31:15 AM »

Yes, tried restarting the program and also recompiling.  Also did a restart of the pi.  None of that fixed the problem.
Logged

soxfan1966

  • Hero Member
  • *****
  • Helpful Post Rating: 3
  • Posts: 388
Re: Net.WebService GetData() problem after Raspberry Pi update
« Reply #3 on: May 30, 2020, 08:47:38 AM »

I posted the same question / problem over on the HG Club site too.
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751
Re: Net.WebService GetData() problem after Raspberry Pi update
« Reply #4 on: May 30, 2020, 09:39:31 AM »

I posted the same question / problem over on the HG Club site too.

Have you tried to make any of those calls manually via a browser bar. I don’t use the OW program program in HG but I’ll enable it and have a look. What version of Mono are you using. Is it definitely the Stable Release. Are you running upgrade or dist-upgrade when updating your system.
Logged

soxfan1966

  • Hero Member
  • *****
  • Helpful Post Rating: 3
  • Posts: 388
Re: Net.WebService GetData() problem after Raspberry Pi update
« Reply #5 on: May 30, 2020, 09:41:30 AM »

Yes, I made the same API calls via the browser and they work fine.  The weather program was also getting results before I updated the OS.  I'm wondering if a service didn't start.
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751
Re: Net.WebService GetData() problem after Raspberry Pi update
« Reply #6 on: May 30, 2020, 09:54:49 AM »

Yes, I made the same API calls via the browser and they work fine.  The weather program was also getting results before I updated the OS.  I'm wondering if a service didn't start.

Ok I'm getting the same error. I reckon there's a problem at the OW server end. If calls are working via a browser bar the only logical explanation would be an issue validating the key via HG. Changes in security certs can sometimes throw an error like this, but I haven't updated in a while so updating is unlikely to be the source of your problem. I'd give it a while before carrying out any major surgery on your system. Bear in mind you're modifying that program quite a bit too.
Logged

soxfan1966

  • Hero Member
  • *****
  • Helpful Post Rating: 3
  • Posts: 388
Re: Net.WebService GetData() problem after Raspberry Pi update
« Reply #7 on: May 30, 2020, 09:57:52 AM »

Ok, thanks for checking - I was getting the same error on the standard OW program too (I thought it was something I did at first).   I'm out for the day now so will check it later.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10523
  • I don't work for X10, I use it successfuly!
Re: Net.WebService GetData() problem after Raspberry Pi update
« Reply #8 on: May 30, 2020, 01:29:54 PM »

I'm at my off grid place and a bit behind with my updates. You may wish to check the jkutils open weather map program just to see if it distributes the same behavior.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751
Re: Net.WebService GetData() problem after Raspberry Pi update
« Reply #9 on: May 30, 2020, 04:09:48 PM »

I'm at my off grid place and a bit behind with my updates. You may wish to check the jkutils open weather map program just to see if it distributes the same behavior.

Is your OW program throwing the same error. The problem isn’t updating as I haven’t done a system update in quite a while. Try restarting your OW program to see if it is fetching current forecasts. OW have made changes recently to their api which clearly won’t get picked up unless the author or someone else edits the OW program in HG to reflect this. From what I can gather the last valid call HG made to OW was at 06.30 your time this morning.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10523
  • I don't work for X10, I use it successfuly!
Re: Net.WebService GetData() problem after Raspberry Pi update
« Reply #10 on: May 30, 2020, 05:21:02 PM »

Just logged on to my HG and your correct last update time for OW was 6:41 am today.   :-[
I should have paid more close attention when I pulled it up last.   :-[
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

soxfan1966

  • Hero Member
  • *****
  • Helpful Post Rating: 3
  • Posts: 388
Re: Net.WebService GetData() problem after Raspberry Pi update
« Reply #11 on: May 30, 2020, 05:39:39 PM »

I can make the same API calls for conditions and forecasts from a browser with no errors and data returned.

If the api changes you refer to at for one all, that also works (I'm using that in addition to the other calls for historical rain data).

The issue seems to be the API calls from within HG using the Net.WebService calls - there is no error in the program when you compile but when it runs you get the missing sys reported because there is no weather data to parse.

I tried again while ago and same error happened.  But it appears others, who did not update their OS are getting the same error so it does not appear related to that.


I'm at my off grid place and a bit behind with my updates. You may wish to check the jkutils open weather map program just to see if it distributes the same behavior.

Is your OW program throwing the same error. The problem isn’t updating as I haven’t done a system update in quite a while. Try restarting your OW program to see if it is fetching current forecasts. OW have made changes recently to their api which clearly won’t get picked up unless the author or someone else edits the OW program in HG to reflect this. From what I can gather the last valid call HG made to OW was at 06.30 your time this morning.
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751
Re: Net.WebService GetData() problem after Raspberry Pi update
« Reply #12 on: May 30, 2020, 06:25:44 PM »

I can make the same API calls for conditions and forecasts from a browser with no errors and data returned.

If the api changes you refer to at for one all, that also works (I'm using that in addition to the other calls for historical rain data).

The issue seems to be the API calls from within HG using the Net.WebService calls - there is no error in the program when you compile but when it runs you get the missing sys reported because there is no weather data to parse.

I tried again while ago and same error happened.  But it appears others, who did not update their OS are getting the same error so it does not appear related to that.


I'm at my off grid place and a bit behind with my updates. You may wish to check the jkutils open weather map program just to see if it distributes the same behavior.

Is your OW program throwing the same error. The problem isn’t updating as I haven’t done a system update in quite a while. Try restarting your OW program to see if it is fetching current forecasts. OW have made changes recently to their api which clearly won’t get picked up unless the author or someone else edits the OW program in HG to reflect this. From what I can gather the last valid call HG made to OW was at 06.30 your time this morning.

There's been no changes to HG (obviously). I've not updated HG recently but from what I've been able to determine from other users is that OW stopped fetching weather forecast updates via HG earlier today. The only logical explanation is that there's been some form change in how OW is handling 3rd party service calls to their server. Yes you're API key is working fine from your browser but if their server is not validating the HG app this may be the issue. Best at this stage if you post this problem over at Genes GitHub and see if he responds to it. That's a problem you'll encounter when an app like HG is not regularly maintained.
Logged

soxfan1966

  • Hero Member
  • *****
  • Helpful Post Rating: 3
  • Posts: 388
Re: Net.WebService GetData() problem after Raspberry Pi update
« Reply #13 on: May 30, 2020, 06:55:10 PM »

I posted a new issue over on GitHub
https://github.com/genielabs/HomeGenie/issues/403
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10523
  • I don't work for X10, I use it successfuly!
Re: Net.WebService GetData() problem after Raspberry Pi update
« Reply #14 on: May 30, 2020, 06:58:14 PM »

Since I currently only have access via my phone it is difficult to  do much digging. However I was able to load the jkutils open weather version and it works so it would be worth looking into its code for comparisons.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!
Pages: [1] 2 3 4
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.