Jump to content

Storing climate data in variables


johnnyt

Recommended Posts

Posted

Is there an alternative to brute force programming for putting ISY climate module data in variables? Right now It looks like I have to build a series of programs like the one below for each condition possible?

Set Current Day High 28 - [ID 00BB][Parent 0330][Not Enabled]

If
        Module 'Climate' 24h High Temperature >= 28 °C
 
Then
        $iForecastDay1High  = 28
 
Else
        Run Program 'Set Current Day High 27' (If)
 

called by Set Current Day High 29

 

One of my goals, now that I'm on 5.x and can use decimals, is to calculate heat index using the formula found in this wikipedia article but need the data for temperature and humidity in variables to do that.

  • 1 year later...
Posted
On 5/20/2019 at 11:28 AM, Michel Kohanim said:

Hi @johnnyt,

Currently, no. But since you have 5.0.x, you can use the brilliant node servers for weather in which case, you can assign values to variables (they are nodes not modules).

With kind regards,

Michel

Michel, I am using the brilliant node servers run on the brilliant Polisy! This really opened up control and have the ISY much more traction in the Home Automation scene.

What I would like to do is include some weather data (or other data from polisy nodes) in alert emails within my ISY programs. I used to be able to do this with the Weather Module. I have an Ambient Weather Node server that has an 'Outside - Feels Like' temp, but don't see a way to get that data in an email that is triggered by a program. 

Posted
29 minutes ago, jkosharek said:

Michel, I am using the brilliant node servers run on the brilliant Polisy! This really opened up control and have the ISY much more traction in the Home Automation scene.

What I would like to do is include some weather data (or other data from polisy nodes) in alert emails within my ISY programs. I used to be able to do this with the Weather Module. I have an Ambient Weather Node server that has an 'Outside - Feels Like' temp, but don't see a way to get that data in an email that is triggered by a program. 

Yes, you can. What type of alert do you want send?

Posted (edited)
16 hours ago, jkosharek said:

Michel, I am using the brilliant node servers run on the brilliant Polisy! This really opened up control and have the ISY much more traction in the Home Automation scene.

What I would like to do is include some weather data (or other data from polisy nodes) in alert emails within my ISY programs. I used to be able to do this with the Weather Module. I have an Ambient Weather Node server that has an 'Outside - Feels Like' temp, but don't see a way to get that data in an email that is triggered by a program. 

It can be done two ways: 

Method 1) use  program to assign the value to a variable.  (remember to change the precision to match the number of decimal places).  for the IF portion of the program use something that will always be true for example:

(note: I don't use the Ambient node server this example is from a different node server)

AA TEST - [ID 0103][Parent 0001]

If
        'Node Servers / MeteoBridge Weather / Temperatures' Temperature > -50.0°F
 
Then
        $iTemp_test  = 'Node Servers / MeteoBridge Weather / Temperatures' Temperature °F
 
Else
   - No Actions - (To add one, press 'Action')

In the above example ANYTIME the temp changes the IF will be evaluated.  We assume that the outdoor temp is always above -50F so therefor this program will run and be true ANYTIME the temp changes, therefor THEN will update the value of the variable.  (if we wanted to we could also duplicate the THEN statement as the ELSE statement, so if for some reason the IF was false, the temp would still update).

then use that variable in the email... in this case ${var.1.63}  (but you can't see my variable list so 63 is the ID number in the far left column of the state variable list.

image.thumb.png.3216d789a3589328c25cac7bc1365411.png

 

Method 2) use the value of the node as a text replacement.

Start in the admin console:

image.png.5c27faefd79b1bffab0c6a4f5de739f6.png


Make a note of the Node Name, this one is straight forward, but it might be a seemingly random value rather than a name--the first part of the name N007 is the slot number of this node server in your ISY.  Also note the current value of the value we want.

Now go to the Polisy Nodes listing:

(NOTE: the temp dropped to 42.8 between the screenshot above and this one:

image.thumb.png.b061e4cf6997ba05628b13a341f370f3.png

This is also a bad example, because the Windchill is currently the same value i.e. = 42.8.  I'm going to make an educated guess that in this case that we want the driver name ST and not GV1.  (In this case since I used temp in the method 1 example I'm looking for temp here too, the GV's tend to be optional or additional values so it's most likely GV1 is windchill and ST is current temp.)

Now from the variable replacements page of the Wiki:

image.png.b177c025c0d746ebc3c620befdc6f1c0.png

 so we will use ${sys.node.n007_temperature.ST} to put the temp in an email.

 

image.png

Edited by MrBill
  • Like 2
Posted

I've just edited the post above to reflect the use of an "integer" variable in Method 1.   A State variable is not needed for that usage and in fact, anytime the properties offered by using a state variable are not needed an Integer variable should be used.  (On smaller system it likely makes not difference, but on larger systems avoid overuse of state variables as they contribute to the queue full error we sometimes encounter.)   (also notable: the literal definition of Integer doesn't apply.  In V5 firmware Integer variables can have precision or decimal places.)

  • Like 2
Guest
This topic is now closed to further replies.

×
×
  • Create New...