Page 1 of 5

JSBarometer

Posted: February 16th, 2019, 5:47 pm
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

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

Re: JSBarometer

Posted: February 17th, 2019, 11:29 am
by Smurth
Nice ;)

Re: JSBarometer

Posted: February 17th, 2019, 5:42 pm
by jsmorley
Changed some cosmetics to add arrows indicating direction and rate of change. New version in first post.

Re: JSBarometer

Posted: August 29th, 2019, 8:04 am
by Scott
This is perfect for people who get migraines due to barometric pressure. Thank you for this amazing tool. :thumbup:

Re: JSBarometer

Posted: September 27th, 2019, 3:38 pm
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.

Re: JSBarometer

Posted: September 27th, 2019, 3:43 pm
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.

Re: JSBarometer

Posted: January 20th, 2020, 4:53 pm
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.

Re: JSBarometer

Posted: January 20th, 2020, 10:06 pm
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.

Re: JSBarometer

Posted: January 20th, 2020, 10:34 pm
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".

Re: JSBarometer

Posted: January 20th, 2020, 11:04 pm
by mak_kawa
Thank you for useful information, jsmorley.