[ANSWERED] Setting up the NOAA weather plugin

Posted on
Mon May 18, 2015 9:48 pm
Radjin offline
User avatar
Posts: 146
Joined: May 13, 2015

[ANSWERED] Setting up the NOAA weather plugin

I have the plugin enabled and the correct code entered to where it is showing the temperature in the device display. But I can see no other data nor do I have any additional variables with which to control schedules or triggers. I'm new to Indigo and so far have been pretty good at getting the 120 or so devices all coordinated but this particular plugin has so far evaded my comprehension.

How do I create variables from the weather data or use it to modify a schedule or activate a trigger?


Thanks in advance

Radjin~
Last edited by Radjin on Fri Nov 06, 2015 7:58 am, edited 2 times in total.

It's not rocket science...

Posted on
Tue May 19, 2015 4:13 am
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Setting up the NOAA weather plugin

Hi Radjin - Welcome to Indigo.

What you are looking for are "Custom Device States" which are common for devices that are created with plugins. In the main Indigo device window, towards the bottom, you have a "Device Details" box. Your custom device states are right below that, only you can't see them due to the fact that the OS X scroll bar is most likely hidden from you. You can either "grab" the small circle and drag that portion of the window higher, or scroll in that area to expose the custom states. Here's a picture to demonstrate.

Screen Shot 2015-05-19 at 5.11.21 AM.png
Screen Shot 2015-05-19 at 5.11.21 AM.png (29.28 KiB) Viewed 6493 times


Cheers,
Dave

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

[My Plugins] - [My Forums]

Posted on
Tue May 19, 2015 6:58 am
Radjin offline
User avatar
Posts: 146
Joined: May 13, 2015

Re: Setting up the NOAA weather plugin

And there it is; the all light gray colors totally hid the scroll bar. Thank you. :mrgreen:

To extend my question, how do I use this information to control a schedule, trigger or create a variable? The NOAA plugin page gets you to the install but goes no further on how to use the plugin.

Radjin~

It's not rocket science...

Posted on
Tue May 19, 2015 7:11 am
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Setting up the NOAA weather plugin

Radjin wrote:
To extend my question, how do I use this information to control a schedule, trigger or create a variable? The NOAA plugin page gets you to the install but goes no further on how to use the plugin.


For control pages, you want to add a new device, then select your weather device, then select from the many values:
Screen Shot 2015-05-19 at 8.08.44 AM.png
Screen Shot 2015-05-19 at 8.08.44 AM.png (39.67 KiB) Viewed 6478 times

For Triggers, you want to add a new device, then select a trigger (for example, a device state changes), and pick the device state to trigger on.
Screen Shot 2015-05-19 at 8.10.29 AM.png
Screen Shot 2015-05-19 at 8.10.29 AM.png (65.54 KiB) Viewed 6478 times


Dave

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

[My Plugins] - [My Forums]

Posted on
Tue May 19, 2015 7:02 pm
Radjin offline
User avatar
Posts: 146
Joined: May 13, 2015

Re: Setting up the NOAA weather plugin (ANSWERED)

Brillent, thanks again. I was looking to add as a condition to affect a schedule (ie my irrigation control), to stop it from running if it is raining and although your reply did not point to it directly it gave me the information I needed.

Very much appreciated.

PS can this be added as a variable as well?

Radjin~

It's not rocket science...

Posted on
Tue May 19, 2015 7:14 pm
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Setting up the NOAA weather plugin (ANSWERED)

Radjin wrote:
PS can this be added as a variable as well?

I'm not exactly sure what you're looking for.

Do you want to add a value to a variable or do you want to use a variable as a condition?

Dave

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

[My Plugins] - [My Forums]

Posted on
Tue May 19, 2015 7:27 pm
Radjin offline
User avatar
Posts: 146
Joined: May 13, 2015

Re: Setting up the NOAA weather plugin

I am looking to add a condition, as a variable. I think I have it figured out how to use as a condition or trigger.

Radjin~

It's not rocket science...

Posted on
Tue May 19, 2015 7:36 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Setting up the NOAA weather plugin

to stop it from running if it is raining and although your reply did not point to it directly it gave me the information I needed.


I tried that. The issue is that the conditions at NOAA are only updated every 2 hours. So if you have light rain its light rain for 2 hours. Or no rain it is no rain for 2 hours (at least with my NOAA station) I even did a counter adding x amount depending on the rain conditions testing every 15 minutes:
light drizzle .. heavy down p. Incremented each by 1.3 . There are 10 different levels of rainfall 3 or 4 main words (drizzle, rain, shower, downpour ..) and each comes with qualifier: light normal heavy ..)
That way I could count the rainfall, but again the conditions only change every 2 hours..

and then there are thunderstorms and none of the "rain words" .. appear in the weather condition ..

Karl


