inxi/pinxi testers! big weather update

Message
Author
User avatar
h2-1
Posts: 208
Joined: Sat Nov 15, 2008 3:16 pm

inxi/pinxi testers! big weather update

#1 Post by h2-1 »

I'm about to do a new inxi, the current api that inxi uses for weather data is apparently about to vanish, so I've implemented a much more robust permanent solution, by moving the primary api to smxi.org, where I can use various apis, some requiring keys, to generate output for inxi/pinxi.

Just to make sure nothing weird happens, can you test current latest pinxi (3.0.30-9) and confirm all weather functionality is working as expected.

Note that for -W custom locations, the api's do not work as reliably as the old one, but there's also now an option where you can trigger using alternate apis:

Sample: pinxi -xxxW --weather-source 1

Weather source takes 4 options, 0 to 3, 0 will use the old logic inside of inxi, but that's probably going to be going offline quite soon.

There's also some new data, snow/rain/cloud cover to make the change better.

With this new logic, I will be able to update api's to all inxi's via the smxi.org tool because I can simply change which api is used for default.

There's also enhanced error handling, which gives somewhat ok messages, though I need to translate some of them into english.

The Debian freeze for next stable is a few days away so I need to get this into inxi master as quickly as possible, today by the latest, freeze is feb 12 I believe.

thanks for looking and testing.

Post the full output of either -wxxx or -Wxxx and if you use --weather-source (short --ws) let me know that.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

User avatar
Jerry3904
Administrator
Posts: 21943
Joined: Wed Jul 19, 2006 6:13 am

Re: inxi/pinxi testers! big weather update

#2 Post by Jerry3904 »

Seems to work fine here (except "annoying" is missing ;-D)

Code: Select all

$ pinxi -wxxx
Weather:   Temperature: 4 C (39 F) Conditions: Light rain Wind: from SSW at 2.7 m/s (10 km/h, 6 mph) 
           Cloud Cover: 100% Rain: 3 mm (0.12 in) Humidity: 96% Pressure: 991.1 mb (29.73 in) 
           Dew Point: 4 C (39 F) Location: Seneca Falls, NY, USA 
           Current Time: Wed 06 Feb 2019 06:19:20 PM EST (America/New_York) 
           Observation Time: Wed 06 Feb 2019 05:56:00 PM EST 
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
rokytnji.1
Global Moderator
Posts: 718
Joined: Sun Apr 13, 2014 9:06 pm

Re: inxi/pinxi testers! big weather update

#3 Post by rokytnji.1 »

Motorcycle shop Desktop computer

Code: Select all

harry@shop1:~
$ pinxi -Fxx
System:    Host: shop1 Kernel: 4.9.0-0.bpo.5-amd64 x86_64 bits: 64 compiler: gcc v: 4.9.2 
           Desktop: Xfce 4.12.2 tk: Gtk 2.24.25 wm: xfwm4 dm: LightDM 
           Distro: MX-16_x64 Metamorphosis 12 December 2016 base: Debian GNU/Linux 8 (jessie) 
Machine:   Type: Desktop System: Dell product: Precision WorkStation T3400 v: N/A 
           serial: <root required> Chassis: type: 7 serial: <root required> 
           Mobo: Dell model: 0TP412 serial: <root required> BIOS: Dell v: A09 date: 06/04/2009 
CPU:       Topology: Dual Core model: Intel Core2 Duo E7400 bits: 64 type: MCP arch: Penryn 
           rev: A L2 cache: 3072 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 ssse3 bogomips: 11163 
           Speed: 2791 MHz min/max: N/A Core speeds (MHz): 1: 2791 2: 2791 
Graphics:  Device-1: NVIDIA G71 [GeForce 7900 GS] driver: nouveau v: kernel bus ID: 01:00.0 
           chip ID: 10de:0292 
           Display: server: X.Org 1.16.4 driver: nouveau unloaded: fbdev,modesetting,vesa 
           alternate: nv resolution: 1920x1080~60Hz 
           OpenGL: renderer: Gallium 0.4 on NV49 v: 2.1 Mesa 12.0.3 direct render: Yes 
