LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Wanted: Details on weather applet for Gnome/MATE panels (http://www.linuxquestions.org/questions/linux-desktop-74/wanted-details-on-weather-applet-for-gnome-mate-panels-4175472045/)

Doc CPU 08-04-2013 04:34 AM

Wanted: Details on weather applet for Gnome/MATE panels
 
Hi there,

I'm using Linux Mint with the MATE desktop on my PCs, and on all machines I have the clock/calendar applet set to display current weather data from a station nearby (actually, it's the Stuttgart Airport weather station). Usually, this is just a weather icon and the current temperature at the selected place, and when I hover the mouse on this display, I get a more verbose information including the perceived temperature ("feels like ...") when it's cold, wind speed and direction, and sunrise/sunset times.
I am dimly aware that in Ubuntu 10.10 with "real" Gnome, this applet was separate from the clock and displayed even more data - like air pressure, and optionally a weather map (which never worked for me).

Does anybody know where these panel applets get their information from, and how I can log this data in a file? In the end, I'd like to have a small program running on my server (with no GUI) that continuously logs that weather data 24/7 so that I can look at last night's temperature curve, see the day's minimum and maximum temperatures and more things like that.

Can anybody point me to something useful?

[X] Doc CPU

Habitual 08-04-2013 11:08 AM

I've used conkyForecast.py for a few years now.

http://ubuntuforums.org/showthread.php?t=869328
But you'll need a working XOAP_LICENCE_KEY key file to use conkyForecast for GMXX0128
Rumor and post at above link suggest XOAP_LICENCE_KEYs may be disabled. Mine works and always has.
Found my key using google for "XOAP_LICENCE_KEY=" and tried many keys until it worked.

This output from conkyForecast.py has [b/]many, many [/B]options for grabbing weather data.
Code:

Weather for Stuttgart,Germany
Last Updated 2013-08-04 5:45 PM

Forecast High Temp 31
High for today is 31
Low  for today is 19
Current Humidity: 58%
Fair

Sunrise is at  6:01 AM
Sunset is at  8:57 PM
Length of Daylight is 14:56m
Pollen: 7.2 of 12
UV Index = 2

wrt:
Quote:

Originally Posted by Doc CPU (Post 5002547)
In the end, I'd like to have a small program running on my server (with no GUI) that continuously logs that weather data 24/7 so that I can look at last night's temperature curve, see the day's minimum and maximum temperatures and more things like that.

It will not "do" yesterday's weather, but you could run it daily and process the output saved in a file.
It works here using
Code:

stuttgart.sh >> x
The conkyForecast.py code has few deps. :)
It does NOT require conky.

http://conky.pitstop.free.fr/wiki/in..._help_%28en%29

Subscribed with interest...

Doc CPU 08-04-2013 11:58 AM

Hi there,

thank you for your reply and your information.

Quote:

Originally Posted by Habitual (Post 5002684)
I've used conkyForecast.py for a few years now.

http://ubuntuforums.org/showthread.php?t=869328
But you'll need a working XOAP_LICENCE_KEY key file to use conkyForecast for GMXX0128

Okay, so this is definitely not the source where the panel applet gets its data, and fiddling around with illegal or at least gray-zone keys isn't actually my style.

Code:

Weather for Stuttgart,Germany
Last Updated 2013-08-04 5:45 PM

Forecast High Temp 31
High for today is 31
Low  for today is 19
Current Humidity: 58%
Fair

Sunrise is at  6:01 AM
Sunset is at  8:57 PM
Length of Daylight is 14:56m
Pollen: 7.2 of 12
UV Index = 2

That's in fact a lot of information - what I can't find in that excerpt is the current temperature.

Quote:

Originally Posted by Habitual (Post 5002684)
wrt:

What??

Quote:

Originally Posted by Habitual (Post 5002684)
It will not "do" yesterday's weather, but you could run it daily and process the output saved in a file.

That's roughly what I wanted to do: Access the data source that the Gnome/MATE applet queries every few minutes anyway, and log that to a file. Note: I do NOT want a forecast, or some edited data, but only rough, current measurements. Current temperature, optionally humidity and air pressure, plus ideally wind and rain data. As for yesterday's data, of course I thought of reading that from the log file.