here the python code I did some 18 months ago. and you will see that was one of my first py scripts.
Code: Select all
import sys
## karl wachs
## V1.1
## Sept. 2 2013
##
## call every 15 minutes
## checks NOAAplus device information of currentcondition
## if  drizzle / rain  add to raincount multiply by 1/27 (mult1)
## if light / normal / heavy  multiply by 1/3/9  (mult2)
## rain constant for normal rain every 15 minutes is:  normal rain per hour is 0.205/2 inches
## total add = mult1*mult2*rainperunit

inchPerRainUnit = 0.205 / (4 * 81 * 2)   ## still tuning

rightNow = indigo.server.getTime()
theHour = int(rightNow.hour)
theMinute = int(rightNow.minute)

rainCount = indigo.variables[1943077276]
rainCountString = str(rainCount.value)
rainCountNumber = float(rainCountString)

## NoaaCondition = indigo.variables[1262360358] # "NOA_loveField_condition"
noaadevice = indigo.devices[120648462] # "NoaPlusLoveField"
currentCondition = noaadevice.states['currentCondition']
Noaa = currentCondition.upper()

updateYesterday = 'no'
if theHour < 1 :    ## it is now tomorrow, move raincount to yesterday variable
    if theMinute < 15 :
        rainCountYesterday = rainCountString
        rainCountNumber = float(0)
        rainCountString = '0'
        updateYesterday ='yes'


## check what condition, if rain drizzel ligh heavy string is present
rainYN  = int(Noaa.find('RAIN'))
drizzleYN  = Noaa.find('DRIZZLE')
lightYN  = Noaa.find('LIGHT')
heavyYN  = Noaa.find('HEAVY')

mult1 = 0
if rainYN  > -1 :
    mult1 = 27

if drizzleYN  > -1 :
    mult1 = 3

mult2 = 3
if lightYN  > -1 :
    mult2 = 1

if heavyYN  > -1 :
    mult2 = 9

rainToAdd = mult1 * mult2 * inchPerRainUnit
rainCountString = str(rainCountNumber + rainToAdd)
indigo.variable.updateValue(1943077276,rainCountString)

if updateYesterday =='yes':
    indigo.variable.updateValue(11503249,rainCountYesterday)


Posted on
Tue May 19, 2015 7:53 pm
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Setting up the NOAA weather plugin

Radjin wrote:
I am looking to add a condition, as a variable. I think I have it figured out how to use as a condition or trigger.

Radjin~

If you mean setting a variable based on certain conditions, sure. That's a very common usage of variables.

Under "Actions", select "Variable Actions".

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

[My Plugins] - [My Forums]

Posted on
Tue May 19, 2015 10:03 pm
Radjin offline
User avatar
Posts: 146
Joined: May 13, 2015

Re: Setting up the NOAA weather plugin

kw123 wrote:
to stop it from running if it is raining and although your reply did not point to it directly it gave me the information I needed.


I tried that. The issue is that the conditions at NOAA are only updated every 2 hours. So if you have light rain its light rain for 2 hours. Or no rain it is no rain for 2 hours (at least with my NOAA station) I even did a counter adding x amount depending on the rain conditions testing every 15 minutes:
light drizzle .. heavy down p. Incremented each by 1.3 . There are 10 different levels of rainfall 3 or 4 main words (drizzle, rain, shower, downpour ..) and each comes with qualifier: light normal heavy ..)
That way I could count the rainfall, but again the conditions only change every 2 hours..

and then there are thunderstorms and none of the "rain words" .. appear in the weather condition ..

Karl
[/code]


Well, that's disapointing but expected. Then I will rely on a moister sensor I placed in a downspout some time ago as a rain monitor test that worked quite well. However all the above was still very informative as I learned how to set variables and update them, and how to access the NOAA data, all thanks to your help.

It's not rocket science...

Posted on
Fri May 29, 2015 11:05 pm
Radjin offline
User avatar
Posts: 146
Joined: May 13, 2015

Re: Setting up the NOAA weather plugin

kw123 wrote:
to stop it from running if it is raining and although your reply did not point to it directly it gave me the information I needed.


I tried that. The issue is that the conditions at NOAA are only updated every 2 hours. So if you have light rain its light rain for 2 hours. Or no rain it is no rain for 2 hours (at least with my NOAA station) I even did a counter adding x amount depending on the rain conditions testing every 15 minutes:
light drizzle .. heavy down p. Incremented each by 1.3 . There are 10 different levels of rainfall 3 or 4 main words (drizzle, rain, shower, downpour ..) and each comes with qualifier: light normal heavy ..)
That way I could count the rainfall, but again the conditions only change every 2 hours..

and then there are thunderstorms and none of the "rain words" .. appear in the weather condition ..

Karl
[/code]


I was perusing your code and it suddenly hit me to try and see what condition I could define. Turns out that I can select "if NOAA currentConditions includes the word rain" fog, ice, snow. I told the conditions in Indigo that if those words were included in the currentConditions then do not run the schedule. Theoretically that should defer a schedule run when it is not necessary. It's summer here now so will have to wait to test.

Radjin~

It's not rocket science...

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest