Jump to content

Program Notification Repeats Too Often


ewind

Recommended Posts

Posted

I have edited, re-edited, deleted and re-added this program below and I cannot figure out why it runs / send Notification every 5 minutes instead of every 6 hours. I have moved the repeat line after Send Notification and still same results. The original program was every 5 minutes but has been deleted. Any ideas?

 

Bonus Humidity -40 - [ID 001E][Parent 0023]

If
        'ZW / Bonus Multilevel Sensor' Humidity < 40%
 
Then
        Repeat Every  6 hours
           Send Notification to 'live'
        Repeat 1 times
 
Else
   - No Actions - (To add one, press 'Action')

 

 

Posted (edited)

@ewind

Each time the node 'ZW / Bonus Multilevel Sensor' Humidity changes its value the program restarts.

To fix this you will need to use several programs:

Bonus Humidity -40.Start

If
        'ZW / Bonus Multilevel Sensor' Humidity < 40%
 
Then

       Run Program Bonus Humidity -40.Body (then)
 
Else
   - No Actions - (To add one, press 'Action')

----

Bonus Humidity -40.Body      (Disabled)

If
        (nothing)
 
Then

        Disable Program Bonus Humidity -40.Start
        Repeat Every  6 hours
           Send Notification to 'live'


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

----

Bonus Humidity -40.Stop

If
        'ZW / Bonus Multilevel Sensor' Humidity > 43%
 
Then

       Stop Program Bonus Humidity -40.Body

       Enable Program Bonus Humidity -40.Start
 
Else
   - No Actions - (To add one, press 'Action')

 

Note that the Stop program has a 3% humidity difference from the start, if you use 40 in both cases there will likely be annoying notifications as the humidty bounces up and down around 40.

The second program should be disabled always, but since it has no IF body it also won't matter if it's not.  A disable program will still run when another program tell it to, disable only disables the "if" from starting the program.

Also note the statement Repeat 1 times in your program does nothing.  With "repeat" only indented lines under repeat are repeated.
 

Edited by MrBill
  • Like 1
Posted

@ewind

One more program.  I neglected to take reboot of the ISY into account.

Bonus Humidity -40.Startup   [Run At Startup]

If
        (none)
 
Then

       Enable Program Bonus Humidity -40.Start

       Disable Program Bonus Humidity -40.Body 
 
Else
   - No Actions - (To add one, press 'Action')

 

The condition this corrects is if Body was running which causes Start to be disabled then when the ISY is rebooted, this additional Program with the Run at Startup flag will enable the Start Program, (the body program should normally be disabled, the second statement just ensures that).

If don't mind a humidity notification always during ISY start up you could instead simply use the original 3 programs and enable Run at Startup on the .body program.

  • Like 1
  • Thanks 1
  • 3 weeks later...
Posted

I may be a bit simple minded in my thinking but isn't this a complex set of programs to accomplish something I perceive as simple? Is there an easier way to make this platform more adoptable for the every day home automation newbie? ;) For instance If less than 40% do this, if more that 40% do nothing

Posted
8 minutes ago, ewind said:

I may be a bit simple minded in my thinking but isn't this a complex set of programs to accomplish something I perceive as simple? Is there an easier way to make this platform more adoptable for the every day home automation newbie? ;) For instance If less than 40% do this, if more that 40% do nothing

In another thread yesterday someone compared Filet Mignon and Hamburger solutions.  In that thread, the ISY being Filet Mignon and Google Home being the Hamburger.  That's a good way to think about it.  But I'll add in this case you also have to consider that the ISY gives you the building blocks to build the EXACT solution you want.   Sure you have to learn how to stack those building blocks, or ask in the forum for help with something like this one that's a little more complex. 

Sure it would be great if you could say "Hey ISY... Send me a notification for humidity below 40% every 6 hours until it's not"  BUT... Google home or Alexa can't do that either.... those platforms might be able to accomplish parts of it, but none of them give you the building blocks to give you Exactly what you asked for.  ISY does....  these also aren't really complex programs, but they are interlocking programs that need each other to provide the EXACT solution that you asked for.

Posted
I may be a bit simple minded in my thinking but isn't this a complex set of programs to accomplish something I perceive as simple? Is there an easier way to make this platform more adoptable for the every day home automation newbie? For instance If less than 40% do this, if more that 40% do nothing
I typically use one program that senses problems and decides whether a notification is justified based on more criteria.

