topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • February 19, 2019, 05:35 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Release: sWeather (tray-based weather app)  (Read 222718 times)

click-click

  • Participant
  • Joined in 2016
  • *
  • Posts: 16
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #675 on: January 31, 2019, 04:28 PM »
Why is Sweather now connecting out so often? I have refresh set at 15 minutes. This used to work correctly with older
versions of Sweather with only 2 (open/close) connections every so often. Now I see this:
outbound.jpgRelease: sWeather (tray-based weather app)
What's the reason for for the extra bandwith usage and can this be reduced or turned off?

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,110
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #676 on: January 31, 2019, 04:54 PM »
Why is Sweather now connecting out so often?

Those aren't weather data requests; they're requests to timezonedb.com which is used for the "location time in time in the titlebar" option.  I added a fix in v1.7.8 because that text wasn't always showing properly in the titlebar.  To fix it, I now request the location time any time the sWeather window is activated.  That is, sWeather does not keep an internal clock of its own.  I didn't think this would be much of an issue since the amount of data is only around 250 bytes per request.  In your screenshot above, were you focusing the sWeather window repeatedly?  If not, there's a problem, and I can look into fixing it.  Here's an example of data that's returned:

<result>
<status>OK</status>
<message/>
<countryCode>US</countryCode>
<zoneName>America/Chicago</zoneName>
<abbreviation>CST</abbreviation>
<gmtOffset>-21600</gmtOffset>
<dst>0</dst>
<timestamp>1548952639</timestamp>
</result>

That's it.  I suppose I could add a check that makes it not requery for time data unless a certain amount of time has passed but the drawback would be that the time would not be accurate.  Is 250 bytes of data per hit too much?  Are you constantly focusing the sWeather window during the day?

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,110
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #677 on: January 31, 2019, 05:04 PM »
Never mind...I can see the same behaviour here.  I'll work on a fix.

click-click

  • Participant
  • Joined in 2016
  • *
  • Posts: 16
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #678 on: January 31, 2019, 05:07 PM »
 Maybe the location time should fall under the refresh rule since it reflects the temp and conditions at that given time. No need to keep updating the time until the other information gets refreshed. Seems to me that would be more accurate.
« Last Edit: January 31, 2019, 06:09 PM by click-click »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,110
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #679 on: January 31, 2019, 06:02 PM »
This should fix it.  The TimezoneDB API should only get queried when the main window is activated/focused.  Thank you for reporting this bug.

Website & Download
v1.8.0 - 2019-01-31
    ! Reduced the number of times the TimezoneDB API was queried.  (Thanks, click-click)

click-click

  • Participant
  • Joined in 2016
  • *
  • Posts: 16
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #680 on: January 31, 2019, 06:13 PM »
Did you miss my previous post about optionally selecting the main icon as explained by me and Drugwash?

click-click

  • Participant
  • Joined in 2016
  • *
  • Posts: 16
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #681 on: January 31, 2019, 06:37 PM »
This should fix it.  The TimezoneDB API should only get queried when the main window is activated/focused.  Thank you for reporting this bug.

Okay, that's much better now. Thanks

click-click

  • Participant
  • Joined in 2016
  • *
  • Posts: 16
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #682 on: February 01, 2019, 10:21 AM »
No big deal, but the old symptom of the missing time/date in the title bar is back. Close the GUI and then open it again from the tray icon and the GUI title bar doesn't show anything until you manually use the refresh button. I assume the way this was fixed previously was to continuously check/update with the time server which IMHO was a bad idea. Do you not have any control of the GUI when launched from the icon and can you not just issue a single manual refresh after launching?

Edit:
Seems to only happen on W10. I don't see this happening on Win7. Will check W8.1 in a minute.
Win8.1 also shows this symptom.
« Last Edit: February 01, 2019, 11:43 AM by click-click »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,110
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #683 on: February 01, 2019, 12:55 PM »
Seems to only happen on W10. I don't see this happening on Win7. Will check W8.1 in a minute.
Win8.1 also shows this symptom.

I use and develop on a Windows 7 box, so it worked for me.  I'll see if I can get access to a Windows 10 machine to test.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,110
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #684 on: February 06, 2019, 12:44 PM »
Here's an interim build of sWeather which gives the user control over which of the tray icons are shown.  You can choose either or both.  However, I had to use the older Tray() library I talked about previously, so I'm limited in how much I can display in the tray icon tooltip.  In other words, I have to use the shorter format of the two tooltips you would see in the older version.  C'est la vie.  If you'd like to try it out, download this:

http://www.dcmembers...Weather_v1.8.0.2.zip

If you do try it out, please let me know if it works properly for you.
« Last Edit: February 14, 2019, 09:26 AM by skwire »

