It is currently January 17th, 2021, 9:11 am

JSBarometer

Weather skins
User avatar
jsmorley
Developer
Posts: 21464
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: 21464
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: 21464
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: 65
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: 21464
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: 65
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: 65
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: 65
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.