Hello, I am new at using Zooper, but am wanting to create a conditional formula that basically would be something like this...
If Humidity > 50% < 70 % = "Comfortable", > 70% = "Sweltering"
Is this even possible to do with Zooper and if so, how.....please help
Zooper doesn't allow nested conditionals, but you don't have anything for a humidity value under 50% so it shouldn't matter.
$#WCHUMN#<70?Comfortable:Sweltering$
$#WCHUMN#<70?Comfortable:Sweltering$ Outside Today
That worked great but what i am trying to accomplish is this...
What I want to do is something like if humidity between 0 and 25 "Beautiful" between 26 and 50 "Comfortable" between 51 and 75 "Uncomfortable" else "Sweltering"
It's kicking my butt trying to figure out the required formula....Please help if you can....
Not sure if that's possible, unfortunately
Changed it to this and seems to work fine........
$[#WCHUMN#>=0] && [#WCHUMN#<25]?Beautiful out today$
$[#WCHUMN#>=26] && [#WCHUMN#<50]?Comfortable out today$
$[#WCHUMN#>=51] && [#WCHUMN#<75]?Uncomfortable out today$
$[#WCHUMN#>76] && [#WCHUMN#<100]?Sweltering out today$
Related
I am trying to figure out how to calculate dewpoint from temperature and humidity. The formula is ridiculously long, but there is a simple formula that gives an approximation, which is good enough for my purposes.
Td = T - ((100 - RH)/5).
Td = Dewpoint in degrees Celcius
T = Temperature in degrees Celcius
RH = Humidity
Since my phone is in degrees F. I had to convert to degrees C. This is what I did, but it doesn't work, I think because of the % symbol attached to the humidity variable: $int((#WCTEMP#-32)*5/9))-(100-#WCHUM#)/5)$. The problem is, it just displays exactly what I typed, it doesn't do the math. Can anyone point a noob in the right direction? It is probably obvious, but I am still trying to figure out zooper.
I have seen other requests for a dewpoint variable on the forums, so there is a demand out there. Any help would be appreciated, thanks!
Do you own Tasker?
You could do an https get on yahoo weather api and get all the info from there.
Its not to terribly difficult. Probably on the intermediate level.
Sent from my Nexus 5 using Tapatalk
I was just considering purchasing that tonight. I will give that a shot! Thanks Mr Biggzz
MrBiggzz said:
Do you own Tasker?
You could do an https get on yahoo weather api and get all the info from there.
Its not to terribly difficult. Probably on the intermediate level.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Its a great app!
Sent from my Nexus 5 using Tapatalk
@robgross how are you making out?
MrBiggzz said:
@robgross how are you making out?
Click to expand...
Click to collapse
I downloaded Tasker but haven't had time to learn it yet...but I will! I do know that ZW sees #WCHUM# as text, so it will not formulate it. I tried using #WCHUMN# to see if it would dispay the value as a number, as #WCTEMPN# does...but that didnt work. Thanks for following up!
Christmas in May!
Dave Handler shares a file with you, please click the link to download: http://dl.dropboxusercontent.com/1/view/qqiv1skjchq7ifu/Tasker Projects/Yahoo_Weather.prj.xml
In it are two tasks Input Zip code which uses a scene to well, get the zip!
The other task is Get Yahoo Weather. That uses a variable that gets set when you set the zip code.
Set your zip and the run the weather task and then check the variables tabs. You'll see every thing that is supplied including the five day forecast.
You'll have to figure what you want and pass it on to Zooper. Every variable for weather is global!
Enjoy!
p.s. everything is in standard units. Fahrenheit, mph and inches. This only thing I didn't do is give you an indicator if the barometric pressure is falling, stable or rising. If you need it I can put it in there!
Sent from my Nexus 5 using Tapatalk
Mr. Biggs, thanks for this, but I can't seem to open this link, it says it's not valid both in Tasker and a browser.
MrBiggzz said:
@robgross how are you making out?
Click to expand...
Click to collapse
MrBiggzz, I figured out how to use Tasker! It's a lot easier to use than I thought, and the possibilities are endless. Thanks for the tip!
I know its an old thread and i was seaching in this thread too; and now i solved by myself. I post here the solution for tasker if someone needs it:
You need to set up or read out from web 2 variables (%temp = temperature and %hum = humidity), once you have set the 2 variables you need to add a code java scriplet to the task to calculate dewpoint and absolute humidity:
function taupunkt() {
if ( (temp == null || temp == 0) ||
(hum == null || hum == 0) ) {
return;
}
var a1=7.45;
var b1=235;
tp=temp;
fw=hum;
tp=tp*1;
fw=fw*1;
x1=(a1*tp)/(b1+tp);
e1=6.1*Math.exp(x1*2.3025851);
e2=e1*fw/100;
x2=e2/6.1;
x3=0.434292289*Math.log(x2);
taux=(235*x3)/(7.45-x3)*100;
taux=Math.floor(taux)/100;
feux=(216.7*e2)/(273.15+tp)*100;
feux=Math.round(feux)/100;
var TAUX = taux;
setGlobal("TAUX", TAUX );
var FEUX = feux;
setGlobal("FEUX", FEUX );
exit ();
}
taupunkt()
The java scriplet calculate the dewpoint and the absolute humdity and stores it in the variable %TAUX (dewpoint) and %FEUX (absolute humidity). Now you can make a popup alert or whatever you want and display the dewpoint calling %TAUX and the absolute humidity %FEUX
I have a widget with a few items in it. 1 is a bitmap.
What I would like to do is know if I can randomly show a different one, based on a set timeframe (or even time of day)
I have see the following in advanced parameters, however, it does not seem to change the bitmap... so I'm not sure what to do...
Maybe if you can explain some of the params in it, it would help:
Code:
[ b ]/sdcard/walls/$#Dm#>0?(int((random())*10))$.jpg[ /b ]
I get the math part of it... but I guess what I'm wondering is, what is #Dm#, and what is ? mean...
Does it mean, that every 1 minute, the next random .jpg in the series will show?
kevp75 said:
I have a widget with a few items in it. 1 is a bitmap.
What I would like to do is know if I can randomly show a different one, based on a set timeframe (or even time of day)
I have see the following in advanced parameters, however, it does not seem to change the bitmap... so I'm not sure what to do...
Maybe if you can explain some of the params in it, it would help:
Code:
[ b ]/sdcard/walls/$#Dm#>0?(int((random())*10))$.jpg[ /b ]
I get the math part of it... but I guess what I'm wondering is, what is #Dm#, and what is ? mean...
Does it mean, that every 1 minute, the next random .jpg in the series will show?
Click to expand...
Click to collapse
I have changed the code to be:
Code:
[ b ]/sdcard/walls/$#Dm#%30>0?(int((random())*10))$.jpg[ /b ]
and have verified that there are 1 - 10.jpg's in the location specified, but everytime I unlock the screen the image changes... and a popup happens... stating "No wallpapers added"
I think I can figure out the "No wallpapers" part, but why does the image change on every unlock? I can't sit and watch my screen for an hour to verify that they change every 30 minutes... but I assume that they would...
Hey all
I have a vertical progress bar,placed at y=-264,min value 900 (9.00 AM),max value 1850 (6.50 PM). It's current value is defined by progressbarcurrentvalue = $#Dm#)>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$ That is,if minutes<50 it displays current hour and minute without spaces or any chars,but if minutes>50 it displays next hour for 10 mins (like if its 16.55 it displays 1700 ). So far so good.
I want to have a horizontal line to follow my progress bar's current value. I came up with the solution that if I use the parameter [oy](ceil((progressbarcurrentvalue-900)*11/19)-264)[\oy] in my horizontal line it should do the trick. But the problem is I can't get to calculate progressbarcurrentvalue-900 it just does not do the calculation. How can i solve this?
TL;DR
I want to do the calculation $#Dm#)>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$-900 but i can't. Why?
Many thanks!
djbaha said:
Hey all
I have a vertical progress bar,placed at y=-264,min value 900 (9.00 AM),max value 1850 (6.50 PM). Its current value is defined by progressbarcurrentvalue = $#Dm#)>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$ That is,if minutes<50 it displays current hour and minute without spaces or any chars,but if minutes>50 it displays next hour for 10 mins (like if its 16.55 it displays 1700 ). So far so good.
I want to have a horizontal line to follow my progress bars current value. I came up with the solution that if I use the parameter [oy](ceil((progressbarcurrentvalue-900)*11/19)-264)[\oy] in my horizontal line it should do the trick. But the problem is I cant get to calculate progressbarcurrentvalue-900 it just does not do the calculation. How can i solve this?
TL;DR
I want to do the calculation $#Dm#)>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$-900 but i cant. Why?
Many thanks!
Click to expand...
Click to collapse
You need to enclose mathematical expressions in $'s in order for it to be evaluated as a mathematical expression. But this is not going to work:
Code:
[oy]$(ceil(($#Dm#>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$-900)*11/19)-264)$[\oy]
because you can't embed conditionals. What you need to do is condense all calculations into a single conditional.
First you can condense these 2 conditionals
Code:
$#Dm#>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$
into 1
Code:
$#Dm#>50?(#DHH#00+100):#DHmm#$
Then this
Code:
[oy]$(ceil(($#Dm#>50?(#DHH#00+100):#DHmm#$-900)*11/19)-264)$[/oy]
can be condensed by just incuding the additional calculations within the conditional
Code:
[oy]$#Dm#>50?(ceil(((#DHH#00+100)-900)*11/19)-264):(ceil((#DHHmm#-900)*11/19)-264)$[/oy]
You need to double check the above. I got a little confused with all the parentheses.
jr67 said:
You need to enclose mathematical expressions in $'s in order for it to be evaluated as a mathematical expression. But this is not going to work:
Code:
[oy]$(ceil(($#Dm#>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$-900)*11/19)-264)$[\oy]
because you can't embed conditionals. What you need to do is condense all calculations into a single conditional.
First you can condense these 2 conditionals
Code:
$#Dm#>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$
into 1
Code:
$#Dm#>50?(#DHH#00+100):#DHmm#$
Then this
Code:
[oy]$(ceil(($#Dm#>50?(#DHH#00+100):#DHmm#$-900)*11/19)-264)$[/oy]
can be condensed by just incuding the additional calculations within the conditional
Code:
[oy]$#Dm#>50?(ceil(((#DHH#00+100)-900)*11/19)-264):(ceil((#DHHmm#-900)*11/19)-264)$[/oy]
You need to double check the above. I got a little confused with all the parentheses.
Click to expand...
Click to collapse
Thank you so much !
The last formula worked flawlessly. Now im studying it to understand how it works..
Thanks!
Hi, I am attempting to make my calendar events not show the start time in the code below. Ordinarily, I could do this with $#C0D#=1?:[insert start time]$. However, with this string of code which tells my widget to show today, tomorrow, day of the week, or date after one week out, I cannot seem to figure out how to get the COD code to show up correctly. It ends up showing today, tomorrow, and the week day. Any help would be much appreciated!
[c=#C0COLOR#]$#C0SddMM#=?No appointments$$#C0SddMM#=#DddMM#?Today at #C0Sh\:mm# [tl]#C0Sp#[/tl] -$$ #C0SddMM#=#W1DddMM#?Tomorrow at #C0Sh\:mm# [tl]#C0Sp#[/tl] -$$[#C0SddMM#!=#W1DddMM#] && [#C0SddMM#!=#DddMM#] && [#C0STd#<6]?#C0SEEEE# at #C0Sh\:mm# [tl]#C0Sp#[/tl] -$$[#C0SddMM#!=#W1DddMM#] && [#C0SddMM#!=#DddMM#] && [#C0STd#>=6]? #C0SEEE#, #C0SMMM# [no]#C0Sd#[/no] at #C0Sh\:mm#$ #C0TITLE#[/c]
I think you're trying to hide the "at h:mm am/pm" for all day events, is this correct?
You can do that by rearranging your conditionals do the today/tomorrow/wednesday stuff first, then test C0D to say whether to include the "at .."
$C0day = today?Today$$C0day = tomorrow?Tomorrow$$C0day>tomorrow && c0day < 6 days ?c0day$...
$#C0D#=1?: at #C0Sh\:mm# [tl]#C0Sp#[/tl]$
- #C0TITLE
Works!
ewcrider said:
I think you're trying to hide the "at h:mm am/pm" for all day events, is this correct?
You can do that by rearranging your conditionals do the today/tomorrow/wednesday stuff first, then test C0D to say whether to include the "at .."
$C0day = today?Today$$C0day = tomorrow?Tomorrow$$C0day>tomorrow && c0day < 6 days ?c0day$...
$#C0D#=1?: at #C0Sh\:mm# [tl]#C0Sp#[/tl]$
- #C0TITLE
Click to expand...
Click to collapse
Hi, I played around with it based on your answer and figured it out. It took me a couple of go arounds to figure out what you meant. I think I was thinking too hard to realize how simple it actually was!! Thanks for your help!
[c=#C0COLOR#]$#C0SddMM#=?No appointments$$#C0SddMM#=#DddMM#?Today$$#C0SddMM#=#W1DddMM#?Tomorrow$$[#C0SddMM#!=#W1DddMM#] && [#C0SddMM#!=#DddMM#] && [#C0STd#<6]?#C0SEEEE#$$[#C0SddMM#!=#W1DddMM#] && [#C0SddMM#!=#DddMM#] && [#C0STd#>=6]? #C0SEEE#, #C0SMMM# [no]#C0Sd#[/no]$$#C0D#=1?: at #C0Sh\:mm#$ - #C0TITLE#[/c]
Hello friends, I have a question that should be very simple for you who know more than me.
I need to be able to add hours but I do not find how.
Example:
$ (# DH.mm # + 0.50)
What I need is for example that at the current time you can add a certain time but what happens to me is that if for example the time is 17:55 and I add 20 minutes it appears as result 17: 55 + 0: 20 = 17: 75. instead of 18:15
Please help
Why not use specific timezone then? Or you could take a look at this
https://www.reddit.com/r/ZooperWidget/comments/5h7grs/helptwo_time_zones_clock/
Sent from my XT1805 using Tapatalk
I think I did not explain myself well.
What I need is to show an image 20 minutes after the sun has set.
What happens is that the option I am using is this:
$#DH:mm#>#ASH:mm#+0:23?/sdcard/xxx.png:[ox]500[\ox]
What happens is that if for example #ASH: mm # is equal to 17:55 (that is, the sun is hidden at 5:55 pm) and we add +0: 20 (the additional minutes) the result that I delivery is from 17:75, when it should be 18:15 (6:15 pm)