Jump to content

Is there a programming way to obtain the current state of an Insteon module to insert into a variable?


Ed Sybesma

Recommended Posts

Larry gave you the answer to the question you asked, but the next question is why do you need it in a variable?  what are you doing with it at that point?  Valid reasons to do that might be a "Save" temp, to restore the thermostat later.... or if you want to manipulate the temp later.

However if you're just wanting to display the temp or include it in the notification that can be done without the overhead of a variable.

  • Like 1
Link to comment
Share on other sites

5 hours ago, larryllix said:

If
    therm.setpt <= 9999
Then
     set $variable = therm.setpt
Else
      ---

Larry,

Thank you for that input.

Unfortunately, I don't find any condition "therm.setpt" In the programming commands available in my Administrative Console.  Furthermore, my options for setting variables are limited to setting them from the drop-down box.  Am I missing a module of some kind, or are you doing the programming somewhere other than inside the Administrative Console?

My configuration is as follows:

Firmware                loX v.5.5.9 ( 2023-03-07-11:17:36 )

Ul                            loX v.5.5.9 ( 2023-03-07-11:17:36 )

Product                   Polisy (5200)

·          OpenADR (21010)

·          Networking Module (21040)

·          Portal Integration - UDI (21075) -Z-Wave Module (21100)

·          A10/X10 Module (21060)

Link to comment
Share on other sites

2 hours ago, MrBill said:

Larry gave you the answer to the question you asked, but the next question is why do you need it in a variable?  what are you doing with it at that point?  Valid reasons to do that might be a "Save" temp, to restore the thermostat later.... or if you want to manipulate the temp later.

However if you're just wanting to display the temp or include it in the notification that can be done without the overhead of a variable.

MrBill,  Thank you for your input as well.  FYI, I am trying to set a routine to increase or decrease the cool setpoint through an Alexa voice command.

Link to comment
Share on other sites

3 minutes ago, Ed Sybesma said:

MrBill,  Thank you for your input as well.  FYI, I am trying to set a routine to increase or decrease the cool setpoint through an Alexa voice command.

