It is currently March 28th, 2024, 11:03 am

JSBarometer

Weather skins
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

JSBarometer

Post by jsmorley »

Updated and improved this skin to parse the weather.com website rather than using the deprecated wxdata feed.

Shows you the current barometric pressure in inches / in (US, Imperial) or millibars / mb (Metric), with some guidance about what the pressure, combined with the state of change, means for your short-term weather forecast.

Right-click the skin and select "Edit Weather Variables" to set your location code and change from inches (en-US) to millibars (en-GB).

Properly read, a barometer is all you really need to know what is likely to happen for the next couple of hours.


JSBarometer_August 4, 2020.rmskin
(21.87 KiB) Downloaded 619 times

1.png

Code: Select all

	if tonumber(convertedPressure) <= 28.59 then
		if string.find(currentChange, 'falling') then
			currentDescription = 'Increasingly Stormy'
		elseif string.find(currentChange, 'steady') then
			currentDescription = 'Remaining Stormy'
		elseif string.find(currentChange, 'rising') then
			currentDescription = 'Stormy, but Improving'
		end
	end
		
	if tonumber(convertedPressure) >= 28.60 and tonumber(convertedPressure) <= 29.50 then
		if string.find(currentChange, 'falling') then
			currentDescription = 'Rain Forecasted'
		elseif string.find(currentChange, 'steady') then
			currentDescription = 'Remaining Rainy'
		elseif string.find(currentChange, 'rising') then
			currentDescription = 'Rainy, but Improving'
		end
	end
	
	if tonumber(convertedPressure) >= 29.51 and tonumber(convertedPressure) <= 30.09 then
		if string.find(currentChange, 'falling') then
			currentDescription = 'Changing toward Rain'
		elseif string.find(currentChange, 'steady') then
			currentDescription = 'Change Possible'
		elseif string.find(currentChange, 'rising') then
			currentDescription = 'Changing toward Fair'
		end
	end
	
	if tonumber(convertedPressure) >= 30.10 and tonumber(convertedPressure) <= 30.59 then
		if string.find(currentChange, 'falling') then
			currentDescription = 'Fair, but Degrading'
		elseif string.find(currentChange, 'steady') then
			currentDescription = 'Remaining Fair'
		elseif string.find(currentChange, 'rising') then
			currentDescription = 'Fair, and Improving'
		end
	end
	
	if tonumber(convertedPressure) >= 30.60 then
		if string.find(currentChange, 'falling') then
			currentDescription = 'Very Dry, but Degrading'
		elseif string.find(currentChange, 'steady') then
			currentDescription = 'Remaining Very Dry'
		elseif string.find(currentChange, 'rising') then
			currentDescription = 'Increasingly Very Dry'
		end		
	end
User avatar
Smurth
Posts: 6
Joined: February 2nd, 2019, 2:10 pm

Re: JSBarometer

Post by Smurth »

Nice ;)
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: JSBarometer

Post by jsmorley »

Changed some cosmetics to add arrows indicating direction and rate of change. New version in first post.
Scott
Posts: 1
Joined: August 29th, 2019, 8:00 am

Re: JSBarometer

Post by Scott »

This is perfect for people who get migraines due to barometric pressure. Thank you for this amazing tool. :thumbup:
Volga2112
Posts: 5
Joined: September 23rd, 2019, 4:37 pm

Re: JSBarometer

Post by Volga2112 »

Great, that will definitely help me! By the way, can it be done so that it'll display the barometric data of several places, with some of them being far away? The thing is that I was considering buying one of these houses in Greece in the near future for the holidays, and I'd like to know what's happening there when I'm at home and the other way around, thanks to home automation systems.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: JSBarometer

Post by jsmorley »

Volga2112 wrote: September 27th, 2019, 3:38 pm Great, that will definitely help me! By the way, can it be done so that it'll display the barometric data of several places, with some of them being far away? The thing is that I was considering buying one of these houses in Greece in the near future for the holidays, and I'd like to know what's happening there when I'm at home and the other way around, thanks to home automation systems.
I really think the simplest thing is to just have more than one copy of the skin, in separate folders under the root config. Then set the location codes for each, and run the ones you want.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: JSBarometer

Post by jsmorley »

Updated to parse the weather.com website rather than using the deprecated wxdata feed.

New .rmskin in the first post of this thread.
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: JSBarometer

Post by mak_kawa »

Hi jsmorley

The weather forecast logic/criteria used in the lua script of this skin is really interesting. It is simply based on pressure and its tendency. I will use this logic in my weather skin.

By the way, is this logic universal and global (= common knowledge in meteorology)? I would appreciate if you provided the reference for this logic. I am really interested in the background of this simple and useful logic/criteria.
Last edited by mak_kawa on January 21st, 2020, 12:55 am, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: JSBarometer

Post by jsmorley »

mak_kawa wrote: January 20th, 2020, 10:06 pm Hi jsmorley

The weather forecast logic/criteria used in the lua script of this skin is really interesting. It is simply based on pressure and its tendency. I will use this logic in my weather skin.

By the way, is this logic universal and global (= common knowledge in meteorology)? I would be appreciated if you provided the reference for this logic. I am really interested in the background of this simple and useful logic/criteria.
This might be a good start:

https://www.thoughtco.com/how-to-read-a-barometer-3444043

I don't remember which website I got the guidance from originally.

Not sure these interpretations are scientific, but more like "tends to be".
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: JSBarometer

Post by mak_kawa »

Thank you for useful information, jsmorley.
Post Reply