Jump to content

Why do my programs stop after a day or so whenever I restart my IoX?


waffles

Recommended Posts

25 minutes ago, waffles said:

For programs that should be running continuously (for me that's indicated by the GREEN icon), if those switch to a RED Icon. Example here would be the 2a ones that monitor the state of the sensors.
Am I misunderstanding this?

 

Yes, I think you are misunderstanding the significance of red versus green.

Red indicates that the program is "idle", not that it is not monitoring the "if". The status column indicates if the program is evaluating true (run then) or false (run else).

Regardless of the color, the program is still monitoring the if portion unless there is no if or the program is disabled.

As I indicated yesterday, I think you should set up your programs to match the ISY Cookbook versions, which are known to work.

I find it difficult to clearly interpret your programs via the screen shots. How about taking one series of programs (example: all programs associated with leak sensor 01, right click on the program name and select "copy to clipboard". Then paste the actual program here. 

The question is, does your variable actually change? 

Link to comment

The following was taken from the examples I directed you to yesterday and will monitor the heartbeat.

 

If -

Control 'Leak Sensors / Kitchen Sink-Heartbeat' is switched On

Or Control 'Leak Sensors / Kitchen Sink-Heartbeat' is switched Off

Then -

$sLeakKitchenSink = 1

Wait 25 hours

$sLeakKitchenSink = 2

Else -

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

Link to comment

Here is the clipboard version, limited to Sensor #10.

I hope you find this easier to read.

 

-----------------------------------------------------------------------------------
Leak Sensor #10 - Variable Control 1 - [ID 006C][Parent 001C]

If
        'Leak Sensors / LS#10-Basement-Workshop- Dry / LS#10-Basement-Workshop- Wet' Status is On
 
Then
        $sLeak_10__workshop  = 9
 
Else
        Wait  10 seconds
        $sLeak_10__workshop  = 1


-----------------------------------------------------------------------------------
Leak Sensor #10 - Variable Control 2a-25 - [ID 0074][Parent 001C]

If
        (
             'Leak Sensors / LS#10-Basement-Workshop- Dry / LS#10-Basement-Workshop- Hea' is switched On
          Or 'Leak Sensors / LS#10-Basement-Workshop- Dry / LS#10-Basement-Workshop- Hea' is switched Off
        )
    And 'Leak Sensors / LS#10-Basement-Workshop- Dry / LS#10-Basement-Workshop- Wet' Status is not On
 
Then
        $sLeak_10__workshop  = 1
        Wait  25 hours
        $sLeak_10__workshop  = 2
 
Else
   - No Actions - (To add one, press 'Action')


-----------------------------------------------------------------------------------
Leak Sensor #10 - Variable Control 2b - [ID 0075][Parent 001C]

If
        (
             'Leak Sensors / LS#10-Basement-Workshop- Dry / LS#10-Basement-Workshop- Hea' is switched On
          Or 'Leak Sensors / LS#10-Basement-Workshop- Dry / LS#10-Basement-Workshop- Hea' is switched Off
        )
    And 'Leak Sensors / LS#10-Basement-Workshop- Dry / LS#10-Basement-Workshop- Wet' Status is On
 
Then
        $sLeak_10__workshop  = 1
        Wait  25 hours
        $sLeak_10__workshop  = 2
 
Else
   - No Actions - (To add one, press 'Action')


-----------------------------------------------------------------------------------
Leak Sensor #10 - Variable Control 3 - [ID 0076][Parent 001C]

If
        (
             $sLeak_10__workshop is 1
         And Time is Last Run Time for 'Leak Sensor #10 - Variable Control 2a-25' + 26 hours
        )
     Or (
             $sLeak_10__workshop is 9
         And Time is Last Run Time for 'Leak Sensor #10 - Variable Control 2b' + 26 hours
        )
 
Then
        Wait  5 seconds
        $sLeak_10__workshop  = 3
 
Else
   - No Actions - (To add one, press 'Action')


-----------------------------------------------------------------------------------
Leak Sensor Activation - [ID 001D][Parent 001C]

If
        $sLeak_00__sump_bottom is 9
     Or $sLeak_01__laundry is 9
     Or $sLeak_02__kitchen is 9
     Or $sLeak_03__sump_top is 9
     Or $sLeak_04__kitchen_ext is 9
     Or $sLeak_05__basement_bathroom is 9
     Or $sLeak_06__HVAC_drain is 9
     Or $sLeak_07__above_tall_AV_rack is 9
     Or $sLeak_08__above_short_AV_rack is 9
     Or $sLeak_09__washer is 9
     Or $sLeak_10__workshop is 9
 
Then
        Send Notification to 'GS' content 'Leak Sensor Activation'
        Resource 'Pushover-Leak-Sensor-Activation-Heartbeat missed'
 
Else
   - No Actions - (To add one, press 'Action')


-----------------------------------------------------------------------------------
Leak Sensor Problem - [ID 0022][Parent 001C]

If
        (
             Time is  9:00:00AM
          Or Time is  6:00:00PM
        )
    And $sLeak_00__sump_bottom is not 1
     Or $sLeak_01__laundry is not 1
     Or $sLeak_02__kitchen is not 1
     Or $sLeak_03__sump_top is not 1
     Or $sLeak_04__kitchen_ext is not 1
     Or $sLeak_05__basement_bathroom is not 1
     Or $sLeak_06__HVAC_drain is not 1
     Or $sLeak_07__above_tall_AV_rack is not 1
     Or $sLeak_08__above_short_AV_rack is not 1
     Or $sLeak_09__washer is not 1
     Or $sLeak_10__workshop is not 1
 
Then
        Send Notification to 'GS' content 'Leak Sensor Problem'
        Resource 'Pushover-Leak-Sensor-Program Problem'
 
Else
   - No Actions - (To add one, press 'Action')



-----------------------------------------------------------------------------------
Leak Startup - [ID 001B][Parent 001C][Run At Startup]

If
        $iStartUp is 0
 
Then
        Run Program 'Leak Sensor #00 - Variable Control 2a-25' (Then Path)
        Run Program 'Leak Sensor #01 - Variable Control 2a-25' (Then Path)
        Run Program 'Leak Sensor #02 - Variable Control 2a-25' (Then Path)
        Run Program 'Leak Sensor #03 - Variable Control 2a-25' (Then Path)
        Run Program 'Leak Sensor #04 - Variable Control 2a-25' (Then Path)
        Run Program 'Leak Sensor #05 - Variable Control 2a-25' (Then Path)
        Run Program 'Leak Sensor #06 - Variable Control 2a-25' (Then Path)
        Run Program 'Leak Sensor #07 - Variable Control 2a-25' (Then Path)
        Run Program 'Leak Sensor #08 - Variable Control 2a-25' (Then Path)
        Run Program 'Leak Sensor #09 - Variable Control 2a-25' (Then Path)
        Run Program 'Leak Sensor #10 - Variable Control 2a-25' (Then Path)
        Wait  5 seconds
        $iStartUp  = 1
 
Else
   - No Actions - (To add one, press 'Action')

 

Some background:

When I set these programs up, my aim was to follow the original code from the 2013 post. Maybe I missed something here.
The "And Wet Status is ..." modification was suggested later by the original poster, so I thought it would be a good idea to also implement this, in particular when I read that the behavior of the sensors had changed in later versions. I wanted to make my code as robust/current as possible.

 

 

Link to comment

First, I think you did "copy" and not "copy to clipboard" which is at the bottom of the list after right clicking. I am bringing this up because on a long post it is hard to read and scroll to the right to see the entire program. When you use "copy to clipboard" the entire program is plainly visible without scrolling right. This will make future questions much easier to follow along.

I'm only looking at what I think is your heartbeat program, do I have this correct? If so, to align your program with the example, I think it should be modified to be:

Leak Sensor #10 - Variable Control 2a-25 - [ID 0074][Parent 001C]

 If

             'Leak Sensors / LS#10-Basement-Workshop- Dry / LS#10-Basement-Workshop- Hea' is switched On

          Or 'Leak Sensors / LS#10-Basement-Workshop- Dry / LS#10-Basement-Workshop- Hea' is switched Off

      Then

        $sLeak_10__workshop  = 1

        Wait  25 hours

        $sLeak_10__workshop  = 2

 Else

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

 Let's get the basics working before adding anything else to the program. After that, keep an eye on it and see if the variable updates. 

Also, can you confirm that the variables you have created starting with $i are Integer Variables and the ones starting with $s are State Variables?

Link to comment
1 hour ago, waffles said:

top is from the original post - bottom is my implementation

But I still don't get the need to have the "AND" in the line. I didn't read the later replies in the thread you originally referenced, but thought if the original programs worked as posted then modification shouldn't be needed. Unless there's a specific reason. To me..."missing heartbeat" isn't a reason to modify the program, but a reason to find the cause of missed heartbeat. 

 

1 hour ago, waffles said:

how would I do this "...to put all existing programs in a folder and make the folder conditions false so they don't run..."
(As you may have seen in my earlier posts, I had tried to disable the programs individually by unchecking the "enabled' box, but this did not work.)

Folder conditions are tricky, but they're an easy method to make all programs in that folder not run. 

https://wiki.universal-devices.com/index.php?title=ISY-99i/ISY-26_INSTEON:Folder_Conditions

You already have them in a folder for "Leak Sensor - 49 hrs". In that folder make a condition that will NEVER be true. (i.e. if a variable = 1 then set the variable to 9999). It will act as though the programs in that folder do not exist and will not fire. Now...there is an issue (and I haven't personally proven it), but there might be a way that if a program calls on the "THEN" of a program in a false folder it might trigger, but I cannot confirm. 

 

Link to comment

Thanks All who have helped here for being so patient with me. I really appreciate it.

Yes, $i are Integer Variables and the ones starting with $s are State Variables.

In the meantime I have disabled the folder that contains the current sensor programs and built a set of programs based on the initial 2013 code; the way it is also included in the Handbook. It's a lot simpler than the version it had morphed into over the years, and which I have been using.

So let's go back to the basics and see how well this goes!

I'll keep you posted.

Thanks!

  • Like 1
Link to comment
9 hours ago, waffles said:

As you may have seen in my earlier posts, I had tried to disable the programs individually by unchecking the "enabled' box, but this did not work.

You are misunderstanding what the "enable/disable" option does.  It does not enable/disable the program, it enables/disables the program's IF.  You can still right-click on the program and run the THEN or ELSE, and the programs will run when the ISY starts up if they are set to "Run At Startup".  The only thing that won't happen is the program won't be triggered by anything in its IF.

Link to comment
8 hours ago, DennisC said:

Red indicates that the program is "idle", not that it is not monitoring the "if". The status column indicates if the program is evaluating true (run then) or false (run else).

Red indicates that program's IF last evaluated FALSE, while green indicates the IF last evaluated TRUE.

If the program icon is a solid color then the program is still running.  If the solid color is green, it is running the THEN section, while if it is red, it is running the ELSE section.

If the program icon only has the left portion colored, then it is not currently running, and the color tells you if it last ran the THEN (green) or the ELSE (red).

  • Like 1
Link to comment

Update: Since my restart with the original, lean 25hrs program set I have had a few warnings from 2 of the 10 sensors about missed heartbeats ('2'). Right now all variables have gone back to '1', i.e. all clear.

I checked the log for LS Heartbeat activities. Here is an example for one the LS (not one of the ones that had missed a heartbeat). 
image.thumb.png.b6da52faee22a962b41c1d071f8922b8.png

 

I had expected to see an event for every day (approx 24hrs), but there are several gaps. That even though the IoX had been running the whole time with the exception of about 2 days after a bad f/w update.
Any thoughts here?

 

Edited by waffles
Link to comment
5 hours ago, waffles said:

I had expected to see an event for every day (approx 24hrs), but there are several gaps.

Generally speaking, statuses are only logged when they change.  Heartbeats usually only send an ON or an OFF, but not both.  So generally speaking, you won't see heartbeats logged by the ISY.  Your listing only shows ONs, and it doesn't look like you filtered the "Value" column, so I don't have an explanation for why any of the lines after 527 appear in your log without an intervening OFF.  Some of them might be explained if your ISY was rebooted since going from no status to ON would be logged.

Link to comment
5 hours ago, waffles said:

I have had a few warnings from 2 of the 10 sensors about missed heartbeats ('2').

It's possible the heartbeats from those two sensor are having trouble getting through to the ISY.  You could try as @tmorse305 suggests, or you might try starting the Event Viewer, setting it to Level 3, and then letting it run.  After a couple days, save the log it has created and look for any heartbeat communication.  What you really want to see is the "Hops Left" for the heartbeat from the two troublesome sensors.  If they're having trouble getting their signal through, you'd expect to see "Hops Left" being 0 or 1.

Another thing you could do, if you have the Network Module, is to change your program that looks for heartbeats so that it saves to a file the time each heartbeat is received.  With that information, you'll be able to check whether the heartbeats from the two sensors is consistent.  By that I mean, if on Day 1 the heartbeat comes in at 12:01, and you don't see a heartbeat on Day 2, but on Day 3 you see a heartbeat close to 12:01 and on Day 4 you see a heartbeat close to 12:01, then you can reasonably infer that on Day 2 there was a heartbeat around 12:01 but it just didn't make it to the ISY.

Link to comment

Let me see if I got this right:  The LS sends a heartbeat Control message approx. every 24 hrs. In properly working setup I should not see any "Status" changes, because the heartbeat signal just keeps coming... Therefore for my montoring I will need to look for LS Heartbeat 'Control' messages, rather than "Status" changes.

Problem is that the ISY log only captures the "Status" changes. If I want to monitor what happening on the "Control" side, I need to do this via a homemade custom log, e.g. via the Networking Module. Is my understanding so far correct?

On 3/3/2023 at 9:09 PM, kclenden said:

.....

Another thing you could do, if you have the Network Module, is to change your program that looks for heartbeats so that it saves to a file the time each heartbeat is received.  With that information, you'll be able to check whether the heartbeats from the two sensors is consistent.  By that I mean, if on Day 1 the heartbeat comes in at 12:01, and you don't see a heartbeat on Day 2, but on Day 3 you see a heartbeat close to 12:01 and on Day 4 you see a heartbeat close to 12:01, then you can reasonably infer that on Day 2 there was a heartbeat around 12:01 but it just didn't make it to the ISY.

 

EDIT - never mind - I since figured that web server part out on my own.

In the meantime I have set up a bunch of Pushover notifications - for each of the sensors on their program #2 - to alert me of any heartbeat "action". My expectation is that I should see every 24hrs a Pushover notification for each of my 10 sensors, if all works well.

Edited by waffles
figured it out on my own - no need to bother anyone with it
Link to comment
2 hours ago, waffles said:

Problem is that the ISY log only captures the "Status" changes. If I want to monitor what happening on the "Control" side, I need to do this via a homemade custom log, e.g. via the Networking Module. Is my understanding so far correct?

Seems like a lot of work to get heartbeat notifications. My question now is...

Why are you wanting to monitor/track heartbeats?

The whole point of the heartbeat missed notification is if your leak sensor is offline. If you look at the original theory of the programs you were copying the whole thing is to use notifications to trigger a reaction from you.

It seems that you're more worried that the ISY isn't recording the heartbeat than what the heartbeat even means to the system. 

Now you're trying to learn how to write information to a webserver when a simple notification would do the job. 

My thought is now you've got so many notifications you won't really pay attention to what they're saying and you'll miss the big alert if you have an actual water issue. 

You've got to step back and look at the big picture.

1) What are you trying to achieve? 

Track heartbeat?

Known when water/leak happens?

2) Do you really care when the heartbeat happens or just that the sensor is communicating with ISY?

 

Since you said you went to the basic programs as you linked in an earlier post on Tuesday have your notifications been accurate? If so, why dig deeper for something? If you don't think they're accurate then you need to change the system so that the sensors are communicating regularly, or else replace the sensors. 

 

  • Like 1
Link to comment

@Geddy at this point I do not trust my setup to accurately and promptly alert me if a leak occurs. Therefore I am currently in troubleshooting mode. With my latest effort I want to verify that the ISY actually receives a heartbeat signal every 24 hrs from each sensor. If that's the case, I can close this topic and shift my focus toward troubleshooting my programs. If the ISY does not receive the signals, my plan is to look closer into the communication between LS and ISY.

Link to comment

@waffles rather than waiting on the heartbeats why not try with water/wet test at/near the location of the sensor? Once tested and alert received you can dry off the sensors and reset them.

You said Tuesday you went back to the original programs. Have those been sending daily notifications about the heartbeat?

From the post you linked to:

Quote

1. Functionality
1a - A notification is sent twice a day for any problem with a leak sensor (i.e. missed heartbeat) at 9:00am and 6:00pm. This avoids the inevitable single email that I ignore and the problem goes uncorrected for weeks...
1b - A notification is sent immediately when a leak sensor is activated (and also again twice daily as above). This email is not sent repeatedly even if the sensor is "fluttering" at first activation, which it commonly does.
1c - The email notification shows the status of EVERY leak sensor (heartbeat received as expected, heartbeat missed, sensor activation, etc.)
1d - If the program monitoring heartbeat signals somehow fails or is shut down, a problem notification is sent.
1e - All functionality should survive an ISY reboot without user intervention.
 

To me the programs from the thread you said you were copying should be sending you alerts twice a day. Are there issues with the sensors in those messages? Otherwise, you're doing your own thing and seems like nobody knows what you're doing to try to help further.

I believe there has also been a few posts elsewhere about how the sensors are cleared. There were apparently a few different sensor versions and firmware for each that require a different method for clearing or resetting. 

 

  • Like 1
Link to comment
On 3/4/2023 at 2:26 PM, waffles said:

Therefore for my montoring I will need to look for LS Heartbeat 'Control' messages, rather than "Status" changes.

That is correct.

On 3/4/2023 at 2:26 PM, waffles said:

Problem is that the ISY log only captures the "Status" changes.

That is correct.

On 3/4/2023 at 2:26 PM, waffles said:

If I want to monitor what happening on the "Control" side, I need to do this via a homemade custom log, e.g. via the Networking Module.

Creating a custom log is one way to do it.  You can also allow the Event Viewer to run at Level 3 for a couple days.  Save that log to a text file and then you'll be able to search for messages from all of your sensors.

Link to comment
On 3/4/2023 at 4:52 PM, Geddy said:

Seems like a lot of work to get heartbeat notifications. My question now is...

Why are you wanting to monitor/track heartbeats?

Seems like for troubleshooting purposes which in my experience can not only be invaluable, but also quite illuminating.  But as you point out, could be a distraction if you don't have a clear goal.

On 3/4/2023 at 4:52 PM, Geddy said:

You've got to step back and look at the big picture.

1) What are you trying to achieve? 

Track heartbeat?

Known when water/leak happens?

This is really good advice.  Often the best course is to step back and ask yourself what your goal is.  Then concentrate on the steps that move you toward that goal.

On 3/4/2023 at 4:52 PM, Geddy said:

2) Do you really care when the heartbeat happens or just that the sensor is communicating with ISY?

