YWeather Experience?

Python and python framework

Moderator: leecollings

Post Reply
Toulon7559
Posts: 859
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

YWeather Experience?

Post 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?
Last edited by Toulon7559 on Thursday 21 January 2016 7:28, edited 1 time in total.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
pvm
Posts: 550
Joined: Tuesday 17 June 2014 22:14
Target OS: NAS (Synology & others)
Domoticz version: 4.10538
Location: NL
Contact:

Re: YWeather Experience?

Post by pvm »

You can get the domoticz times using json calls
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
Toulon7559
Posts: 859
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: YWeather Experience?

Post 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 ...........
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Toulon7559
Posts: 859
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: YWeather Experience?

Post 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.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest