Page 1 of 1
Weather plugin
Posted: Mon Dec 09, 2013 4:40 pm
by overb
Hi! im trying to get weather announces working in eventghost but it seems like the plugin that comes with eventghost doesent work since Googles weather Api is no longer available?
Is there any other plugin working? what is the best way to get speech engine to announce weather?
Re: Weather plugin
Posted: Mon Dec 09, 2013 5:52 pm
by krambriw
What plugin are you referring to?
Check out the latest SunTracker plugin, it uses Yahoo! weather api.
For announcing weather, you might have to write a small python script that takes the actual weather from the weather event and announces it. I guess you need to add some additional logic not to hear the current weather repeated every minute but only when the weather changes? There are many possibilities and options but you need to define your detailed requirements then.
BR
Re: Weather plugin
Posted: Mon Dec 09, 2013 9:26 pm
by overb
Im referring to plugin "Weather" that comes with eventghost.
Actually i have tried the SunTracker plugin, tho it doesnt give that much information, for example it just says "Weather condition: Snow".
It would be nice with some information about temprature and windspeed etc.
Is there any common python script i can use for gather information from EG events and make TTS anounnce it? Im not so good at programming and python scripts.
Re: Weather plugin
Posted: Mon Dec 09, 2013 10:32 pm
by krambriw
Sorry, but you have not investigated the possibilities properly enough. This is what (location dependent) you could get from the SunTracker plugin using for instance a simple python script :
Code: Select all
23:26:30 {'date': u'Mon, 09 Dec 2013 10:50 pm CET', 'text': u'Mostly Cloudy', 'code': u'27', 'temp': u'-8', 'title': u'Conditions for Sollentuna Municipality, SE at 10:50 pm CET'}
23:26:30 {'direction': u'270', 'speed': u'1.61', 'chill': u'-8'}
23:26:30 [{'date': u'9 Dec 2013', 'high': u'-2', 'code': u'46', 'low': u'-4', 'text': u'Snow Showers Late'}, {'date': u'10 Dec 2013', 'high': u'4', 'code': u'5', 'low': u'2', 'text': u'Rain/Snow'}, {'date': u'11 Dec 2013', 'high': u'4', 'code': u'28', 'low': u'3', 'text': u'Mostly Cloudy'}, {'date': u'12 Dec 2013', 'high': u'6', 'code': u'30', 'low': u'2', 'text': u'Partly Cloudy'}, {'date': u'13 Dec 2013', 'high': u'3', 'code': u'30', 'low': u'-1', 'text': u'Partly Cloudy'}]
23:26:30 {'pressure': u'1015.92', 'rising': u'0', 'visibility': u'9.99', 'humidity': u'91'}
The script:
Code: Select all
print eg.plugins.Suntracker.GetCurrentCondition()
print eg.plugins.Suntracker.GetWindData()
print eg.plugins.Suntracker.GetForecasts()
print eg.plugins.Suntracker.GetAtmosphereData()
Re: Weather plugin
Posted: Mon Dec 09, 2013 11:01 pm
by overb
oh thats alot of information
I tried post "{eg.plugins.Suntracker.GetCurrentCondition()}" in TTS and it reads it all up, is there anyway to filter
the command so it just reads the weather information and not the whole code?
Re: Weather plugin
Posted: Tue Dec 10, 2013 5:53 am
by krambriw
Well, I assume from here and on, you will need some python. I will give you a starting point as example.
In the python code below, as a result (res) you receive a so called dictionary holding items (pairs). Each item has a key
and its value. To get access to individual values in a dictionary you just use the key and the value is yours.
BR
Code: Select all
res = eg.plugins.Suntracker.GetCurrentCondition()
value = res['text']
print value
value = res['title']
print value
#etc etc
Re: Yahoo weather sends sometimes wrong current temperature
Posted: Fri Oct 03, 2014 9:56 am
by pubsfried
Just an info for all struggling with receiving wrong temperatures from the weather plugin (haven't checked the other values):
A lot of users of Yahoo! Weather currently complain that the temperature is always off the real value:
https://yahoo.uservoice.com/forums/207813
for example
https://yahoo.uservoice.com/forums/2078 ... in-7-c-off
Same happened to me yesterday: real 18-22C, Yahoo showed 1-8C, but the forecast for the next days was always ok.
The related RSS-Feed...
http://weather.yahooapis.com/forecastrss?w=641568&u=c (change ID to your location for debug)
... showed the same shit (excuse me). Today it shows the correct value, but seems to be poor reliability.
@krambriw
Walter,
is there a chance to move to or add
http://www.openweathermap.org ? here' an example for the api request:
http://api.openweathermap.org/data/2.5/ ... id=2827613
EDIT: Example 7days
http://api.openweathermap.org/data/2.5/ ... tric&cnt=7
Documentation:
http://www.openweathermap.org/api_station
It covers 100000+ stations all over the world and the one near to my home (only 7km away) updates accurately every 10 minutes. And everybody can add his own weather station.
I had a quick look into pywapi.py, doesn't look too complex, but unfortunately I've no experience with python.
Michael
Re: Weather plugin
Posted: Sun Oct 05, 2014 10:26 am
by Pako
I looked at OpenWeatherMap and it looks interesting.
I can create a new plugin for it.
But I do not want to do unnecessary work.
Maybe Walter already doing on it?
Pako
Re: Weather plugin
Posted: Sun Oct 05, 2014 1:44 pm
by krambriw
No, not planned
Re: Weather plugin
Posted: Sun Oct 05, 2014 2:07 pm
by pubsfried
Pako wrote:I looked at OpenWeatherMap and it looks interesting.
I can create a new plugin for it.
But I do not want to do unnecessary work.
Maybe Walter already doing on it?
Pako
I am glad to hear that!

I hope this will help a lot of other users, too.
Many thanks in advance, Pako!
Re: Weather plugin
Posted: Sun Oct 12, 2014 7:33 am
by Pako