It is currently April 24th, 2024, 6:13 pm

JSBarometer

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

Re: JSBarometer

Post by jsmorley »

shellerik wrote: April 29th, 2020, 1:18 am What a wonderful idea for a weather skin! I was able to easily customize it to fit in with my existing skins.

Image
Very nice.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: JSBarometer

Post by jsmorley »

Corrected the .rmskin in the first post of this thread to change the @Include .inc files to reflect the new V3 version of the JSON on weather.com.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: JSBarometer

Post by jsmorley »

Ok, I think I have fully addressed the new issues with the weather.com site.

Please get the .rmskin in the first post of this thread.

ONE IMPORTANT NOTE!

The new approach of using the API for the weather.com JSON requires a change to how you access a particular location.

All of the location "codes", like USVA0944 or bbd510e73cb5870f973cea9253bb1f9bfe239a129dfc2b89589cbb6d2d46b4bc or 22308 and such are NO LONGER SUPPORTED.

The new approach requires that you provide a Latitude and Longitude in the WeatherComJSONVariables.inc file. See that file for details on how you can get that for your location.

Please read WeatherCOMJSONVariables.inc carefully, it HAS changed.
Wim
Posts: 69
Joined: September 22nd, 2010, 8:30 pm

Re: JSBarometer

Post by Wim »

Since i had some issues with my own version of jsbarometer i downloaded it again from the first post in this thread a few days ago to get the original version. I thought that the issues with my own version were due to the changes i made but it turns out that the original version i downloaded has the same issue.

It doesn't update. In Rainmeter i can see the actual values it should be displaying but it hasn't updated the skin (see screenshot) and it's still showing the values from the previous refresh. A manual refresh is the only way to update the skin.

I've solved it (sort of) bij removing

Code: Select all

UpdateDivider=-1
with the [MeasureLuaScript] and [CurrentPressurePercent] measures; it does now update, so i don't have tot do a manual refresh to update the skin all the time.

But those lines were there for a reason i figure and i still don't understand why it wasn't updating. What am i missing?
Update.PNG
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: JSBarometer

Post by jsmorley »

The way the skin works is that every 10 minutes WebParser will go out and get the info. This is driven by the @Include files.

Then there is this measure:

Code: Select all

[CheckParent]
Measure=String
String=[@CurrentPressure]
DynamicVariables=1
IfMatchMode=1
IfMatch=^$
IfNotMatchAction=[!EnableMeasure MeasureLuaScript][!UpdateMeasure MeasureLuaScript]
Which forces the Lua script measure to be updated once a second, IF there is valid information returned by the WebParser measures.

Then the Lua itself sets the values of most of the other measures.
Wim
Posts: 69
Joined: September 22nd, 2010, 8:30 pm

Re: JSBarometer

Post by Wim »

That's exactly what i thought it should be doing, but it doesn't, which is the reason for my question.
Last edited by Wim on December 31st, 2020, 3:50 pm, edited 1 time in total.
Wim
Posts: 69
Joined: September 22nd, 2010, 8:30 pm

Re: JSBarometer

Post by Wim »

The code you posted is not the same as in the skin that can be download from the first post in this thread.

Code: Select all

[CheckParent]
Measure=String
String=[@CurrentPressure]
DynamicVariables=1
IfMatchMode=1
IfMatch=^$
IfNotMatchAction=[!EnableMeasure MeasureLuaScript][!UpdateMeasure MeasureLuaScript]
The code in the skin downloaded (and i downloaded it again today to be certain) has this

Code: Select all

[CheckParent]
Measure=String
String=[@CurrentPressure]
DynamicVariables=1
IfMatch=^$
IfNotMatchAction=[!EnableMeasure MeasureLuaScript][!UpdateMeasure MeasureLuaScript][!Update]
I'll run this and see if it makes a difference
Wim
Posts: 69
Joined: September 22nd, 2010, 8:30 pm

Re: JSBarometer

Post by Wim »

This one works. The skin is now updating properly

Code: Select all

[CheckParent]
Measure=String
String=[@CurrentPressure]
DynamicVariables=1
IfMatchMode=1
IfMatch=^$
IfNotMatchAction=[!EnableMeasure MeasureLuaScript][!UpdateMeasure MeasureLuaScript]
I actually tried using IfMatchMode=1 but Rainmeter always crashed completely. Reason of course is that in the original code i never thought to remove [!Update] from

Code: Select all

IfNotMatchAction=[!EnableMeasure MeasureLuaScript][!UpdateMeasure MeasureLuaScript][!Update]
IfMatch.PNG
Urghh O.O

You may want to update your rmskin though.
You do not have the required permissions to view the files attached to this post.
User avatar
JonPeyton
Posts: 23
Joined: November 3rd, 2015, 1:39 am
Location: Tennessee

Re: JSBarometer

Post by JonPeyton »

Thanks JS!
This helps folks with COPD know what sort of conditions they're likely to encounter outside. How easy (or difficult) it might be to breathe.

thanks as usual!
EVGA Z790 Classified
INTEL i9 13900KS
RTX 4090 24GB (Gigabyte)
64GB Corsair Dominator RAM @ 6000MHz
2 Samsung 950 Pro M.2 (System/Gaming)
2 10TB Seagate 7500 RPM (Stuff)
Commander2311
Posts: 4
Joined: August 25th, 2023, 5:39 pm

Re: JSBarometer

Post by Commander2311 »

So something is not working on my end.
I installed the skin, i set my lat/long but the skin does not load, my bar is greyish empty!
What could have gone wrong?