Audio:     Device-1: Intel 82801I HD Audio vendor: Dell driver: snd_hda_intel v: kernel 
           bus ID: 00:1b.0 chip ID: 8086:293e 
           Sound Server: ALSA v: k4.9.0-0.bpo.5-amd64 
Network:   Device-1: Broadcom NetXtreme BCM5754 Gigabit Ethernet PCI Express 
           vendor: Dell Precision T3400 driver: tg3 v: 3.137 port: dc80 bus ID: 04:00.0 
           chip ID: 14e4:167a 
           IF: eth0 state: up speed: 1000 Mbps duplex: full mac: 00:24:e8:41:75:98 
Drives:    Local Storage: total: 149.05 GiB used: 50.59 GiB (33.9%) 
           ID-1: /dev/sda vendor: Seagate model: ST3160812AS size: 149.05 GiB speed: 3.0 Gb/s 
           serial: 5LSEMKYE temp: 40 C 
Partition: ID-1: / size: 7.56 GiB used: 4.94 GiB (65.2%) fs: ext4 dev: /dev/sda5 
           ID-2: /home size: 15.06 GiB used: 2.36 GiB (15.7%) fs: ext4 dev: /dev/sda6 
           ID-3: swap-1 size: 3.91 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda8 
Sensors:   System Temperatures: cpu: 34.0 C mobo: N/A gpu: nouveau temp: 62 C 
           Fan Speeds (RPM): cpu: 1071 mobo: 1283 
Info:      Processes: 184 Uptime: 1h 54m Memory: 3.80 GiB used: 1.18 GiB (31.2%) Init: SysVinit 
           v: 2.88 runlevel: 5 default: 5 Compilers: gcc: 4.9.2 alt: 4.9 Shell: bash v: 4.3.30 
           running in: xfce4-terminal pinxi: 3.0.30-9 

Code: Select all

harry@shop1:~
$  pinxi -xxxW pecos,texas
Weather:   Temperature: 23 C (73 F) Conditions: Few clouds 
           Wind: from WNW at 6.6 m/s (24 km/h, 15 mph) Cloud Cover: 17% Humidity: 37% 
           Pressure: 914.825 mb (27.44 in) Dew Point: 7 C (45 F) Location: Pecos, Texas 
           Current Time: Wed 06 Feb 2019 05:24:37 PM CST 
           Observation Time: 2019-02-06 17:24:37 (America/Chicago -0600) 

User avatar
sunrat
Posts: 636
Joined: Mon Mar 28, 2016 9:54 pm

Re: inxi/pinxi testers! big weather update

#4 Post by sunrat »

Looking good from Australia:

Code: Select all

$ pinxi -wxxx
Weather:
  Temperature: 26 C (79 F) Conditions: Broken clouds
  Wind: from NNW at 0.9 m/s (3 km/h, 2 mph) Cloud Cover: 75% Humidity: 74%
  Pressure: 1006.3 mb (30.19 in) Dew Point: 21 C (70 F)
  Location: Thornbury, Thornbury, 07, AUS
  Current Time: Thu 07 Feb 2019 10:30:31 AEDT (Australia/Victoria)
  Observation Time: Thu 07 Feb 2019 10:00:00 AEDT

User avatar
h2-1
Posts: 208
Joined: Sat Nov 15, 2008 3:16 pm

Re: inxi/pinxi testers! big weather update

#5 Post by h2-1 »

Hmm, maybe I should move dew point to right after humidity, that would make more sense.

Anyone in russia or other country without a euro style character set?

All looks good so far, thanks.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

User avatar
richb
Administrator
Posts: 10343
Joined: Wed Jul 12, 2006 2:17 pm

Re: inxi/pinxi testers! big weather update

#6 Post by richb »

Code: Select all

pinxi -wxxx
Weather:   Temperature: 1 C (34 F) Conditions: Freezing rain 
           Wind: from N at 4.6 m/s (17 km/h, 10 mph) Cloud Cover: 100% Rain: 3 mm (0.12 in) 
           Humidity: 95% Pressure: 1000.6 mb (30.02 in) Dew Point: -0 C (32 F) 
           Location: Rochester, NY, USA 
           Current Time: Wed 06 Feb 2019 06:40:44 PM EST (America/New_York) 
           Observation Time: Wed 06 Feb 2019 06:21:00 PM EST 
