Jump to content

Unwanted behaviour at restart


N8N

Recommended Posts

Hello,

I'm using my 994i as a controller for my pool

I have a contactor that is turned on/off by an insteon switch, and I'm also using a smartenit output relay to allow my pool heater to turn on.

the last and most important thing is that I'm using it to control a chlorine dosing pump.

I wasn't home today, but it looks like there was a power blip just before the pump was supposed to come on, but when power came back on, the pump started up, after the start time was passed.

I thought I had this covered by using the fact that system variables reset to 0 on restart.

The pump ran all afternoon and emptied my chlorine tank out.  Not cool.

Starting the admin console, I see that the folder I have the programs in is set to not allow to run.

I have a variable that will not allow the pump to run if the main pump is off, but the main pump was running.

All my variables were set to 0 which should have not allowed the pump to start.

how can I reprogram this to prevent an unwanted start up and run all day, when the timer is set for 17 minutes?

I've attached the log and error log files, plus the folder of pool related programs.

Not sure how to add the variables information, but they all say last state change was 9:12:51 AM

 

I really appreciate any help.  I'd like to be able to get it programmed such that I can trust it.

ISY Log.v4.9.0__Sat 2024.08.17 04.33.41 PM.txt ISY Error Log.v4.9.0__Sat 2024.08.17 04.40.27 PM.txt

Link to comment

1) create a separate "dead man" switch program.

If status pump is on

    wait xx minutes. (Something longer than it should run)
    Set pump off
    Send yourself a dead man program notification

else

 

2) you can mark programs to run at startup. You may want a program that establishes startup conditions (pump off?) sends a notification, and has no "If" statements. Set it to run at startup 

Link to comment

I've created a couple programs to try your suggestions, but now that I'm reading page 183 of the manual, I see a couple things.

My pump on time is 9:03, and the seeming restart was 9:12, which happens to put it right within the 10 minutes grace period.

I want to double-check what I'm reading...If I were to check off the Catch Up Schedules at Restart, then there is no plus/minus for the programs be run? 

I'm not sure that this was the problem because I don't understand how the wait 17 minutes was essentially ignored. 

Link to comment

Without seeing your programs there's some guessing on my part. If power goes out, the pump loses power too (?)

Variables that haven't been saved with "init to" statements in your iox programs will reset to 0

It will help to see the programs here

Link to comment

I suggest one of these approaches I described above:

  1. Maintaining variable state. Right now, when your isy restarts, they''re all being reset to 0. Every where you assign a value to a state variable in a "Then" or else, put an "Init to" statement right under itfor that variable for the same value so the ISY remembers when it resets.
     
  2. Have a program that you set under the programs tab to run at start up and make sure the valves are off (or whatever startup state should be). Different inston / smartenit devices can come back up in different states on a reset. You might have to bench test the program by unplugging the ISY. If you create a deadman program as I described in my first response, you'll want to set that to run at startup too

Approach 1 can be a slippery slope and would need more validation testing. A final thought is to have the ISY run a program when it starts up to shut valves off and send you a notification, so it can't over-run and you can be aware and deal with it

Edited by paulbates
Link to comment
13 hours ago, N8N said:

I see that the folder I have the programs in is set to not allow to run.

Are you counting on a variable set to 0 and attached to a folder from preventing the program(s) inside the folder from running?

If so, I suggest removing the folder variable and using the variable inside your program.

Folder variables can be unreliable, which I think you may have found out.

7 hours ago, N8N said:

Sorry, I saved the programs, but didn't attach them.

The best way to attach programs is to right click the program and at the bottom of the pop up list select copy to clipboard. Then you can paste the program here.

Link to comment
Posted (edited)

I set a variable in spring and fall to prevent the programs from running during winter.

Everything is unplugged by then anyway, so I would only see if I had a problem via the logs.

I was also figuring on if there was a power outage, on reboot the ISY would keep variables set to 0, so I'd have to manually set the variables to a 1 to allow the programs to turn on the pumps, so a bit of both of what you suggest.

I'd like to say that the grace period is what outsmarted me, but assuming the log is accurate, the chlorine pump turned on before the main pump, but I thought I was inhibiting that from happening with a state check for the main pump running being required.

Here's a C&P of the programs, as I've modified them now...

pool_pump_daily_run - [ID 0018][Parent 001D]

If
        Time is  8:30:00AM
 
Then
        Set 'Pool Contactor' On
        $chlorine_counter  = 0
        Wait  11 hours 
        Set 'Output Relay 2 Pool Heater' Off
        Wait  1 minute 
        Set 'Pool Contactor' Off
 
Else
   - No Actions - (To add one, press 'Action')
 

pool_chlorine_pump_normal - [ID 0019][Parent 001D]

If
        Time is  9:03:00AM
    And $Chlorine_ok is 1
    And Status  'Pool Contactor' is On
    And $SLAM is not 1
 
