You are not logged in.

#21 2016-07-07 08:39:07

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: openweathermap and wunderground weather

loutch wrote:

If it is too much to complicate we leave fallen, maybe that on Mageia something is missing so that it don't works out of the box

No - you still have incorrect formatting AND wind direction is 'null' -  openweathermap wind direction has not been downloaded (this occasionally seems to happen with some weather stations).

1) Yesterday I put an error check in the script for the wind data, so use the new 'get_vals( )' function...https://forums.bunsenlabs.org/viewtopic … 585#p31585

2) Comment out the '${execi....}' line in the conkyrc, so you can investigate the weather.txt formatting. Change the "," to ".", as I already told you, and use an arbitrary wind direction. The file should now read

180
0.0 kn
0536
2136
0.0
Sarreguemines
clear sky

3) Restart the conky, and see if it displays OK. If so, uncomment the ${execi} line and try again.

If you are using the new get_vals( ) function, then even if wind direction = null, it should still load, but with "No wind data" displayed. At some time the data will come through again, but you can test by using another station with...

${execi 300 ~/2b_Wunderground_API/scripts/lua-weather.sh paris}

4) I don't yet know how to deal with your French-style decimal for the temperature data, so you will have to investigate that yourself.

4) Add this at the start of 'weather.sh', to enable the correct output:

LANG=en_GB.UTF-8

Last edited by damo (2016-07-07 14:33:52)


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#22 2016-07-07 19:33:22

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: openweathermap and wunderground weather

Hello damo

i used your modification and the conky  work great for the moment and there is no errors in konsole.


1467919744.png

1467920298.png

i permice myself to modifie a little bit the weather.lua to have much colors in conky i change al "0.4" to "1", i call the script with this:

${execi 3600 ~/2b_Wunderground_API/scripts/lua-weather.sh 2975964}

I have just a question:

is that possible to convert kn in kms?

thanks

Last edited by loutch (2016-07-07 19:38:16)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#23 2016-07-07 19:54:50

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: openweathermap and wunderground weather

Glad you have it sorted out smile

loutch wrote:

...
I have just a question:

is that possible to convert kn in kms?

thanks

openweather provides the metric speed in metres/second, so just change the multiply factor, and change "kn" to "kph",  in lua-weather.sh:

        windspeed=$(echo ${all[7]}*1.9 | bc)
        windspeed=$(printf '%01.1f %s' "$windspeed" "kn")

(m/s)*1.9 -> knots

Work it out yourself for km/hr tongue


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#24 2016-07-07 20:10:27

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: openweathermap and wunderground weather

Thanks you for helping and

GREAT WORK


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#25 2016-07-07 20:19:16

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: openweathermap and wunderground weather

loutch wrote:

Thanks you for helping and

GREAT WORK

O:)  smile


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#26 2016-07-08 09:01:45

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,641

Re: openweathermap and wunderground weather

@damo
@loutch

I am impressed. Very good work.
I just do not understand what that has to do with Teo's 2b_Wunderground_API.

Only the shell is still used

lua_load ~/2b_Wunderground_API/scripts/lua-weather.lua
    lua_draw_hook_pre conky_main


TEXT

${execi 3600 ~/2b_Wunderground_API/scripts/lua-weather.sh xxx}

Will you take me the tomatoes from the eyes.   8)  :8

Offline

#27 2016-07-08 10:59:56

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: openweathermap and wunderground weather

Hello unklar

There is nothing with wunderground, before i have any openweather apikeys i try it to work with wunderground.

here a mix of 4 conky for my weather-station

1467975125.png


conky wunderground from Theo
conky Meteo6jours from Didier-t
conky barograph from wourlf
conky wind speed from olgmen

Last edited by loutch (2016-07-08 11:00:24)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#28 2016-07-08 12:51:40

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,641

Re: openweathermap and wunderground weather

thank you @loutch

A question, that here is @olgmen ? wink
6b9225493988728.jpg

Offline

#29 2016-07-08 18:18:34

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: openweathermap and wunderground weather

Yes


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#30 2016-07-09 08:01:24

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,641

Re: openweathermap and wunderground weather

yeah, i love @olgmen and his conkys   smile

Offline

Board footer

Powered by FluxBB