Forum Rules
Guide - How to Ask for Help

richb Administrator
System: MX 23 KDE
AMD A8 7600 FM2+ CPU R7 Graphics, 16 GIG Mem. Three Samsung EVO SSD's 250 GB

User avatar
oops
Posts: 1620
Joined: Tue Apr 10, 2018 5:07 pm

Re: inxi/pinxi testers! big weather update

#7 Post by oops »

Hi H2-1,

The --weather-source 3 ... seems the best here.

Code: Select all

$ ./pinxi -xxxW Paris,FR --weather-source 0 # old
Weather:   Temperature: 10 C (50 F) Conditions: Overcast Wind: from South at 5.4 m/s (19 km/h, 12 mph) Humidity: 94% 
           Pressure: 1015 mb (29.98 in) Dew Point: 9 C (48 F) Location: Paris, FR altitude: 86 m (282 ft) 
           Current Time: 2019-02-07 00:50:23 Observation Time: February 7, 12:30 AM CET 
           
$ ./pinxi -xxxW Paris,FR --weather-source 1
Weather:   Temperature: 10 C (50 F) Conditions: Overcast Wind: from South at 5.4 m/s (19 km/h, 12 mph) Humidity: 94% 
           Pressure: 1015 mb (29.98 in) Dew Point: 9 C (48 F) Location: Paris, FR altitude: 86 m (282 ft) 
           Current Time: 2019-02-07 00:50:24 Observation Time: February 7, 12:30 AM CET 
           
$ ./pinxi -xxxW Paris,FR --weather-source 2
Weather:   Temperature: 9 C (48 F) Conditions: light intensity drizzle Wind: from S at 5.1 m/s (18 km/h, 11 mph) 
           Cloud Cover: 90% Humidity: 93% Pressure: 1015 mb (30.45 in) Location: Paris, FR 
           Current Time: 2019-02-07 00:50:26 Observation Time: N/A 


$ ./pinxi -xxxW Paris,FR --weather-source 3
Weather:   Temperature: 9 C (48 F) Conditions: Drizzle Wind: from SSW at 2.7 m/s (10 km/h, 6 mph) Cloud Cover: 100% 
           Rain: 0.172 mm (0.01 in) Humidity: 97% Pressure: 1007 mb (30.21 in) Dew Point: 9 C (48 F) 
           Location: Paris, FR Current Time: 2019-02-07 00:50:31 
           Observation Time: 2019-02-06 23:50:00 (Europe/Paris +0100)
Pour les nouveaux utilisateurs: Alt+F1 pour le manuel, ou FAQS, MX MANUEL, et Conseils Debian - Info. système “quick-system-info-mx” (QSI) ... Ici: System: MX-19_x64 & antiX19_x32

User avatar
h2-1
Posts: 208
Joined: Sat Nov 15, 2008 3:16 pm

Re: inxi/pinxi testers! big weather update

#8 Post by h2-1 »

Great, thanks for testing --weather-source too.

I had to hurry this process so all the testing is appreciated, so far I have only seen a few small missing things and have corrected those subtle points.

Note that I can add api's transparently to inxi users in the future, which means, if one goes away, I can change the default in the api logic and the only difference inxi users would see would be some fields missing data, and the ability to detect locations well changing, along with changes in -W ability to detect the locations, that varies quite a bit between apis I have found.

I built in the possibility to use up to 9 apis with --weather-source, which also has a corresponding user configuration item:

WEATHER_SOURCE=[0-9]

this lets users pick the one they want if the default is not giving the results as expected.

I found also during testing that the varous apis have quite different weather, lol, some clearly had to be wrong, so I built in an option to let you switch sources if you want via config option.

Note that if you use an unsupported value, you'll just get an error on the weather request telling you that, which lets you know the smxi api logic does not yet support, say, api 4.

I may add 4 over the coming days, but that won't impact inxi itself.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