[X] Doc CPU

Habitual 08-04-2013 12:51 PM

Quote:

Originally Posted by Doc CPU (Post 5002706)
fiddling around with illegal or at least gray-zone keys isn't actually my style.

I can respect that.
There's a reference for a new source of weather at http://ubuntuforums.org/showthread.php?t=869328


Source code for Xfce's Weather Update is at http://git.xfce.org/panel-plugins/xfce4-weather-plugin/
Your desktop is different, so YMMV.

google conkyForecastWU and you'll find something that may work.

I don't know how MATE does it, I haven't used Mint since 10.0, sorry.

Doc CPU 08-04-2013 04:04 PM

Hi there,

thanks again ...

Quote:

Originally Posted by Habitual (Post 5002734)
Source code for Xfce's Weather Update is at http://git.xfce.org/panel-plugins/xfce4-weather-plugin/
Your desktop is different, so YMMV.

That doesn't matter; at best, I can study the source code, look up where they get their information and how it is structured, and then write my own code, possibly reusing some of the existing. I downloaded the sources, and it looks like this is going to take me somewhere.

Quote:

Originally Posted by Habitual (Post 5002734)
google conkyForecastWU and you'll find something that may work.

Up to now, I didn't even know what conky is; now I looked it up and found that it might be an interesting piece of software to look into.

Quote:

Originally Posted by Habitual (Post 5002734)
I don't know how MATE does it, I haven't used Mint since 10.0, sorry.

I only got aware of it since Mint 12 (Maya), when Ubuntu turned my down by discontinuing Gnome2 and instead offering the choice of pest or cholera (Gnome3 or Unity), neither of which I liked.

[X] Doc CPU

Habitual 08-04-2013 06:44 PM

Conky is pretty awesome, I dived into it like a full blown Drug Addiction for about 6 months.

It's kind of "unuseful" on a host without a DE however.
I'm so "over" conky now, I only use conkyForecast now and a date|time widget on the desktop. That's it.
I have recovered. ;)

Good Luck!

frankbell 08-04-2013 09:00 PM

1 Attachment(s)
GKrellM has a nice weather plugin. You enter the location code and it gives you current conditions in great detail.

Here's a nice article on GKrellM.

Here's a screenshot.

Habitual 08-04-2013 09:51 PM

Man, what a thread, huh?
Code:

#!/usr/bin/perl -w
#
# Ben Hammersley ben@benhammersley.com
# Looks up the real-world location of visiting IPs
# and then finds out the weather at those places
#

use strict;
use CAIDA::NetGeoClient;
use Weather::Underground;
use Geography::Countries;

if you're into perl...
It's for Visitor weather but a good coder could make use of it...

http://spideringhacks.org.ua/0596005...4-sect-33.html

Doc CPU 08-05-2013 11:21 AM

Hi there,

Quote:

Originally Posted by frankbell (Post 5002904)
GKrellM has a nice weather plugin. You enter the location code and it gives you current conditions in great detail.

hey, GKrellM is cool!
However, it also lacks the option of logging all data continuously, which was my main concern.

Or maybe there's another plugin for that I haven't seen yet?

[X] Doc CPU

Doc CPU 08-06-2013 11:28 AM

Hi there,

Quote:

Originally Posted by Doc CPU (Post 5003381)
hey, GKrellM is cool!
However, it also lacks the option of logging all data continuously, which was my main concern.

and some of the data is useless. For instance, in the system temperature plug-in, I would've expected it can display mainboard, CPU and HDD temperature. However, it offers only one sensor value labeled "k10temp-hwmon0/temp1", and that temperature usually sways somewhere between 28 and 33C, so maybe this is the mainboard sensor.
But that's all there is - no CPU temperature (though I can have a look at it in BIOS setup and it's usually 45..50C), no HDD temperature (though a modern SMART enabled HDD has it available), no fan speed, no voltages.

My enthusiasm for GKrellM has dropped back to almost zero. :-(

[X] Doc CPU


All times are GMT -5. The time now is 01:27 PM.