HOME | DD

FlyingHyrax — Do I Need a Jacket? 2.0 (beta 2016-04-10) by-nc-sa

#jacket #rainmeter #simple #skin #text #weather #widget #dinaj #temperature
Published: 2014-11-16 00:04:42 +0000 UTC; Views: 396856; Favourites: 534; Downloads: 115337
Redirect to original
Description "Do I Need a Jacket?"Because there aren't enough Rainmeter weather skins

Update in progress of the old "Do I Need a Jacket ?" skin.
(Last updated 10 April 2016)

Improvements thus far:
Uses Lua instead of trying to cram logic into the skin file
Many more adverbs (though it's probably less witty overall)
Instead of trying to incorporate wind speed into the jacket equation, just checks the Wind Chill temperature value
Simplified settings: location, English/Metric, jacket temperature threshold, coat temperature threshold
Can change the size by scrolling the mouse over the skin
Text alignment (left, right, centered) selectable from the skin context menu



The latest version uses Weather.com's wxdata feed - you will need a Weather.com location code.
The code can be found in the URL on the forecast page for your location on Weather.com, using jsmorley 's WXDataWeather skin , or via http://wxdata.weather.com/wxdata/search/search?where=YOUR_LOCATION.

A fix for the old version, which used a Yahoo! weather feed, can be found here: forum.rainmeter.net/viewtopic.…
Related content
Comments: 236

DarkBoxeR In reply to ??? [2016-10-05 06:31:20 +0000 UTC]

we can edit it to say what ever we want??

👍: 0 ⏩: 1

Novadestin In reply to DarkBoxeR [2016-10-13 23:11:37 +0000 UTC]

You can, I suppose, if you're comfortable messing with .lua files.

👍: 0 ⏩: 0

craze4ble In reply to ??? [2016-09-13 22:25:08 +0000 UTC]

The metric switch is messed up! I suppose you used codes from the previous version, because half the scripts expect me to use 'm' for metric, half the scripts expect me to use 'c'.

👍: 0 ⏩: 1

craze4ble In reply to craze4ble [2016-09-13 22:30:09 +0000 UTC]

I fixed most of it (looked through the .lua and changed the references), but the mouseover still doesn't work (displays it in Fahrenheit).

👍: 0 ⏩: 0

Vash9846 In reply to ??? [2016-09-13 13:42:20 +0000 UTC]

strangely, for me, it is getting my location right but the temperature is off by 10 degrees F. 

👍: 0 ⏩: 1

Novadestin In reply to Vash9846 [2016-10-13 23:14:42 +0000 UTC]

Weather.com and Rainmeter have not been communicating all that well lately: www.reddit.com/r/Rainmeter/com…

👍: 0 ⏩: 0

Zachraios In reply to ??? [2016-08-10 11:50:28 +0000 UTC]

Hey there, I translated the skin to German, at least what I was able to do by changing Text and a little piece of code in the .lua file, but I am curious if one would be able to translate the mCondition string as well. At the Moment my skin says "Cloudy, 13° C (fühlt sich an wie 13° C)". Would it be possible to pull the info from the wxdata.weather.com site and the translating it in a "if mCondition=cloudy set mCondition=bewölkt; if mCondition=Showers in the Vicinity set mCondition=In der Nähe Schauer..." way?
Awesome Skin BTW

👍: 0 ⏩: 1

truehd24 In reply to Zachraios [2016-08-15 00:33:27 +0000 UTC]

I've translated it into Spanish and the way I did it is kinda messy but under [mCondition] add a line that says Substitute="Cloudy":"fühlt sich an wie", "other thing":"german thing" and repeat for each condition. The process is outlined here docs.rainmeter.net/manual/meas…

👍: 0 ⏩: 0

wydoOriginal [2016-08-10 07:22:29 +0000 UTC]

I see that Wind information seems to be being added to a variable, how would one go about getting a Wind comment to show on the Second line after the Temp comment?

BTW, love this skin...

👍: 0 ⏩: 0

bewewe In reply to ??? [2016-08-09 17:11:34 +0000 UTC]

i love the skin. but why on second line its always stuck on its kinda hot outside when you need a jacket?

👍: 0 ⏩: 0

MrJeff420 In reply to ??? [2016-08-03 13:58:49 +0000 UTC]

Works perfectly after modifing lua with WindFreaker's helpful answer. Cheers

👍: 0 ⏩: 0

DoctorFace [2016-07-26 15:57:46 +0000 UTC]

Works perfectly, even for celsius. "You don't need a jacket. It's your hair is on FIRE outside" made me laugh. Awesome work bud.

👍: 0 ⏩: 1

berenique In reply to DoctorFace [2016-08-08 08:40:41 +0000 UTC]

I just updated from DNIJ.1, and it doesn't work for me with Celsius. No matter to what I set the jacket/coat_temp it always says "You need a coat" ( but then "It's pretty nice outside"), how did you adjust the thresholds for Celsius?

👍: 0 ⏩: 1

Zachraios In reply to berenique [2016-08-10 11:41:26 +0000 UTC]

local Settings = {}
Settings.init = function(props)
   Settings.Jacket_Limit = SELF:GetNumberOption(props.JacketThreshold, 60)
   Settings.Coat_Limit = SELF:GetNumberOption(props.CoatThreshold, 30)

   local metric = { m = true, c = true }
   local unit = string.lower(string.sub(props.Unit, 1, 1))
   Settings.Unit =  metric[unit] and 'c' or 'f'
end

Change this block of code in the .lua file to:

local Settings = {}
Settings.init = function(props)
   Settings.Jacket_Limit = props.JacketThreshold
   Settings.Coat_Limit = props.CoatThreshold

   local metric = { m = true, c = true }
   local unit = string.lower(string.sub(props.Unit, 1, 1))
   Settings.Unit =  metric[unit] and 'c' or 'f'
end

👍: 0 ⏩: 2

xPReaper In reply to Zachraios [2016-12-06 16:14:48 +0000 UTC]

Thanks dude! 

👍: 0 ⏩: 2

ha5rika In reply to xPReaper [2017-02-12 05:38:25 +0000 UTC]

It's okay, I figured it out for myself. Thanks.

👍: 0 ⏩: 0

ha5rika In reply to xPReaper [2017-02-12 05:25:31 +0000 UTC]

I have the same problem. Could you tell me how to access and edit the .lua file?

👍: 0 ⏩: 0

berenique In reply to Zachraios [2016-08-10 13:24:04 +0000 UTC]

Dude thanks!

👍: 0 ⏩: 0

flod1998 In reply to ??? [2016-06-23 10:08:56 +0000 UTC]

What I have to do to change a color of only one line?

👍: 0 ⏩: 0

ImageCreativeCreator In reply to ??? [2016-06-04 13:37:38 +0000 UTC]

I can't get it to work, even with the forum's fix. nothing happens i really could use some help please. i love this skin

👍: 0 ⏩: 0

mcmanybucks [2016-05-17 08:34:45 +0000 UTC]

How do i set it to Celsius?

👍: 0 ⏩: 1

sporqist In reply to mcmanybucks [2016-06-06 17:43:57 +0000 UTC]

set unit on line 32 to "m" instead of "f"

u should adjust line 35 and 36 too.

👍: 0 ⏩: 0

Animayz In reply to ??? [2016-04-27 12:53:48 +0000 UTC]

getting the loading error. worked the other day but when I booted up today, it was broke.

When I hover over the 3 dots, it correctly shows the temperature and the "feels like" temperature; hovering over "loading..." displays the correct location, but it does not show the correct time - I believe it is stuck at the time I booted up. Refreshing the skin and restarting rainmeter does not update the time. However, when I change the weather code to anything else, it shows appropriate messages ("You need a jacket. It's frosty outside"). Time displayed on hover remains unchanged.

👍: 0 ⏩: 0

S0hva In reply to ??? [2016-04-26 11:25:52 +0000 UTC]

[mFeelsLike] measure regex should be changed to this
RegExp=(-?\d+) 
so it gets negative numbers too

👍: 0 ⏩: 1

FlyingHyrax In reply to S0hva [2016-07-08 21:40:43 +0000 UTC]

Nice catch, thanks!

👍: 0 ⏩: 0

JohnsonMMI [2016-04-24 16:49:10 +0000 UTC]

Thanks for this skin, I love it!

👍: 0 ⏩: 0

Melcor83 [2016-04-22 12:29:39 +0000 UTC]

Hello,

My current settings are:

; Weather.com location code
; Go to weather.com and search for your location.
; The location code is in the URL on the page for your location.
; e.g. for Chicago:
; weather.com/weather/today/l/US…
;                                     ^^^^^^^^
locationLXX0028:1L

; 'f' for English, 'm' for Metric
unit=m

; temperature thresholds; if you are using Celsius make sure you adjust these
jacket_temp=18
coat_temp=5

It is 12C outside and it says I need a coat... 2016-04-10 version. Help would be appreciated 

👍: 0 ⏩: 1

Melcor83 In reply to Melcor83 [2016-04-23 21:39:40 +0000 UTC]

So what I was able to find out so far is that the script is loading default values in this section regardless of what is in the ini file:

-- script measure settings
local Settings = {}
Settings.init = function(props)
   Settings.Jacket_Limit = SELF:GetNumberOption(props.JacketThreshold, 60)
   Settings.Coat_Limit = SELF:GetNumberOption(props.CoatThreshold, 35)

   local metric = { m = true, c = true }
   local unit = string.lower(string.sub(props.Unit, 1, 1))
   Settings.Unit =  metric[unit] and 'c' or 'f'
end

So you get 60 for jacket limit and 35 for coat limit no matter what is in the ini file. As by this moment I was not able to find out why... 
Any ideas?

👍: 0 ⏩: 1

WindFreaker In reply to Melcor83 [2016-04-24 05:59:21 +0000 UTC]

Fixed it. I don't know what I did (never coded in lua before) but it works.
Probably broke some other functions of it in the process, so tell me if you have any issues with this modification.

Firstly, search for the "-- script measure settings"
Notice this block of code.

local Settings = {}
Settings.init = function(props)
   Settings.Jacket_Limit = SELF:GetNumberOption(props.JacketThreshold, 60)
   Settings.Coat_Limit = SELF:GetNumberOption(props.CoatThreshold, 30)

   local metric = { m = true, c = true }
   local unit = string.lower(string.sub(props.Unit, 1, 1))
   Settings.Unit =  metric[unit] and 'c' or 'f'
end

Change this block of code to my modified version.

local Settings = {}
Settings.init = function(props)
   Settings.Jacket_Limit = props.JacketThreshold
   Settings.Coat_Limit = props.CoatThreshold

   local metric = { m = true, c = true }
   local unit = string.lower(string.sub(props.Unit, 1, 1))
   Settings.Unit =  metric[unit] and 'c' or 'f'
end

All i did was change two lines of FlyingHyrax's original code (couldn't figure out what the hell it did, my fault for not knowing lua) and added my own code.
With this change the config should work as intended.
Again, tell me if anything else is not working with this fix, as my lack of programming knowledge may have done some horrible things.