User avatar
timkb4cq
Developer
Posts: 3203
Joined: Wed Jul 12, 2006 4:05 pm

Re: inxi/pinxi testers! big weather update

#9 Post by timkb4cq »

Well done. The automatic location data is correct unlike some other weather sites which auto-locate me in one or another of the nearby cities. Looks from the formatting like it defaults to weather-source 3 for my location.

Code: Select all

tim@mx15:~
$ pinxi -xxxw --weather-source 0
Weather:   Temperature: 21 C (70 F) Conditions: Clear Wind: from WNW at 4.0 m/s (14 km/h, 9 mph) Humidity: 73% 
           Dew Point: 16 C (61 F) Pressure: 1020 mb (30.13 in) Location: Pinellas Park, FL, USA altitude: 5 m (16 ft) 
           Current Time: Wed 06 Feb 2019 06:56:15 PM EST (America/New_York) Observation Time: Wed 06 Feb 2019 05:53:00 PM EST 
tim@mx15:~
$ pinxi -xxxw --weather-source 1
Weather:   Temperature: 21 C (70 F) Conditions: Clear Wind: from WNW at 4.0 m/s (14 km/h, 9 mph) Humidity: 73% 
           Dew Point: 16 C (61 F) Pressure: 1020 mb (30.13 in) Location: Pinellas Park, FL, USA altitude: 5 m (16 ft) 
           Current Time: Wed 06 Feb 2019 06:56:17 PM EST (America/New_York) Observation Time: Wed 06 Feb 2019 05:53:00 PM EST 
tim@mx15:~
$ pinxi -xxxw --weather-source 2
Weather:   Temperature: 22 C (72 F) Conditions: broken clouds Wind: from NW at 2.6 m/s (9 km/h, 6 mph) Cloud Cover: 75% 
           Humidity: 73% Pressure: 1021 mb (30.63 in) Location: Pinellas Park, FL, USA 
           Current Time: Wed 06 Feb 2019 06:56:20 PM EST (America/New_York) Observation Time: Wed 06 Feb 2019 06:35:00 PM EST 
tim@mx15:~
$ pinxi -xxxw --weather-source 3
Weather:   Temperature: 21 C (70 F) Conditions: Clear sky Wind: from WNW at 1.3 m/s (5 km/h, 3 mph) Cloud Cover: 25% 
           Humidity: 80% Dew Point: 18 C (64 F) Pressure: 1019.9 mb (30.6 in) Location: Pinellas Park, FL, USA 
           Current Time: Wed 06 Feb 2019 06:56:22 PM EST (America/New_York) Observation Time: Wed 06 Feb 2019 06:39:00 PM EST 
tim@mx15:~
$ pinxi -xxxw
Weather:   Temperature: 21 C (70 F) Conditions: Clear sky Wind: from WNW at 1.3 m/s (5 km/h, 3 mph) Cloud Cover: 25% 
           Humidity: 80% Dew Point: 18 C (64 F) Pressure: 1019.9 mb (30.6 in) Location: Pinellas Park, FL, USA 
           Current Time: Wed 06 Feb 2019 06:56:43 PM EST (America/New_York) Observation Time: Wed 06 Feb 2019 06:39:00 PM EST
HP Pavillion TP01, AMD Ryzen 3 5300G (quad core), Crucial 500GB SSD, Toshiba 6TB 7200rpm
Dell Inspiron 15, AMD Ryzen 7 2700u (quad core). Sabrent 500GB nvme, Seagate 1TB

User avatar
h2-1
Posts: 208
Joined: Sat Nov 15, 2008 3:16 pm

Re: inxi/pinxi testers! big weather update

#10 Post by h2-1 »

oops, that's good to know, because 3 is currently the default on smxi.org. pinxi by default requests the remote default, which can be changed if I need to do that.

2 is buggy, and does not support, or at least did not in testing, spaces in city/country names (spaces via '+' sign). It also tends to miss many city,state values.

4 may be added.
Last edited by h2-1 on Wed Feb 06, 2019 8:14 pm, edited 1 time in total.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

Post Reply

Return to “antiX”