Page 1 of 1

YWeather Experience?

Posted: Thursday 14 January 2016 16:01
by Toulon7559
Looking for a short & easy & reliable solution to get time-info for sunrise and for sunset at a defined location.
Found http://www.commandlinefu.com/commands/v ... nset-times and as further search-result https://pypi.python.org/pypi/yweather/
Interested to know experiences with linking/integration of either of these 2 services in a Python-script.
Example scripts?
Or better solutions for application of sunrise and sunset in Python-scripts?

Re: YWeather Experience?

Posted: Thursday 14 January 2016 16:22
by pvm
You can get the domoticz times using json calls

Re: YWeather Experience?

Posted: Thursday 14 January 2016 18:14
by Toulon7559
@pvm
Short examples?
Or hint where I can have a look for an operational Python-implementation?
[Have searched with Google and within the Forum, but ;-) examples for lua-scripts and Blocky do not really fit an application within Python-script]

The Yahoo-commandline-example is really short and operates 'completely-independent' by just an url-call, but needs
#1. a formatting for the command-line with the url to fit into a Python-script 'to make the call'
#2. line(s) in the Python-script to get the time-values from the received response with Dictionary to Python-parameters.

All other solutions found at internet require one of more python-modules to be loaded and then to be tweaked.
Application of module yweather would have the advantage that it is a one-site source also for meteo-info for any defined geolocation.
:-( But trying to install this module I get 'permission denied' to the folder dist-packages ...........

Re: YWeather Experience?

Posted: Friday 22 January 2016 13:26
by Toulon7559
Searching further I found this URL for OpenWeatherMap, which may be an even easier one-stop solution to get meteo-info as well as info on sunrise and sunset:
http://openweathermap.org/current#data
https://github.com/csparpa/pyowm/wiki/Usage-examples provides some hints for conversions and script-lines.