Author Topic: weather segfault  (Read 2682 times)

maverick0815

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 858
    • View Profile
weather segfault
« on: November 07, 2016, 01:28:21 pm »
I wanted to use the weather-plugin and got myself an api-key at openweather.
According to the thread in the developers-section (since there is no wiki-page for that yet)I found the following:
Quote
for NOAA  Configuration is   API:NOAA:language:units:lat:lon 
                            example API:NOAA:english:0:28.53833355:-81.37923649
for WWO  Configuration is   API:WWO:language:apikey:units:city 
                             example API:WWO:pt:0b6d39679dabe54e9749209aa2e54:C:belo_horizonte
for openweahter  Configuration is   API:OWM:language:apikey:units:city 
                                    example API:OWM:en:xxxxxxxxxxxx:imperial:belo_horizonte
So I adapted it to my needs like this:
Quote
API:OWM:de:b56b99e85c97772273b020b21e07ea91:imperial:chemnitz
This seems to be the correct usage to me. Please correct me, if I'm wrong

However upon reload router, it does not start and there is no data showing up. I went to look at the syslog and found this:
Quote
Weather[7140]: segfault at 0 ip b7546de6 sp b4afe0a0 error 4 in libstdc++.so.6.0.19[b749a000+dc000]

So, the question is, if I did something wrong, or if there is something broken.

Cheers
Mario

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: weather segfault
« Reply #1 on: November 22, 2016, 09:51:42 pm »
So two things.  First, WWO appears to no longer support a free api.  Second, OWM is segfaulting because it is trying to parse data that does not exist.  It is also not using the data that is provided to it, it appears to be hardcoded with a specific API key.  OWM needs a specific City ID (from a database at OWM) and does not work with city names.  Currently it always returns results for Orlando, Florida only, perhaps hard-coded but I'm not really sure here.

The long and short is that you will have to dig into the code to fix these issues if you want to make use of the weather interface.

J.