Drugwash

  • Participant
  • Joined in 2009
  • *
  • Posts: 52
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #685 on: February 07, 2019, 08:36 AM »
I have a few questions:
- how come on a technical/software forum board any reply (and private message) is limited to 65530 characters?
- how come certain attachment types (such as 7z, zip, ahk) yield an 'invalid attachment' message? (using a QtWeb 3.8.5 browser)

I had added the ability to select tray icon a few das ago. Earlier I had devised a much shorter code for the wind direction function, and earlier than that I had also compacted all the icon-creation function into a single one, saving a lot of redundant code. But I couldn't post the code for the above-mentioned reasons.
Who exactly is the culprit here and why?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 39,143
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #686 on: February 07, 2019, 10:27 AM »
Hi Drugwash (interesting nickname.. is there a story behind it?).

The limits to post/message size are just part of the forum system we use.. It's a bit long in the tooth and old school, but I can't say I can remember it being an issue before.. That's a pretty huge message size and it's probably better to split up posts that get that big (it does not include image/attachment size in that limit of course).

You should be able to upload 7z, zip, and ahk files... Only a few extensions are blocked.  So maybe something else is going wrong?

ps.
I appreciate your contributions to improving the software posted here!  :up:

Drugwash

  • Participant
  • Joined in 2009
  • *
  • Posts: 52
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #687 on: February 07, 2019, 01:43 PM »
Hi, Jesse, thanks for chiming in.
I chose this nickname for myself about twenty years ago when I saw the Internet couldn't cope with some special character in my real name. It's just my real first name (DragoĊŸ in Romanian) in an English pronounciation.

Seeing we're talking about software here, at times we may want to post snippets of code, as examples or patches or whatever. Recently I wanted to post some code in an attempt to help solving some issues with the application at hand, namely sWeather. However, that code easily goes over the 64kB size so it can't be posted as is and splitting it is not feasible. And for some reason, when I tried to attach it in an alternative form (as ahk script or as 7z or zip package) the board consistently returned an error. Maybe my browser isn't supported by the board software, that's why I mentioned it above so that someone may perform a check.

I'm just trying to help, nothing more, but it's hard to impossible in such conditions. So please see if anything can be done in this regard or at least, if someone doesn't want me to post code, let them say it openly.
Thank you.

P.S. Cloudflare access for DC? That's new (and from my point of view, bad - disturbing and time consuming for a 15kB/s connection).
« Last Edit: February 07, 2019, 01:56 PM by Drugwash, Reason: fixed typo and added post-scriptum »

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,331
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #688 on: February 07, 2019, 01:55 PM »
as 7z or zip package
Attaching files to posts, or inserting screenshots (png's) into the message, has never been an issue here, using Palemoon, Firefox or Chrome browsers.

Drugwash

  • Participant
  • Joined in 2009
  • *
  • Posts: 52
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #689 on: February 07, 2019, 02:00 PM »
@ Ath: That's why I mentioned me using the QtWeb 3.8.5 browser. My hardware is quite old and limited, the OS is XP-SP3, therefore I prefer this very lightweight browser.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 39,143
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #690 on: February 07, 2019, 02:11 PM »
P.S. Cloudflare access for DC? That's new (and from my point of view, bad - disturbing and time consuming for a 15kB/s connection).
we only enable that when we are suffering from a DNS flood that would otherwise debilitate the server.

Drugwash

  • Participant
  • Joined in 2009
  • *
  • Posts: 52
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #691 on: February 07, 2019, 02:29 PM »
Ah, I see. Thank you for the clarification.  :up:

click-click

  • Participant
  • Joined in 2016
  • *
  • Posts: 16
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #692 on: February 13, 2019, 05:48 PM »

If you do try it out, please let me know if it works properly for you.

Everything looks good and working fine now on W7 W8.1 and W10. Thanks for the fixes and thanks for adding the icon selection option. I appreciate that.
« Last Edit: February 13, 2019, 07:21 PM by click-click »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,110
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #693 on: February 14, 2019, 02:23 PM »
Everything looks good and working fine now on W7 W8.1 and W10. Thanks for the fixes and thanks for adding the icon selection option. I appreciate that.

@click-click: Good to hear and thanks for the report.

Forgot to post this notice a few days ago:

Website & Download
v1.8.1 - 2019-02-11
    * Tray icon options have changed.  You can now display either or both icons.
    ! On a delayed startup, tray icon was showing blank instead of the N/A icon. (Thanks, T. Elliot)
    * Added a small delay when updating location time.

Drugwash

  • Participant
  • Joined in 2009
  • *
  • Posts: 52
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #694 on: February 14, 2019, 03:03 PM »
Just some code improvement:
GetWindDirection( sNum )
{
Static Cardinals := ["N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S", "SSW", "SW", "WSW", "W"
, "WNW", "NW", "NNW", "N"]
Return Cardinals[Floor((sNum+11.24)/22.5)+1]
}