NOAA Weather Plus discussions

Posted on
Thu Apr 30, 2020 1:35 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: NOAA Weather Plus discussions

Please don't use screen captures for code. Put the code into "Code" blocks. It's in the middle of the green "Selection style" bar above the edit window.

that should be:

Code: Select all

theTemperatureV = indigo.variables[1708239780] #MinTemperatureVariable
dev = indigo.devices[23142400] #Weather Plus Station
if dev.states['minTemp2ndNight'].floatValue() < theTemperatureV.floatValue():
    return True
else:
    return False


The "[]" syntax is for elements of a dict, which is what "dev.states" is. Parenthesis are for calling functions. You also need to make sure what you're comparing are real numbers (floats).

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Apr 30, 2020 1:38 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: NOAA Weather Plus discussions

Heh, I edited my answer at the same time you were posting that. ;)

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Apr 30, 2020 1:40 pm
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: NOAA Weather Plus discussions

Heh - nobody is going to know what you're talking about because I deleted my post! 8)

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri May 01, 2020 3:15 pm
Ericbo offline
Posts: 133
Joined: Sep 18, 2012

Re: NOAA Weather Plus discussions

Thank you, thank you FlyingDiver and will know about capturing the code
Much appreciated! Eric

Posted on
Fri May 01, 2020 3:33 pm
Ericbo offline
Posts: 133
Joined: Sep 18, 2012

Re: NOAA Weather Plus discussions

Just tried it FlyingDiver and getting the error "embedded script:'unicode' object has no attribute 'floatValue'.
Is it because the variables are unicode (I am pretty sure theTemperatureV would be, not sure what the state minTem2ndNight extraction format would be) or ... ?
(I tried to google this error but did not get much relevant :(
Thank you for your help and teaching!
ps: just copied and pasted your code without any change ....
Code: Select all
theTemperatureV = indigo.variables[1708239780] #MinTemperatureVariable
dev = indigo.devices[23142400] #Weather Plus Station
if dev.states['minTemp2ndNight'].floatValue() < theTemperatureV.floatValue():
    return True
else:
    return False

Posted on
Fri May 01, 2020 4:07 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: NOAA Weather Plus discussions

I may have gotten that syntax wrong. Dave's way would probably have worked;

Code: Select all
theTemperatureV = indigo.variables[1708239780] #MinTemperatureVariable
dev = indigo.devices[23142400] #Weather Plus Station
if float(dev.states['minTemp2ndNight'].value) < float(theTemperatureV.value):
    return True
else:
    return False

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon May 04, 2020 4:19 pm
Ericbo offline
Posts: 133
Joined: Sep 18, 2012

Re: NOAA Weather Plus discussions

Thanks a lot FlyDiver, tried, got the same error, adjusted a bit after some reading and got the following without syntax error. Will now confirm if it works as expected :)
Thank you for the help!
Code: Select all
theTemperatureV = indigo.variables[1708239780] #MinTemperatureVariable
dev = indigo.devices[23142400] #Weather Plus Station
if float(dev.states['minTemp2ndNight']) <  theTemperatureV.value:
    return True
else:
    return False

Posted on
Sun May 10, 2020 8:15 am
Ericbo offline
Posts: 133
Joined: Sep 18, 2012

Re: NOAA Weather Plus discussions

Wondering if you have experience with Weather Plus not returning the expected forecast temperature...
I am getting an embedded script error when converting the temperature string to float. So i assume it is just not returning the usual temperature.
I will have to test for that in the script (error post, script post). Thank you for your inputs :)
Note: I am testing all the forecasted temperature to see if the temperature is dropping ...

May 10, 2020 at 4:05:52 AM
Trigger Weather MinTemperature Change Update (Tonight)
Trigger Weather MinTemperature Change Update (TomorrowNight)
Trigger Weather MinTemperature Change Update (2ndNight)
Trigger Weather MinTemperature Change Update (3rdNight)
Trigger Weather MinTemperature Change Update (4thNight)
Trigger Weather MinTemperature Change Update (5thNight)
Script Error embedded script: could not convert string to float:
Script Error Exception Traceback (most recent call shown last):

embedded script, line 3, at top level
ValueError: could not convert string to float:

Error failed to evaluate embedded script conditonal
Error embedded script: could not convert string to float:

theTemperatureV = indigo.variables[1708239780] #MinTemperatureVariable
dev = indigo.devices[23142400] #Weather Plus Station
if float(dev.states['minTemp6thNight']) < theTemperatureV.value:
return True
else:
return False

Posted on
Sun May 10, 2020 8:19 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: NOAA Weather Plus discussions

What are the actual states of the device when you get the error? You can show them in the Indigo UI by dragging the dimple up.
Attachments
Screen Shot 2020-05-10 at 10.17.46 AM.png
Screen Shot 2020-05-10 at 10.17.46 AM.png (80.22 KiB) Viewed 3751 times

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Jan 23, 2021 8:28 pm
indigobo offline
User avatar
Posts: 22
Joined: Jan 04, 2019
Location: Raleigh, NC

Re: NOAA Weather Plus discussions

I'm now getting these error messages too :(
Unknown error getting weather for coordinates 36.149, -78.198: <urlopen error [SSL: TLSV1_ALERT_PROTOCOL_VERSION]

Posted on
Sat Jan 23, 2021 9:07 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: NOAA Weather Plus discussions

indigobo wrote:
I'm now getting these error messages too :(
Unknown error getting weather for coordinates 36.149, -78.198: <urlopen error [SSL: TLSV1_ALERT_PROTOCOL_VERSION]


Are you on an older OS (pre-High Sierra) as well? If so, that's expected. Now.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Jan 24, 2021 6:30 am
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: NOAA Weather Plus discussions


Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Jan 27, 2021 12:55 pm
dherren offline
Posts: 32
Joined: Nov 26, 2003
Location: Shoreham, VT USA

Re: NOAA Weather Plus discussions

I started getting these error messages late in the day on Jan. 21st. While I am running on Sierra and not High Sierra, I find it curious that the same version of the plug-in on the same Mac mini had been running just fine until Jan 21, and no changes were made to any of my configuration.

Update: I just read the thread regarding OS level support for TSL and NOW. I get it. I had dreaded an OS upgrade on my late 2012 mini, but the writing is on the wall.
Last edited by dherren on Wed Jan 27, 2021 7:43 pm, edited 1 time in total.

Posted on
Wed Jan 27, 2021 1:01 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: NOAA Weather Plus discussions

dherren wrote:
I started getting these error messages late in the day on Jan. 21st. While I am running on Sierra and not High Sierra, I find it curious that the same version of the plug-in on the same Mac mini had been running just fine until Jan 21, and no changes were made to any of my configuration.


The change was made server-side (at NOAA) to require the newer version of SSL/TLS. This is totally the expected behavior.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Who is online

Users browsing this forum: No registered users and 4 guests