Jump to content
C4 Forums | Control4

variables


Recommended Posts

running 2.10 on an ea5 and ea1s... For some reason, I cannot get this to execute.

 

If I manually execute the macro via custom buttons, it works.  But when I wake up in the morning, the event has not occurred even though sunrise has happened.  What gives?

Screen Shot 2017-10-12 at 3.58.26 PM.png

Screen Shot 2017-10-12 at 3.58.03 PM.png

Link to comment
Share on other sites


House room is on when the security monitor is on.  The house room has been on when this macro was supposed to execute.

 

When I go to sleep, I press "Goodnight" which executes macro "monitor night" and part of the programming for Monitor Night is to set the variable to true. 

 

Like I said, when I wake up and realize that nothing has happened, I can click the custom button that I set on one of my navigator screens and the macro executes.

Link to comment
Share on other sites

Before I went to sleep, i checked and made sure all the variables were correct.  I also changed the programming from "when room house power is on" to "when variable monitor is true" and based my new programming off that.

 

When I woke up this morning, house room was on, the macro had not been executed, and the variable was changed as if the macro did execute.

Link to comment
Share on other sites

@abovedeck  I looked at all 15 versions of your programming so I sense your frustration.

Maybe try adding one more conditional IF statement below the first IF statement:

When monitor morning executed

IF Room House Power is ON

     IF variables Daytime-->Daytime=True

          Push....

          etc...

You could even flip those around.  The Daytime variable could go first.  Seems redundant to add the daytime variable conditional again elsewhere but it confirms whether it actually is daytime ONE more time.

Does anyone know how it long it takes for C4 to recognize a variable change?  Instant?  25 ms?  100 ms?

Link to comment
Share on other sites

Put some push notifications in before the various ifs so you can see what is actually being done... preferably include the relevant variables (e.g. DayTime) in theses notifications.

I assume that if you hit execute on the schedule (rather than using your custom button) it actually works? If so, then the problem must be that one of the variable is different from what you think it will be at sunrise.

Link to comment
Share on other sites

2 hours ago, dcovach said:

@abovedeck  I looked at all 15 versions of your programming so I sense your frustration.

Maybe try adding one more conditional IF statement below the first IF statement:

When monitor morning executed

IF Room House Power is ON

     IF variables Daytime-->Daytime=True

          Push....

          etc...

You could even flip those around.  The Daytime variable could go first.  Seems redundant to add the daytime variable conditional again elsewhere but it confirms whether it actually is daytime ONE more time.

Does anyone know how it long it takes for C4 to recognize a variable change?  Instant?  25 ms?  100 ms?

As far as I know, C4 recognizes a variable change instantly (I.e. before processing the next line of code).

Link to comment
Share on other sites

15 hours ago, eddy.trochez said:

Did you set your Sunrise schedule to repeat every day?

@abovedeck mentioned to me (not in this post) that the original programming worked in 2.9.1 and he's now on 2.10. I think there's a few small quirks in 2.10. The original programming isn't "original" anymore so it's hard to tell what part(s) are being affected by the update. I've had success with rare cases like this by deleting all the affected programming, refreshing navs (or rebooting the primary) and re-programming the same way after.

 

Link to comment
Share on other sites

5 hours ago, dcovach said:

@abovedeck mentioned to me (not in this post) that the original programming worked in 2.9.1 and he's now on 2.10. I think there's a few small quirks in 2.10. The original programming isn't "original" anymore so it's hard to tell what part(s) are being affected by the update. I've had success with rare cases like this by deleting all the affected programming, refreshing navs (or rebooting the primary) and re-programming the same way after.

 

Sounds a bit weird! And worrying...

Link to comment
Share on other sites

I'm going to delete all programming and start from scratch.  I've removed, changed, deleted, replaced all forms of the variable.  I check before bed to see where the variables are... for some reason, it's just not hitting correctly. 

 

I'm going to add the push notification as well, good suggestion.  Will know tomorrow morning!

Link to comment
Share on other sites

Solved!  Thanks for the suggestion for the push notifications.  I put those in everywhere and found that commands and variables were being changed at 4AM, not 7.  So Iooked in to my programming and found this:

 

59e4fc961bca3_ScreenShot2017-10-16at11_34_20AM.png.dc9b788b66f64ea64676ac95a9c2d9dd.png

 

What I did not realize is that part of my "goodbye" scene is programmed to "turn the living room off" which has programming of its own:

 

59e4fcfdc7235_ScreenShot2017-10-16at11_34_34AM.png.8fa7916233093f4cbfb291e01d009016.png

 

I just added in the alarm "if conditional" because my alarm is set when I go to bed and the programming above is meant for something else.  But it seems that at 4AM,  the above programming was being executed in some way.  It's the first time I have programmed something and did not realize that all of the variables and conditionals could be true at a time other than when I need it (when I'm done watching TV).

 

What strikes me as odd, though, is that if the living room is already off and C4 has a program that sends the room off command, wouldn't C4 just ignore that request/command?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.