Net.WebService GetData() problem after Raspberry Pi update

Started by soxfan1966, May 30, 2020, 07:35:58 AM

Previous topic - Next topic

soxfan1966

The JK utils program does not make an API call - it uses the latitude and longitude user defined values and then a bunch of math calculations to get the data.   The issue with the weather program is the API call does not have any data returned.

I'm going to try another API call in a HG program to something like ifttt when I get a min - probably tomorrow.  Something I want to play with anyway and I can verify if it may be an HG thing or just a weather API call issue.

Tuicemen

Quote from: soxfan1966 on May 30, 2020, 07:04:46 PM
The JK utils program does not make an API call - it uses the latitude and longitude user defined values and then a bunch of math calculations to get the data.   The issue with the weather program is the API call does not have any data returned.

I'm going to try another API call in a HG program to something like ifttt when I get a min - probably tomorrow.  Something I want to play with anyway and I can verify if it may be an HG thing or just a weather API call issue.
actualy it does use the api & key, you maybe confusing the open weather program with the other jkutils program which does math to calculate dusk dawn.
Please Read Topic:
General Forum Etiquette
Before you post!

soxfan1966

Ahh, yes you are correct.  I don't have the JK utils weather program to look at however.

petera

Quote from: Tuicemen 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.

You can restart OW program via the phone. Have you done this. What are you using for weather. Are you using the OW that comes as standard with HG. I don't use OW but am trying to help soxfan1966 troubleshoot his issue.

soxfan1966

Both the standard OpenWeather program and my version have the same issue.  I have confirmed that.  I do not have the same the JK utils weather program.   But I looked on GitHub and the version I saw there uses the same Net.WebService call as the other two programs.

petera

Quote from: soxfan1966 on May 30, 2020, 07:23:57 PM
Ahh, yes you are correct.  I don't have the JK utils weather program to look at however.

I dont use jkutils but as far as I remember it stopped working a while back. It hadn't been updated in quite a while. I'm interested to see that it's still working now. Maybe @bkenobi might have a bit more detail on this. You've put a lot of work into OW recently so I'd like to see this problem resolved for you. If you haven't posted the OW code over on HomeGenie.Club it might be worth doing so. Remember it's not included in the HGBE version of HG.

petera

Quote from: soxfan1966 on May 30, 2020, 07:50:31 PM
Both the standard OpenWeather program and my version have the same issue.  I have confirmed that.  I do not have the same the JK utils weather program.   But I looked on GitHub and the version I saw there uses the same Net.WebService call as the other two programs.

Yes thats why I was surprised to see jkutils was still working.

Tuicemen

Quote from: petera on May 30, 2020, 07:53:49 PM
Quote from: soxfan1966 on May 30, 2020, 07:50:31 PM
Both the standard OpenWeather program and my version have the same issue.  I have confirmed that.  I do not have the same the JK utils weather program.   But I looked on GitHub and the version I saw there uses the same Net.WebService call as the other two programs.

Yes thats why I was surprised to see jkutils was still working.
I was surprised to see it reporting correctly myself. I have no problem restarting OW what I was referring to was the inability to play with code sorry I wasn't  more clear.
Please Read Topic:
General Forum Etiquette
Before you post!

petera

Quote from: Tuicemen on May 30, 2020, 08:06:21 PM
Quote from: petera on May 30, 2020, 07:53:49 PM
Quote from: soxfan1966 on May 30, 2020, 07:50:31 PM
Both the standard OpenWeather program and my version have the same issue.  I have confirmed that.  I do not have the same the JK utils weather program.   But I looked on GitHub and the version I saw there uses the same Net.WebService call as the other two programs.

Yes thats why I was surprised to see jkutils was still working.
I was surprised to see it reporting correctly myself. I have no problem restarting OW what I was referring to was the inability to play with code sorry I wasn't  more clear.

So you’re saying that the OW program is fetching updated forecasting for you. That’s interesting. You’re the only one reporting back that it’s working for so far. When is the last time you did a system update system.

soxfan1966

Looked a bit again this morning.   The GetData() command appears to be defined in the HG code, which I can't see.  There is also a Get Bytes() command that is supposed to return a server code.  This from the helper doc:
https://genielabs.github.io/HomeGenie/api/ape/class_home_genie_1_1_automation_1_1_scripting_1_1_net_helper.html

However, that returns nil too.

Not sure what to do at this point.


Tuicemen

@petera my HG included OW doesn't  update, it hasn't  since 6:41 am yesterday.
However the jkutils openweather program does update though not as accurate as Genes version was. Temperature is off by +3°C I'll have to sèe if it is pulling from same station.
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

I managed to view the jkutils pull request and it does use net.webservice  getdata command as well but works, so  I believe there is something else at play here.
Please Read Topic:
General Forum Etiquette
Before you post!

soxfan1966

Over on GitHub, Gene looked into it and found the issue to be the certificate on the OpenWeatherMap side expired.  You can see the details here
https://github.com/genielabs/HomeGenie/issues/403

Tuicemen

I emailed OpenWeatherMap support to see when and if we can expect this  to be renewed.
Please Read Topic:
General Forum Etiquette
Before you post!

petera

As I suspected in my Reply #6 the problem appears to be a validation issue on the OW end. If any program stops working suddenly and so widespread it usually points to security certs issues. According to Genes reply to @soxfan1966 in the GitHub certs did expire on the OW end on May 30 so that would indeed confirm my suspicions. It's now a case of OW updating their security store. I have no doubt that other applications using OW as their weather source will flag this issue too. Maybe Gene as the author might alert them to the problem he is having with his application. For the moment it's a case of sitting back until OW resolve this issue.

@soxfan1966 I noted from your GitHub issue you are using HG 1.1 v527. While its not necessary to be running the latest version there's a number a features you are currently missing present in HG 1.3 v7. A number of them relate directly to X10. You can see what they are from the release change logs on the GitHub.