Excellent usage and need.  I actually have something similar, using a "scene" that sets a variable via alexa.  Keep in mind that the portal "Alexa scene" can be configured to update a variable.  "Alexa, set temp to 72" can set a state variable.  (what's actually happening is the variable is being set to a percentage, but you can drop the word percent when talking to her.  SO in essence you're naming a scene "temp", having it set a state variable to a percent but you can forget that it's a percent.      Just be sure when writing your programs to throw out bad values.  for example when my downstairs fireplace temp is changed via the method the only valid value in the ISY programs are 63 to 75... if someone accidentally or on purpose sets a larger or smaller value it just blinks a nearby lamp and doesn't actually change the set point.

the method works for anything but keep in mind values are limited to 0 to 100, because you're actually telling her a percent but just not saying the word.

Link to comment
Share on other sites

Larry,
Thank you for that input.
Unfortunately, I don't find any condition "therm.setpt" In the programming commands available in my Administrative Console.  Furthermore, my options for setting variables are limited to setting them from the drop-down box.  Am I missing a module of some kind, or are you doing the programming somewhere other than inside the Administrative Console?
My configuration is as follows:

Firmware                loX v.5.5.9 ( 2023-03-07-11:17:36 )

Ul                            loX v.5.5.9 ( 2023-03-07-11:17:36 )

Product                   Polisy (5200)

·          OpenADR (21010)

·          Networking Module (21040)

·          Portal Integration - UDI (21075) -Z-Wave Module (21100)

·          A10/X10 Module (21060)

I don't cknow what your stat is called..

You must create a variable first to make use of one.

Sent from my SM-G781W using Tapatalk

Link to comment
Share on other sites

Larry, thanks.  I am with you now.

And I have created a program:

If

'Indoors / Thermostats / 14.F8.3C - UPSTAIRS Main’ Cool Setpoint is not 99‘

Then

vCool_Setpoint = ‘Indoors / Thermostats / 14.F8.3C - UPSTAIRS Main’ Cool Setpoint

Else

- No Actions - (To add one, press 'Action')

 I gave an initial value of 53 to the variable vCool_Setpoint.

Unfortunately, nothing happens when I run either If or Then.

Any additional ideas?

Thanks again.

Link to comment
Share on other sites

The program will self-run when the setpoint on the stat is changed. Try manually changing your setpoint on the thermostat and see what happens to your variable.

Also note that all variable designations are prefixed with a '$'. It is also a de facto standard, and a good idea, to add a method of denoting a state variable, to avoid user confusion during programming and debugging.
It could result in variables used in programs looking like this:

     $sCool_Setpoint = .....

State variables may cause programs to trigger while Integer types will not. Not being identifiable in programs may cost you a lot of time later sorting out variable function confusion.

Link to comment
Share on other sites

Larry,

Thanks again for your input, including the programming tip.

And you are right.  The program did run and did update the variable when the setpoint was changed.

I currently have this set as a state variable.  I still wonder why I could not manually cause the program to run and change the variable inside administrative console using the run If or the run Then commands.

In any event, it is working and I thank you.

Ed

Link to comment
Share on other sites

1 minute ago, Ed Sybesma said:

I currently have this set as a state variable.  I still wonder why I could not manually cause the program to run and change the variable inside administrative console using the run If or the run Then commands.

the If statement:

If
    therm.setpt <= 9999

basically runs every time therm.setpt changes, and always resolves true.  Therefor the variable is always up to date. Running Then manually should have no apparent effect unless you change the value of the variable manually first.

Link to comment
Share on other sites

2 hours ago, MrBill said:

the If statement:

If
    therm.setpt <= 9999

basically runs every time therm.setpt changes, and always resolves true.  Therefor the variable is always up to date. Running Then manually should have no apparent effect unless you change the value of the variable manually first.

Understood, but when I first tried to run the IF and THEN routines, I had already manually set the variable value to 53 and my actual setpoint on the thermostat was 74.  Under either the IF or THEN routine, the variable didn't change.  It stayed at 53.

  • Like 1
Link to comment
Share on other sites

On 8/2/2023 at 2:39 PM, Ed Sybesma said:

Understood, but when I first tried to run the IF and THEN routines, I had already manually set the variable value to 53 and my actual setpoint on the thermostat was 74.  Under either the IF or THEN routine, the variable didn't change.  It stayed at 53.

When did the setpoint on the thermostat change to 74F?

Actually reading back (I missed a few posts) I think you are correct and may have found another bug in v5.xx. There are still many remaining bugs since v5.0.1

Edited by larryllix
Link to comment
Share on other sites

4 hours ago, larryllix said:

When did the setpoint on the thermostat change to 74F?

Actually reading back (I missed a few posts) I think you are correct and may have found another bug in v5.xx. There are still many remaining bugs since v5.0.1

In response to your specific question, that first happened In the early morning hours when the setpoint was programmatically changed to 74 through a different routine.

But the more interesting set of issues that now arise is that my upstairs routine for setting and changing the Setpoint in both the variable and the thermostat is consistently working properly as would be expected.

And yet I have what is an identical (other than variable names and thermostat device) program for my downstairs thermostat which is behaving erratically.  For example, when the setpoint on that was changed to 74 in the early morning hours today, the variable did not change from his prior setting.  Sometimes this downstairs routine works and sometimes it doesn't.  One time it even changed the thermostat mode setpoint to 73 while leaving the variable at 74.  That seems impossible, but I did observe it.

My initial reaction was that maybe the downstairs thermostat wwas farther away from my PLM and maybe the signal from the thermostat wasn't always reaching the PLM.  But that thought seems to be dispelled both by the "impossible" behavior described in the last paragraph above, as well as the fact that the setpoint is always reflected accurately in the Administrative Console report for the downstairs thermostat module itself.

For whatever it's worth, here are the two routines being used for my downstairs thermostat:

Program Content for 'Set $vDownstairs_Cool_Setpoint Variable to Current'

If

'Indoors / Thermostats / 14.F9.CF - DOWNSTAIRS Main' Cool Setpoint <= 120‘

Then

$vDownstairs_Cool_Setpoint = 'Indoors / Thermostats / 14.FS.3C - UPSTAIRS Main' Cool Setpoint

 

 

Program Content for 'Increment Downstairs Cool Setpoint'

If

- No Conditions - (To add one, press 'Schedule' or 'Condition')

Then

$vDownstairs_Cool_Setpoint -= 1

Set 'Indoors / Thermostats / 14.F9.CF - DOWNSTAIRS Main’ Cool Setpoint '$vDownstairs_Cool_Setpoint Degrees'

Else

$vDownstairs_Cool_Setpoint += 1

Set 'Indoors / Thermostats / 14.F9.CF - DOWNSTAIRS Main’ Cool Setpoint '$vDownstairs_Cool_Setpoint Degrees'

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...