👍: 0 ⏩: 2

Foamflask In reply to WindFreaker [2016-05-18 14:40:18 +0000 UTC]

Thank you very much! This worked for me as well

👍: 0 ⏩: 0

Melcor83 In reply to WindFreaker [2016-04-25 10:07:05 +0000 UTC]

It worked Thank you
It's interesting because GetNumberOption(a, b) determines whether "a" is a valid number and if it is not then it returns "b". So it would seem that for GetNumberOption the thresholds are not valid but if you assign them directly then they work... Maybe I'll fiddle with it later but for now your solution works so thank you again.

👍: 0 ⏩: 0

chingnam123 In reply to ??? [2016-04-21 04:30:20 +0000 UTC]

Hi,

After downloading the 2016-04-10 version, DINAJ2 doesn't response correcting to the weather setting that I made.

My current setting is:

[Variables]

; Weather.com location code
; Go to weather.com and search for your location.
; The location code is in the URL on the page for your location.
; e.g. for Chicago:
; weather.com/weather/today/l/US… HKXX0049:1:HK
;                                     ^^^^^^^^
location=HKXX0049

; 'f' for English, 'm' for Metric
unit=m

; temperature thresholds; if you are using Celsius make sure you adjust these
jacket_temp=22
coat_temp=18

It's 29C here and saids I need a coat, It's extra warm outside.

