Conky and wttr
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Conky and wttr
Using mint 19 mate.
I used to have GIS as a weather app on my desktop.
This no longer seems to work. Ive prob done something wrong...
Moving on,
I have looked at wttr and have it going in conky but the output is not useable, compared to the terminal.
${curl wttr.in/city}
Does anyone know how to set this up properly in conky?
I used to have GIS as a weather app on my desktop.
This no longer seems to work. Ive prob done something wrong...
Moving on,
I have looked at wttr and have it going in conky but the output is not useable, compared to the terminal.
${curl wttr.in/city}
Does anyone know how to set this up properly in conky?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Conky and wttr
I gave up on getting weather via Conky; not Conky's fault, just couldn't get a reliable source. Everyone that I tried would randomly time-out, or refuse connection because I was supposedly running queries too much (once per hour was what I was told, but it wasn't consistent).
I tried your wttr.in service, and got this:
This looks like what happened to me. Another text-based source for weather is inxi. Here's a sample:
I tried your wttr.in service, and got this:
Code: Select all
$ curl wttr.in/SanDiego
Sorry, we are running out of queries to the weather service at the moment.
Here is the weather report for the default city (just to show you, how it looks like).
We will get new queries as soon as possible.
You can follow https://twitter.com/igor_chubin for the updates.
Code: Select all
$ inxi -wxxx
Weather: Temperature: 22.2 C (72 F) Conditions: Clear sky Wind: from WNW at 2.7 m/s (10 km/h, 6 mph) Cloud Cover: 45%
Humidity: 54% Dew Point: 12.5 C (55 F) Pressure: 939.2 mb (31 in) Location: My City, CA, USA
Current Time: Mon 08 Jul 2019 04:02:13 PM PDT (America/Los_Angeles)
Observation Time: Mon 08 Jul 2019 03:40:00 PM PDT Source: WeatherBit.io
- BenTrabetere
- Level 7
- Posts: 1890
- Joined: Sat Jul 19, 2014 12:04 am
- Location: Hattiesburg, MS USA
Re: Conky and wttr
Tryajgringo619 wrote: ⤴Mon Jul 08, 2019 7:03 pm I tried your wttr.in service, and got this:Code: Select all
$ curl wttr.in/SanDiego
Code: Select all
curl wttr.in/"san diego"
Compare that to the next 7 days in my corner of paradise.
Code: Select all
curl wttr.in/hattiesburg
The extended 30-day forecast is exactly the same except on July 28 and August 12/13, when it will be hot and overcast, with a chance for severe weather - this is to coincide with the peak days for the Delta Aquariid and Perseids meteor showers.
Patreon sponsor since August 2022
Re: Conky and wttr
It's amazing how many days in downtown SD have the same high and low temperature. When it rains, the weather people completely freak out.BenTrabetere wrote: ⤴Mon Jul 08, 2019 10:55 pm The results should be more informative. As if San Diego needs a weather service to forecast the weather. My extended 30-day forecast is temperatures from the mid-60s to the mid-70s with a possibility of the low 80s, slight breeze from the WSW, sunny with no chance of rain. No charge.
Compare that to the next 7 days in my corner of paradise.Hot and humid, a barely noticeable breeze from somewhere equally hot and humid, few clouds and a very slight chance of clouds, and bugs.Code: Select all
curl wttr.in/hattiesburg
The extended 30-day forecast is exactly the same except on July 28 and August 12/13, when it will be hot and overcast, with a chance for severe weather - this is to coincide with the peak days for the Delta Aquariid and Perseids meteor showers.
Re: Conky and wttr
check here to formulate a good format of weather options and/or formatting you are looking for: https://wttr.in/:help
you might want some view options.
maybe you decide to use some png option?
if you write it directly in a global conky config, and for example if the config is using the update_interval for every 1 second then that's not good. You can use an
even with inxi or any other service if you are pulling every second then those servers are going to be irritated about that and it actually doesn't even make sense at all really.
check your variables as the conky wiki shows:
is that any closer yet?
you might want some view options.
maybe you decide to use some png option?
if you write it directly in a global conky config, and for example if the config is using the update_interval for every 1 second then that's not good. You can use an
${execi ...}
line instead. or maybe texeci
? Or make a specific separate config strictly for weather and just use a large value for update_interval
and no need for exec'ing using an interval. But 1secx60x60 is an hour.even with inxi or any other service if you are pulling every second then those servers are going to be irritated about that and it actually doesn't even make sense at all really.
check your variables as the conky wiki shows:
man -P "less -p 'OBJECTS/VARIABLES'" conky
from: https://github.com/brndnmtthws/conky/wi ... igurations obviously you can just man conky
for the whole thing and dig around or man conky > bigassed-conky-text-file
to write it all into a file if you want to use a text viewer with it instead.is that any closer yet?
Re: Conky and wttr
When I was playing with Conky, trying to make a weather ticker, I would pull info once per hour with inxi into an .xml files, then used xmlstarlet to parse the info I wanted into Conky (used
As for Conky man pages, try these local links:
Config settings: file:///usr/share/doc/conky-all/html/config_settings.html
Documentation: file:///usr/share/doc/conky-all/html/docs.html
Variables: file:///usr/share/doc/conky-all/html/variables.html
execpi 3600 command_name
). Eventually I would get a warning about calling the service too much, even though they claimed once per hour was OK.As for Conky man pages, try these local links:
Config settings: file:///usr/share/doc/conky-all/html/config_settings.html
Documentation: file:///usr/share/doc/conky-all/html/docs.html
Variables: file:///usr/share/doc/conky-all/html/variables.html
Re: Conky and wttr
Thank you all,
ill have a little dig around when i get a moment
ill have a little dig around when i get a moment
Re: Conky and wttr
same output as:
curl wttr.in/syntaxerror
but:
curl wttr.in/San+Diego
I don't know how exact a particular service works but if it monitors for 24 queries per day, then on a day with reboot or restart would probably issue more than 24 queries, using 3600 timing anyway. Or 1 per hour, a reboot would likely trigger it.
I tend to think I only want an update once or twice a day, -otherwise I'm manually pulling up a radar map.
let us know. we can share some results.
Also, for wttr, some better help info: https://github.com/chubin/wttr.in
Re: Conky and wttr
my output from conky looks like this
- Attachments
-
- weather.resized.jpg (10.28 KiB) Viewed 6543 times
Re: Conky and wttr
I can't see that, but of course you want to use a monospace font so the formatting looks correct.
and I think curl -s or curl --silent might be needed when called from another process so it's not showing some request info.
and I think curl -s or curl --silent might be needed when called from another process so it's not showing some request info.
Re: Conky and wttr
my apologies for the pic
http://pix.toile-libre.org/upload/origi ... 807092.jpg
http://pix.toile-libre.org/upload/origi ... 807092.jpg
Re: Conky and wttr
those are terminal escape codes, so turn them off in that output.antcj wrote: ⤴Wed Jul 10, 2019 8:43 pm my apologies for the pic
http://pix.toile-libre.org/upload/origi ... 807092.jpg
see the "View Options:" and use the T option "# switch terminal sequences off (no colors)". https://wttr.in/:help
There's an example further down. add the ? after the city and use T and/or other options as shown.
Re: Conky and wttr
Thank you
I put in this
${curl wttr.in/Paris ?/t}
but have the same result.
Maybe if you have a working example i could play and go forward with, may get me on the right track
Im not a coder as you may have guessed by now..
I put in this
${curl wttr.in/Paris ?/t}
but have the same result.
Maybe if you have a working example i could play and go forward with, may get me on the right track
Im not a coder as you may have guessed by now..
Re: Conky and wttr
${curl wttr.in/Paris ?/t}
original${curl wttr.in/Paris?/t}
remove space${curl wttr.in/Paris?t}
remove extra slash${curl wttr.in/Paris?T}
use T parameter not t which is not a parameterI'll post something after work today.
Re: Conky and wttr
You could always write your own my weather conky parsing data from the UK met office in python:
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Re: Conky and wttr
[/quote]
I'll post something after work today.
[/quote]
And that works wow.
http://pix.toile-libre.org/upload/origi ... 870857.jpg
Im keeping a look out for your post later
Really appreciative
${curl wttr.in/Paris ?/t}
original${curl wttr.in/Paris?/t}
remove space${curl wttr.in/Paris?t}
remove extra slash${curl wttr.in/Paris?T}
use T parameter not t which is not a parameterI'll post something after work today.
[/quote]
And that works wow.
http://pix.toile-libre.org/upload/origi ... 870857.jpg
Im keeping a look out for your post later
Really appreciative
Re: Conky and wttr
[/quote]
I'll post something after work today.
[/quote]
Any pointers on getting the colours up?
${curl wttr.in/Paris ?/t}
original${curl wttr.in/Paris?/t}
remove space${curl wttr.in/Paris?t}
remove extra slash${curl wttr.in/Paris?T}
use T parameter not t which is not a parameterI'll post something after work today.
[/quote]
Any pointers on getting the colours up?
Re: Conky and wttr
nice!
Yes, do something like AndyMH.
Specifically in this case you could parse the terminal style color codes and convert them to conky color references (then use ${execp command} , or do the stuff from a lua script).
I like a minimal approach so I use a minimal single day query:
curl wttr.in/Orlando?0QT
(actually I have that in a script file in ~/bin as from the example given here: https://wttr.in/:bash.function )
then, inside the conky config:
Code: Select all
conky.config = {
...some configuration variables
use_xft = true,
font = 'Liberation Mono:bold:size=10',
...other configuration variables
};
conky.text = [[
${execi 9001 wttr}
]]
or:
Code: Select all
conky.config = {
...some configuration variables
use_xft = true,
font = 'Liberation Mono:bold:size=10',
update_interval = 7200.0,
...other configuration variables
};
conky.text = [[
${exec wttr}
]]