Heartbeats tell you that a sensor is communicating with the ISY.  Consistent heartbeats tell you that a sensor is consistently communicating with the ISY.  A sensor that is not consistently communicating with the ISY can not be trusted to communicate with the ISY when it really matters.  My guess is that most people only use heartbeats to know when a sensor's battery has died, but they can be used for so much more.

Over the course of a month, if you only see 15 heartbeats, are you really going to trust that sensor to alert you when needed?  And if you only see 15 heartbeats, then what?  How do you fix it?  By logging the date/time of heartbeats to a file, you can look for patterns.  Is the time of the heartbeat consistently changing?  If so, then the power to the sensor could be being interrupted.  Are they only missing during times that some other device is turned ON?

By default, the ISY logs status changes.  Unfortunately it doesn't log control signals. Augmenting the default ISY log with custom programming to log control signals can be very useful.

  • Like 1
Link to comment
20 minutes ago, brians said:

How do you create a custom log?

In short:

  • You need the Network Module - among other things this adds a webserver to your ISY
  • You create a notification that appends to a file on your webserver - in this notification you should include variables that contain the data you want to log
  • You create a program that is triggered by whatever action you're wanting to log - in this program you put information into the variables that are referenced in your notification, then you launch that notification
  • You can review your custom log via a browser by going to http://[your ISY IP address]/USER/WEB/[your log file name]

@waffles message above gives you the link to the wiki with detailed instructions about the notification that becomes the core of your logging.

Here is a screenshot of the notification that I use to log the date/time of the heartbeat received from a garage door sensor.

image.thumb.png.ca4f5916c9d33f6a709ce7060b8247be.png

In the program that reacts to the garage door sensor hearbeat, I put the current date into ${var.1.25} and I put the time into ${var.1.26} then I execute "Send Notification" for that notification.

Edited by kclenden
Added screenshot of my notification
Link to comment
Guest
This topic is now closed to further replies.

×
×
  • Create New...