Any ideas?

👍: 0 ⏩: 1

WindFreaker In reply to chingnam123 [2016-04-25 22:16:01 +0000 UTC]

Here is a fix I found.

Firstly, open up the skins folder. For me, it is "C:\Users\windf\Documents\Rainmeter\Skins\DINAJ2"
Next, open up the "dinaj.lua" file with a simple text editor like Notepad.
Finally, search for the "-- script measure settings", and then notice this block of code.

local Settings = {}
Settings.init = function(props)
   Settings.Jacket_Limit = SELF:GetNumberOption(props.JacketThreshold, 60)
   Settings.Coat_Limit = SELF:GetNumberOption(props.CoatThreshold, 30)

   local metric = { m = true, c = true }
   local unit = string.lower(string.sub(props.Unit, 1, 1))
   Settings.Unit =  metric[unit] and 'c' or 'f'
end

Change this block of code to my modified version.

local Settings = {}
Settings.init = function(props)
   Settings.Jacket_Limit = props.JacketThreshold
   Settings.Coat_Limit = props.CoatThreshold

   local metric = { m = true, c = true }
   local unit = string.lower(string.sub(props.Unit, 1, 1))
   Settings.Unit =  metric[unit] and 'c' or 'f'
end

After changing this, the config should work as intended.

👍: 0 ⏩: 1

Xero3g In reply to WindFreaker [2016-09-22 20:08:01 +0000 UTC]

Thanks, fixed it.