Then I call another xxxx.notification program that would check if I am on vacation or not. As an example I might make my Alexa boxes say some warning and also send an SMS and an email with the warning on a four or 24 hour basis. If I am on vacation I may only send one notice or only one repeat notification every few days or every week. Getting too many notifications on vacations is disruptive. YMMV

Sent from my SM-G781W using Tapatalk

Posted
52 minutes ago, ewind said:

I may be a bit simple minded in my thinking but isn't this a complex set of programs to accomplish something I perceive as simple? Is there an easier way to make this platform more adoptable for the every day home automation newbie? ;) For instance If less than 40% do this, if more that 40% do nothing

Not trying to be offensive here but if it were that simple, it would have been easy to do and your original program would have worked when you tried to do it that way.

Someone else could potentially take the time out of their day to sit down and find a simpler solution but there is no guarantee it would cover all your bases the way @MrBill's did.

Some people overly complicate things while some will simplify things too much then wonder why things arent working out the way they intended or during certain times. Mr.Bill's programming takes those variables into account to lessen the chance of failure

  • Thanks 1
Posted (edited)

@ewindYou can also do this.  Though it won't have hysteresis, it is a bit simpler

Prgm 1
If
humidity less than 40
Then
blank
Else
blank

prgm 2
If
program 1 is true
Then
repeat every 6 hours
send notification

 

 

Edited by apostolakisl
Posted

I have something like this I programmed a few years ago with an Insteon thermostat to turn a shop fan on at a remote location. It's still running.

Since the humidity changed constantly and restarted the program every few minutes, I made one program to set a variable if the humidity value was 60% or above, and else if below. There is also an above or below temperature value to the variable.

The next program just looked at the variable. I also put a one hour wait on the "if" if the humidity cycled between 59 and 60, which it did surprisingly often since the fan would almost immediately drop the humidity. I didn't want the fan cycling on and off rapidly.

However, I haven't put near the thought into this that @MrBillhas, nor do I have his ISY ability. The OP just reminded me of what I did to solve a similar problem back then. Works perfectly.

Posted
4 hours ago, auger66 said:

I have something like this I programmed a few years ago with an Insteon thermostat to turn a shop fan on at a remote location. It's still running.

Since the humidity changed constantly and restarted the program every few minutes, I made one program to set a variable if the humidity value was 60% or above, and else if below. There is also an above or below temperature value to the variable.

The next program just looked at the variable. I also put a one hour wait on the "if" if the humidity cycled between 59 and 60, which it did surprisingly often since the fan would almost immediately drop the humidity. I didn't want the fan cycling on and off rapidly.

However, I haven't put near the thought into this that @MrBillhas, nor do I have his ISY ability. The OP just reminded me of what I did to solve a similar problem back then. Works perfectly.

Variables isolate the sensing from the responses very well and allows users to avoid all the 'disable sensing program's that lock up more often than I would like. Invariably, about 2-3 times per year I find some program disabled in error, which stops some process ISY should be handling. Variable usage is a much more reliable method.

Posted
1 hour ago, larryllix said:

Variables isolate the sensing from the responses very well and allows users to avoid all the 'disable sensing program's that lock up more often than I would like. Invariably, about 2-3 times per year I find some program disabled in error, which stops some process ISY should be handling. Variable usage is a much more reliable method.

No need for variables when you only need two values, just use the true/false state of the program as a variable.  To add hysteresis, add a third program.  I believe this is the least amount of code possible to accomplish the task.

Prgm 1
If
Humidity less than 40
Then
disable prgm 1 (this program)

Prgm 2
If 
Humidity greater than 43
Then
enable prgm 1

Prgrm 3
If
Prgm 1 true
Then
repeat every 6 hour
send notifications

 

Posted
No need for variables when you only need two values, just use the true/false state of the program as a variable.  To add hysteresis, add a third program.  I believe this is the least amount of code possible to accomplish the task.
Prgm 1IfHumidity less than 40Thendisable prgm 1 (this program)Prgm 2If Humidity greater than 43Thenenable prgm 1Prgrm 3IfPrgm 1 trueThenrepeat every 6 hoursend notifications

 

Nice! With built in hysteresis.

However the cycle time can still be interupted by the sensing programs. Using variables this doesn't happen, depending on program setup.

Also, I wouldn't think Prgm 1 would never test false, once it is disabled and therefore cycling program would never stop or get triggered again based on Prgrm 1 until Prgrm 2 allowed it and then after the humidity changed. That may never happen for a long time.

Sent from my SM-G781W using Tapatalk


Posted

