Release - Weather Underground

  Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
IgorA100 Offline
Junior Member
Posts: 43
Joined: Apr 2011
Reputation: 0
Location: RU, Russia, Kursk sity
Post: #706
Hi, ronie!
Recently there is an error:
Code:
22:29:49.821 T:140313311942400   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ValueError'>
                                            Error Contents: invalid literal for int() with base 10: ''
                                            Traceback (most recent call last):
                                              File "/home/igora100/.kodi/addons/weather.wunderground/default.py", line 644, in <module>
                                                forecast(location, locationid)
                                              File "/home/igora100/.kodi/addons/weather.wunderground/default.py", line 158, in forecast
                                                properties(data,loc,locid)
                                              File "/home/igora100/.kodi/addons/weather.wunderground/default.py", line 406, in properties
                                                set_property('Weekend.%i.FeelsLike'            % (count+1), FEELS_LIKE(int(item['high']['celsius']), item['avewind']['kph'], item['avehumidity'], 'C') + TEMPUNIT)
                                            ValueError: invalid literal for int() with base 10: ''
                                            -->End of Python script error report<--
Addon v. 6.0.1
KODI v 17.3
find quote
ronie Offline
Team-Kodi Member
Posts: 13,182
Joined: Jan 2009
Reputation: 392
Post: #707
hmm.. doesn't happen on my end.
mind providing a full Debug Log?

Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ and Search the forum before posting.
For troubleshooting and bug reporting please make sure you read this first.
find quote
IgorA100 Offline
Junior Member
Posts: 43
Joined: Apr 2011
Reputation: 0
Location: RU, Russia, Kursk sity
Post: #708
It's strange, but it's working fine today.
Yesterday there were problems and after rebooting my server.
If the problem recurs, I'll post a full debug log.
find quote
Burke Offline
Fan
Posts: 346
Joined: Jul 2009
Reputation: 4
Location: Velika Gorica / Croatia
Post: #709
Hi Ronie,

it started on my end to:

Used pastebin, hope that is ok.

https://pastebin.com/d8f0gmrb

Regards
find quote
smitchell6879 Offline
Posting Freak
Posts: 819
Joined: Jan 2016
Reputation: 20
Post: #710
this may have already been asked or answered. Has or does anyone use this with there own weather station? Or do anyone know of a temp prop runs on windows ten and logs data. Maybe able to write script to actually get info into kodi.

Windows 10/MySQL/Xiaomi Mi Box
[WIP] UNIPLEX
Madnox Holiday Mod
find quote
jmh2002 Online
Posting Freak
Posts: 1,127
Joined: Dec 2008
Reputation: 65
Location: FRA, POL, UKR,
Post: #711
I would use this method:

- use my own weather station
- send the data to weather underground like normal (for those with a PWS)
- add the PWS id to Kodi as described in my earlier posts in this thread

If I have helped you or increased your knowledge please click the Thank User button to show me your appreciation :)

For YouTube questions please see the OFFICIAL THREAD, including the latest info in Post 1, and the Personal API Key Instructions and FAQ in Posts 2 & 3
find quote
iMak Offline
Fan
Posts: 319
Joined: Feb 2016
Reputation: 1
Post: #712
Somehow the addon stopped working and it does not show data.
find quote
jmh2002 Online
Posting Freak
Posts: 1,127
Joined: Dec 2008
Reputation: 65
Location: FRA, POL, UKR,
Post: #713
Possibly a temporary server/api problem? I noticed a lack of data early this morning european time but it's back working now

If I have helped you or increased your knowledge please click the Thank User button to show me your appreciation :)

For YouTube questions please see the OFFICIAL THREAD, including the latest info in Post 1, and the Personal API Key Instructions and FAQ in Posts 2 & 3
find quote
iMak Offline
Fan
Posts: 319
Joined: Feb 2016
Reputation: 1
Post: #714
(2017-07-21 08:44)jmh2002 Wrote:  Possibly a temporary server/api problem? I noticed a lack of data early this morning european time but it's back working now

It was from my side in fact, my Internet provider is for some reason is limiting the Internet connection on Kodi. I'll need to talk to them.
find quote
zolcos Offline
Junior Member
Posts: 9
Joined: Feb 2013
Reputation: 0
Post: #715
This plugin is abusing the API and might get our keys banned. Got this mail:

Hello,
Your wunderground API key (xxx) exceeded its allotted usage today by making 11 calls within a minute but the limit is 10.
We used one of your raindrops instead of disabling the key for the remainder of the day. You now have 29 remaining raindrops.
We check usage for 24-hour periods based on U.S. Eastern Time.
The plan you are registered for is Stratus - Developer, granting you 500 calls per day with 10 calls per minute limit. To upgrade your plan go to: http://www.wunderground.com/weather/api/d/xxx/edit.html
Details: exceededrate: maxrate: 11 (of 10)
Time: Mon, Jul 31, 2017 01:30 UTC
Thank you,
wunderground.com API Team
find quote
jmh2002 Online
Posting Freak
Posts: 1,127
Joined: Dec 2008
Reputation: 65
Location: FRA, POL, UKR,
Post: #716
The previous page of this thread is full of complete details regarding why this might be happening.

Mostly it seems it is because apart from the 1 call every 30 minutes to update the forecast, 3 extra calls are also made to retrieve the maps. This also applies even if you only mostly use a home screen widget just to see the temperature.

In addition many users now have multiple Kodi devices, so the API calls can multiply very fast. More than 2 Kodi devices on all the time will already exceed the 500 calls per day free API limit:

3 (devices) x 192 (4 calls every 30 mins, per device, per 24 hours) = 576 (Total calls to the API for 3 Kodi devices).

I agree that it does seem extremely wasteful to call the maps every 30 minutes when most users are probably only looking at the temperature as their regular use, and given that we lost one weather provider in the past for over using their API, I would support a suggestion that the maps are only refreshed when viewed or perhaps when the weather addon is actually opened.

This would enable each API key to support up to 10 devices (only 48 calls per device, per 24 hours), which should be more than enough for most users.

Ronie suggested on the previous page that he can't control this via the addon so I understood this to mean that maybe a change is needed in Kodi's background code?

Perhaps someone with more knowledge can make a pull request to the Kodi git (if that is what is required) to get this on an official to do list?


...paging Ronie Blush

If I have helped you or increased your knowledge please click the Thank User button to show me your appreciation :)

For YouTube questions please see the OFFICIAL THREAD, including the latest info in Post 1, and the Personal API Key Instructions and FAQ in Posts 2 & 3
(This post was last modified: 2017-08-05 09:41 by jmh2002.)
find quote
zolcos Offline
Junior Member
Posts: 9
Joined: Feb 2013
Reputation: 0
Post: #717
(2017-08-05 09:40)jmh2002 Wrote:  Mostly it seems it is because apart from the 1 call every 30 minutes to update the forecast, 3 extra calls are also made to retrieve the maps. This also applies even if you only mostly use a home screen widget just to see the temperature.
In addition many users now have multiple Kodi devices, so the API calls can multiply very fast. More than 2 Kodi devices on all the time will already exceed the 500 calls per day free API limit:
3 (devices) x 192 (4 calls every 30 mins, per device, per 24 hours) = 576 (Total calls to the API for 3 Kodi devices).
There must be something else happening here since I only have one Kodi device and it's the only thing using this key.
In my case it wasn't the total calls in a day that caused the warning, but that it made 11 calls in one minute.
find quote
Post Reply