👍: 0 ⏩: 0

Savsarel In reply to ??? [2016-04-12 10:16:18 +0000 UTC]

Hi,

Got a Loading... issue, just gets stuck there.

It works on US locale but not on my Norwegian location.

; Weather.com location code
; Go to weather.com and search for your location.
; The location code is in the URL on the page for your location.
; e.g. for Chicago:
; weather.com/weather/today/l/US…
;                                     ^^^^^^^^
location=NOXX0377

; 'f' for English, 'm' for Metric
unit=m

; temperature thresholds; if you are using Celsius make sure you adjust these
jacket_temp=15
coat_temp=5

Any ideas?

👍: 0 ⏩: 1

Savsarel In reply to Savsarel [2016-04-13 10:15:56 +0000 UTC]

Ok, seem to have fixed itself today for no reason, guess something was up with the location source.

👍: 0 ⏩: 0

marcuss95 [2016-04-10 03:34:06 +0000 UTC]

Nice

👍: 0 ⏩: 0

truehd24 [2016-04-08 02:11:29 +0000 UTC]

Hidden by Commenter

👍: 0 ⏩: 1

Audrey1tj In reply to truehd24 [2016-04-08 22:30:14 +0000 UTC]

thanks for no help .e.

👍: 0 ⏩: 0

nobodyx01 In reply to ??? [2016-03-26 03:02:49 +0000 UTC]

Will there be a fix for the Yahoo API switch? I've been trying to fix it but so far have come empty handed

👍: 0 ⏩: 1

jsmorley In reply to nobodyx01 [2016-03-26 13:05:26 +0000 UTC]

forum.rainmeter.net/viewtopic.…

👍: 0 ⏩: 0

nobodyx01 [2016-03-24 15:34:18 +0000 UTC]

I absolutely love this skin, it fits so nicely with pretty much every other skin out there

But I've ran into a issue. I haven't changed the WOIED, and whenever I booted up today, the tweak was stuck on the loading phase, which usually only lasts a second

I've tried reinstalling it, and nothing has worked for me so far. I have changed the font, Celcius to Farenheit, WOIED, & the tolerances.

; Yahoo WOEID; lookup at woeid.rosselliot.co.nz/lookup/
location=2487889

; 'f' for English, 'c' for Metric
unit=f

; temperature thresholds; if you are using Celsius make sure you adjust these
jacket_temp=65
coat_temp=40

; appearance
font=Segoe UI Light
text_color=255,255,255,200

What's even weirder is that the first version works fine, and also the other weather skin I have installed works too!

EDIT: No, now the other one doesn't work either.

👍: 0 ⏩: 1

LadyethKenna In reply to nobodyx01 [2016-03-24 15:56:51 +0000 UTC]

yup the loading error is happening to me as well

👍: 0 ⏩: 1

nobodyx01 In reply to LadyethKenna [2016-03-24 16:31:08 +0000 UTC]

I heard that it's an issue with a API or something along those lines. From what I can read in the code, it takes the weather from Yahoo from a set link. Since Yahoo changed it however, and even changing the URL to another URL that SHOULD work, it doesn't.

👍: 0 ⏩: 1

ViperInfinity In reply to nobodyx01 [2016-03-25 04:08:55 +0000 UTC]

getting the same issue.

👍: 0 ⏩: 1

UmbraDragonX In reply to ViperInfinity [2016-03-26 02:12:55 +0000 UTC]

same here; this is appearing with all weather widgets I'm using that use Yahoo.

👍: 0 ⏩: 1

nobodyx01 In reply to UmbraDragonX [2016-03-26 03:37:23 +0000 UTC]

There's an update to fix (most) of the Yahoo skins.

You can find it here: forum.rainmeter.net/viewtopic.…

👍: 0 ⏩: 0

animooshi In reply to ??? [2016-02-20 00:42:25 +0000 UTC]

I've changed the weather location code but it just says "loading..." all the time, is there any way to fix this?
I'm new to rainmeter so I'm not sure what infor you need but this is what I changed in the variables section:


; Yahoo WOEID; lookup at woeid.rosselliot.co.nz/lookup/
location=ASXX0622

; 'f' for English, 'c' for Metric
unit=c

; temperature thresholds; if you are using Celsius make sure you adjust these
jacket_temp=20
coat_temp=15

👍: 0 ⏩: 0

pikabun91 [2016-01-17 09:14:16 +0000 UTC]

love this!

👍: 0 ⏩: 0

Haydenwaffles In reply to ??? [2015-12-29 20:23:05 +0000 UTC]

Hey I love this skin, just one thing, how do I make it black or darked colored like the old one?

👍: 0 ⏩: 0


<= Prev | | Next =>