Thanks @apostolakisl for the simplicity, that's all I was after was to notify me once the humidity drops below 40% and continue to notify until it's not true.

And thanks for all the other comments and tips from others. I appreciate a community willing to help out. I have always tried to keep things as simple as possible / not over complicate unless the task calls for it. If I ever go missing, whomever takes over my chaos may the have an easy road ?

Posted
5 hours ago, larryllix said:

Nice! With built in hysteresis.

However the cycle time can still be interupted by the sensing programs. Using variables this doesn't happen, depending on program setup.

Also, I wouldn't think Prgm 1 would never test false, once it is disabled and therefore cycling program would never stop or get triggered again based on Prgrm 1 until Prgrm 2 allowed it and then after the humidity changed. That may never happen for a long time.

Sent from my SM-G781W using Tapatalk

 

program 2 re-enables program 1 once humidity hits 44, program 1 will then run false on the next humidity change, triggering 3 to run false, ending the repeat.  Nothing can trigger program 3 except a CHANGE in the status of program 1.  Program 1 can run over and over a million times but program 3 sits idle unless it changes from true to false or vice versa.  Though in this example, doesn't even matter.  Once prgrm 1 becomes true, it sits idle and disabled until the humidity tops 43.  

Posted

well trying the simple approach of 2 programs, program 1 observes the humididty level <40% humidity works, and program 2 notofies me, but instead of every 3 hours which is what my repeat command is, it alerts every 5 minutes, which is the original behavior or my initial single program ?

Posted (edited)
1 hour ago, ewind said:

well trying the simple approach of 2 programs, program 1 observes the humididty level <40% humidity works, and program 2 notofies me, but instead of every 3 hours which is what my repeat command is, it alerts every 5 minutes, which is the original behavior or my initial single program ?

You probably are having hysteresis issues.  If the humidity goes 40, 39 ,40, 39 etc, it will keep resetting the program.  Go with the second set of program I listed that blocks that.

Edited by apostolakisl
Posted (edited)

Actually, here is something simpler.  Only 2 programs.  

Prgm 1
If
humidity less than 40
Then
blank
Else
blank

prgm 2
If
program 1 is true
Then
repeat every 1 second
   disable program 1
   send notification
   wait 6 hours
   enable program 1
   run if program 1

 

Edited by apostolakisl
Posted
23 minutes ago, apostolakisl said:

Actually, here is something simpler.  Only 2 programs.  

Prgm 1
If
humidity less than 40
Then
blank
Else
blank

prgm 2
If
program 1 is true
Then
repeat every 1 second
   disable program 1
   send notification
   wait 6 hours
   enable program 1
   run if program 1

 

Yeah, but that is the type of programming that I m trying to avoid. Every few months I find permanently disabled programs and have to reset the sequence again. That technique is just too risky to depend on and very obscure.

Control variables / switches offer a much more structured, and standard, way of programming that logic, without the traps created by disabling programs, creating possibilities of programs locking themselves out. After moving to polisy I have found about 7-8 programs disabled and processes stalled. This was an occasional occurrence for ISY programs also. Editing became dangerous as well as power blinks, making ISY programming undependable..

  • Like 2
Posted

So this topic kept going so I dug out the actual programs I have running in a hangar. The idea is when it's warm and humid, the concrete floor gets wet. So I wanted a program to run when "wet floor" conditions were met and turn on a big floor shop fan.

The values that mattered were 60% humidity and 60 degrees. If both of those conditions or above were met, then I wanted the fan on. Otherwise, off.

So this is to set the humidity variable

Set humidity variable - [ID 000B][Parent 0001][Run At Startup]
If
        'Thermostat' Humidity >= 60%
Then
        $Thermostat_hum  = 60
Else
        $Thermostat_hum  = 59
 

This is to set the temperature variable

Set temp variable - [ID 000A][Parent 0001][Run At Startup]
If
        'Thermostat' Temperature >= 60.0°
Then
        $Thermostat_temp  = 60
Else
        $Thermostat_temp  = 59

And this is to control the fan based on the temperature and humidity conditions. The wait 30 minutes is to keep the fan from cycling on and off too often when the humidity drops. It's not unusual for the humidity to be near 60%.

Humidity fan control - [ID 0002][Parent 0001]
If
        $Thermostat_temp is 60
    And $Thermostat_hum is 60
Then
        Wait  30 minutes 
        Set 'Floor fan' On
Else
        Set 'Floor fan' Off

 

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.3k
×
×
  • Create New...