Weather Banner Issue #18

Closed
opened 2024-02-11 17:56:30 -05:00 by heartpops · 3 comments
heartpops commented 2024-02-11 17:56:30 -05:00 (Migrated from github.com)

Hi, I have an issue that I've never been able to figure out. I included a screenshot to show that I've never been able to get the weather function to show the correct temp, it is always at the default 70. I downloaded another weather widget to see if it was an issue on my end (also seen in the screenshot) and it seems to be working just fine. I'm sorry if there's a simple solution that I haven't thought of, any help figuring this out would be greatly appreciated.

Screenshot 2024-02-11 141549

Hi, I have an issue that I've never been able to figure out. I included a screenshot to show that I've never been able to get the weather function to show the correct temp, it is always at the default 70. I downloaded another weather widget to see if it was an issue on my end (also seen in the screenshot) and it seems to be working just fine. I'm sorry if there's a simple solution that I haven't thought of, any help figuring this out would be greatly appreciated. ![Screenshot 2024-02-11 141549](https://github.com/Xenon257R/blue-archive-rainmeter/assets/121929523/ee75f1db-f142-4a2a-ada4-7fffe05a5e03)
Xenon257R commented 2024-02-11 20:16:03 -05:00 (Migrated from github.com)

This is an extremely embarrassing mistake by me regarding data types in between bangs. Thankfully, this should be an easy fix.

In BlueArchive/PrimaryBanner/weatherbanner.ini, you will want to add a : in Lines* 71 and 77 right after WeatherTempC so that the values are treated as numbers and not strings, like so:

(Line 71) Formula=((9/5)*[WeatherTempC:])+32
...
(Line 77) Formula=[WeatherTempC:]+273.15

And that should fix the issue. I am very sorry about the bug, and I have made the changes on my end as well in preparation for a cleanup patch.


As an additional note, I also recommend changing the RegExp string in Line* 49 of the same file to the following:

RegExp=(?siU)"iconCode":(.*),.*"temperature":(-?\d*),.*"wxPhraseLong":"(.*)",.*"v3-location-point":(?(?=.*"location").*"city":"(.*)",.*"countryCode":"(.*)",)

There was an unnoticed issue of the script being unable to capture negative temperatures due to me not being in a part of the world where it gets that cold, and this new regex string fixes said issue.


* Line numbers may be slightly different if you have made modifications to the file.

This is an extremely embarrassing mistake by me regarding data types in between bangs. Thankfully, this should be an easy fix. In `BlueArchive/PrimaryBanner/weatherbanner.ini`, you will want to add a `:` in Lines* 71 and 77 right after `WeatherTempC` so that the values are treated as numbers and not strings, like so: ``` (Line 71) Formula=((9/5)*[WeatherTempC:])+32 ... (Line 77) Formula=[WeatherTempC:]+273.15 ``` And that should fix the issue. I am very sorry about the bug, and I have made the changes on my end as well in preparation for a cleanup patch. *** As an additional note, I also recommend changing the RegExp string in Line* 49 of the same file to the following: ```RegExp=(?siU)"iconCode":(.*),.*"temperature":(-?\d*),.*"wxPhraseLong":"(.*)",.*"v3-location-point":(?(?=.*"location").*"city":"(.*)",.*"countryCode":"(.*)",)``` There was an unnoticed issue of the script being unable to capture negative temperatures due to me not being in a part of the world where it gets that cold, and this new regex string fixes said issue. *** \* Line numbers may be slightly different if you have made modifications to the file.
Xenon257R commented 2024-02-11 20:50:17 -05:00 (Migrated from github.com)

My apologies, it looks like this problem goes a little further than what I had initially thought above. The problem did have to do with WebParser having an inherent 0 number value that appears to take precedence over the parsed (numeric) string value when Calc measures uses them, but it was also being affected by the nature of DynamicVariables (in this case, lack thereof).

Since it requires more than a couple changes in the code, I provided a .zip file here that has an updated, clean copy of weatherbanner.ini with which you can replace the bugged one in BlueArchive/PrimaryBanner. You will have to re-pick your temperature preference and region after refreshing the suite. I hope that is okay with you.

My apologies, it looks like this problem goes a little further than what I had initially thought above. The problem did have to do with WebParser having an inherent `0` number value that appears to take precedence over the parsed (numeric) string value when `Calc` measures uses them, but it was also being affected by the nature of `DynamicVariables` (in this case, lack thereof). Since it requires more than a couple changes in the code, I provided a [.zip file here](https://github.com/Xenon257R/blue-archive-rainmeter/files/14234752/weatherbanner.zip) that has an updated, clean copy of `weatherbanner.ini` with which you can replace the bugged one in `BlueArchive/PrimaryBanner`. You will have to re-pick your temperature preference and region after refreshing the suite. I hope that is okay with you.
Xenon257R commented 2024-02-13 00:28:54 -05:00 (Migrated from github.com)

I have just published a v1.1.3 update for the suite, and the fix to this issue has been addressed in it. You can install the new patch (after reviewing the Rainmeter-specific Issue #7) to fix this issue alongside several other changes for the suite.

Let me know if the new patch fixes your issue! If the new patch somehow still doesn't fix it on your computer, reopen this issue and please provide a copy of your (new & tried) weatherbanner.ini file in a .zip file with any other additional details that you think may be valuable and I will look into it further.

I have just published a [v1.1.3 update](https://github.com/Xenon257R/blue-archive-rainmeter/releases/tag/v1.1.3) for the suite, and the fix to this issue has been addressed in it. You can install the new patch (after reviewing the *Rainmeter*-specific Issue #7) to fix this issue alongside several other changes for the suite. Let me know if the new patch fixes your issue! If the new patch somehow still doesn't fix it on your computer, reopen this issue and please provide a copy of your (new & tried) `weatherbanner.ini` file in a `.zip` file with any other additional details that you think may be valuable and I will look into it further.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Xenon257R/blue-archive-rainmeter#18
No description provided.