Then
        Set 'Output Relay 1 Chlorine Pump' On
        Wait  17 minutes 
        Set 'Output Relay 1 Chlorine Pump' Off
        $chlorine_counter += 1
        Set Program 'pool_chlorine_pump_normal' To Not Run At Startup
 
Else
   - No Actions - (To add one, press 'Action')

 

 

main pump allow chlorine - [ID 0012][Parent 001D]

If
        Status  'Pool Contactor' is On
 
Then
        $Chlorine_ok  = 1
 
Else
        $Chlorine_ok  = 0
 
this is a check to see if the pool circulation pump is on.
If it is, then we can allow chlorine to run.
If it is not then we cannot allow chlorine to run
 

 

 

chlorine pump off - [ID 0020][Parent 001D]

If
        $Chlorine_ok is 0
     Or Status  'Pool Contactor' is Off
     Or Control 'Remote 6 Chlorine pump manual' is switched Off
 
Then
        Set 'Output Relay 1 Chlorine Pump' Off
        Stop program 'chlorine manual'
 
Else
   - No Actions - (To add one, press 'Action')
 

Edited by N8N
troubleshooting last night, I set the on-time to 9:03:00PM, correct time intended is AM
Link to comment
8 hours ago, N8N said:

main pump allow chlorine - [ID 0012][Parent 001D]

If
        Status  'Pool Contactor' is On

This one may not run after startup, it's a key control and should be set to "run at startup" so you know it's right. 

 

All of the programs that use a hard time of day: if those started, and then the ISY restarted from a power outage later, what happens (maybe that's where this began)?  Based on how the ISY is set to "catch up" on programs when it restarts in the config tab, different things may, or may not happen. I think the randomness of power outage time will make this hard to be bullet proof. It's probably better to get a notification that the ISY restarted, have it shut everything off so you can manually intervene later and not accidentally over chlorinate the pool 

  • Like 1
Link to comment
2 hours ago, paulbates said:

All of the programs that use a hard time of day: if those started, and then the ISY restarted from a power outage later, what happens (maybe that's where this began)?

I would agree, this may not be the best way of doing this. 

I would consider changing the hard time of day to a start and end time (to - from). 

This way they would run during that time frame and then upon power failure, return to the desired position when power resumes.

You could also run a disable program from this one to control critical functions (chlorine). By adding a counter when the pump runs, you can send a notification if the run counter exceeds x minutes/hours. The counter can be reset at midnight.

Link to comment

Thanks for the suggestions.

The odd things is that the log doesn't show anything starting at 830 (the main pump), but then the isy turns everything on after it started up.  I guess that's what you're already saying Paul...

How to do I do the counter?  I suspect it's so easy I can't see it.

Link to comment

ISY Cookbook

Scroll down to pg 120. 

Your programs have variables, so you've used them. Make a State variable call it Pool Cycle Counter, and then add this iox variable statement:

$Pool_Cycle_Counter += 1

... every time a cycle happens

Use that variable, either to send that a notification, or take an action in an iox program

If 
   $Pool_Cycle_Counter = > (some hard integer number)
Then
    Send notifications, shut things off, 
    $Pool_Cycle_Counter = 0

Link to comment

ok, so i start testing....after reading...

8.2.14 recommends using the "control" condition instead of the state condition because it causes a program evaluation each time the control changes...

Program to cycle the pump on and off (testing for only a minute for tonight).

After the from/to time is all done, I want to turn off the pool heater so that it doesn't shut down under error condition due to no water flow...

pool_pump_daily_run - [ID 0018][Parent 001D]

If
        From     9:22:00PM
        To       9:23:00PM (same day)
 
Then
        Set 'Pool Contactor' On
 
Else
        Set 'Output Relay 2 Pool Heater' Off
        Wait  3 minutes 
        Set 'Pool Contactor' Off
 

I wanted to set a State Variable in a separate program that will monitor the status of the pump contactor.

Monitor main pump - [ID 0026][Parent 001D]

If
        Control 'Pool Contactor' is switched On
 
Then
        $sPool_Main_Pump  = 1
 
Else
        $sPool_Main_Pump  = 0

 

Unfortunately in the summary tab, this program shows as not ever being run, and the Variable doesn't change to a 1 while the pump is running.

What am I missing this time?  Sorry if I'm not getting it.  this simple part is not working the way I thought I was reading the directions.  I will try "status" instead of "control" in the drop down in a minute to see if the behaviour changes.

 

Link to comment

In your case status is probably more appropriate... the case being the power goes out when the pump is running and the ISY restarts. When the power comes back up, the smartenIT switch is likely still on, its last state, so it won't "switch on" and the program doesn't execute. Power is restored and it continues powering the pump.

When the ISY restarts it interrogates every Insteon device for its state, and it will see that the pump is on, so "If Status" will be true. It won't "switch on" during that time and explains what you are seeing

Edited by paulbates
Link to comment

Something else to know about "Switched on" in Insteon devices which is a factor too. "Switched on" messages are only sent to the PLM/ISY when you physically flip the switch at the device.... not when you turn it on with a program.

"If Status" is the right way to go for this use case

Edited by paulbates
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...