Jump to content

Program Runs and Should Not


btreinders
Go to solution Solved by Javi,

Recommended Posts

I have a program that should only run when IFTTT sets a state variable to 1 (that's the only thing in the if, state_variable = 1 then send notification) (nothing in the else).  It is a notification that an iRobot S9 got stuck.  I am getting random notifications that it is stuck and when I look at the program it is green like it ran and it has the right time stamp but the variable says it has not changed since the ISY was rebooted and is still 0.  Ideas? Thank you!

Edited by btreinders
Link to comment

Floorence Stuck - [ID 041B][Parent 041C]

If
        $IFTTT_FLOORENCE_STUCK is 1
 
Then
        Wait  1 minute 
        Set 'Notification / Notification Controller / Service Pushover Pushover' Message Floorence Stuck
        Set 'Notification / Notification Controller / Service Pushover Pushover' Priority Normal
        Set 'Notification / Notification Controller / Service Pushover Pushover' Device all
        Set 'Notification / Notification Controller / Service Pushover Pushover' Send Message
 
Else
   - No Actions - (To add one, press 'Action')
 

 

I don't think the variable ever goes to 1 because the time stamp for it changing is still at the last reboot

Link to comment

if the variable is never getting set to 1, then something else is triggering the node to send message while that message is still set as the message for the node.    in other words, the first three lines are setting dropdowns on the node, the 4th is actually sending.  If another program just calls send message without changing anything then you get the message for the dropdowns that are already set. 

One thing you could do to debug this is have this program do one more thing.  Perhaps turn on a light.  Or perhaps set up a counter using an interger variable and have this program increment the counter as it runs so that you can see if this program is actually being tripped.

  • Like 3
Link to comment
17 minutes ago, btreinders said:

I don't think the variable ever goes to 1 because the time stamp for it changing is still at the last reboot

You could try setting the variable manually to 1 to be sure it triggers the notification and make sure the Program runs, but your suspicions of the variable not getting set because of the time stamp above sounds right.

Link to comment
8 minutes ago, MrBill said:

if the variable is never getting set to 1, then something else is triggering the node to send message while that message is still set as the message for the node.    in other words, the first three lines are setting dropdowns on the node, the 4th is actually sending.  If another program just calls send message without changing anything then you get the message for the dropdowns that are already set. 

One thing you could do to debug this is have this program do one more thing.  Perhaps turn on a light.  Or perhaps set up a counter using an interger variable and have this program increment the counter as it runs so that you can see if this program is actually being tripped.

I will try those suggestions.  Thank you.  I don't think it's another program just sending because I have 3 other programs for the other three vacuums and they all have the issue.

Link to comment
9 minutes ago, Dub said:

You could try setting the variable manually to 1 to be sure it triggers the notification and make sure the Program runs, but your suspicions of the variable not getting set because of the time stamp above sounds right.

It does run correctly if I set the variable manually.  Thank you.

Link to comment
17 minutes ago, btreinders said:

I will try those suggestions.  Thank you.  I don't think it's another program just sending because I have 3 other programs for the other three vacuums and they all have the issue.

does the program summary time show the program running via "last run time"?   Is the ISY a Polisy or 994?  it's possible the data/time for last variable update isn't getting updated due to a bug, I'd expect that more from a Polisy than a 994.

Link to comment
26 minutes ago, MrBill said:

If another program just calls send message without changing anything then you get the message for the dropdowns that are already set. 

@btreindersThis is exactly the problem I was having last night when testing something. I switched to a dedicated Network Resource call to the Pushover API to help narrow down if it was program I was testing or another one.

1 hour ago, btreinders said:

I am getting random notifications that it is stuck and when I look at the program it is green like it ran and it has the right time stamp but the variable says it has not changed since the ISY was rebooted and is still 0. 

One other thing to clarify.  Is the iRobot actually getting stuck?  Or is that what you mean by random messages?

 

Link to comment
24 minutes ago, MrBill said:

does the program summary time show the program running via "last run time"?   Is the ISY a Polisy or 994?  it's possible the data/time for last variable update isn't getting updated due to a bug, I'd expect that more from a Polisy than a 994.

I don't know.  I set the variable manually and now it shows that run.  I thought it did but not 100% sure now.  I also just noticed that only two are doing this out of the four.  I thought it was all of them.  So maybe I'll just start from scratch on those two in hopes it fixes it.  It is a Polisy and it did have the bug where the variables change times were off but that was fixed in the last update I think.

 

16 minutes ago, Dub said:

@btreindersThis is exactly the problem I was having last night when testing something. I switched to a dedicated Network Resource call to the Pushover API to help narrow down if it was program I was testing or another one.

One other thing to clarify.  Is the iRobot actually getting stuck?  Or is that what you mean by random messages?

 

No, it isn't even running.

Thank you both for such quick responses!  That is why I'll be a Universal Devices customer for life!

Edited by btreinders
  • Like 1
Link to comment
58 minutes ago, btreinders said:

Thank you both for such quick responses!  That is why I'll be a Universal Devices customer for life!

@MrBillis the master troubleshooter and I love following along when he is helping.  I do like to clarify a bit and be sure I understand and especially for others that may read later.

The biggest problem with random problems is they are random.  If I can duplicate it I can usually fix it is something I heard said once.

These are 4 things that you could try to help clarify what may be happening.  If Mr Bill comes back with conflicting advice to mine take his!! I would!  I think I read he is offline a lot at night in another post, so trying to give you some "homework" that may help.

What I wasn't clear on if you get the notification when the iRobot is actually stuck. Do you get the notifications when the iRobot is stuck?

1) Change or add items to the Then statements as (Mr Bill Recommended).  I usually choose a variable and increment it by one to get a count, but since there is a question about the variables, I think something like a light like Mr Bill suggested is a better option.  I have used the Virtual Switch Node Server here too it will eliminate you missing the light or someone in the house turning it off before you notice.

2) Change your notification message on the Then statement to send to a Network Resource to the API if using Pushover.  Then you can tell if its this Program or Something else triggering it.  You can either send the Network Resource to the Pushover API or the API on the Node Server.  (The node server will retry if there is an error where a Network Resource to Pushover is one time send with no retry if there is an error)

3) If there actually is a problem with being notified when the iRobot is stuck, try changing the variable if possible manually on the IFTTT site(I assume this possible, but I don't use IFTTT).  If not skip this step.

4) Disable the Program if the messages happen frequently enough and see if you still get them while the Program is disabled.  

Edit(info added): If you do get messages and you have done #4 look at the Programs Summary View and see what Programs ran when you got the message.  It might be helpful to get some screenshots too. 

If you ARE getting messages when the iRobot is stuck, but also getting random messages when it is not, I think what Mr Bill says below is correct and you need to look at other places where you are using the Notifications. #4 will help you here.

1 hour ago, MrBill said:

If another program just calls send message without changing anything then you get the message for the dropdowns that are already set. 

When I had the wrong message last night I was pretty sure I had gotten the right options like you have in your program, but I was getting the wrong message.  It was probably operator error(me), but the Network Resources are more absolute.  I am also on Polisy using the Notification Node Server.

One last question to think about.  Was this ever working and what changed since it stopped?

I know this is not a solution, but hopefully this will help gather more information.  If you need help with the Network Resource set up, PM and we can keep the post focused on the random issues.

Edited by Dub
Info added below #4
Link to comment

Was never working, well, was never not sending the message even when the robot was not running.  These were all new programs a few days ago.  I created new programs for the two that were sending messages randomly and the old ones still do it and the new ones do not, or at least have not yet. Fingers crossed.  They do show they ran and they will turn on lights if I add them.  So strange.  If I ever figure it out I'll be sure to post it here.  Thanks again!

Edited by btreinders
Link to comment
  • Solution

Based on your description it appears there is something triggering runThen on the program.  The variable did not change (based on timestamp)  and the program is true (last evaluation). Programs will evaluate to true if manually runThen and false for manually runElse until something causes a new evaluation.  So, if the variable is 0 and the program is true something triggered runThen.  This assumes the init value for the variable is also zero.

Historically program IDs were limited in ISY994, so they are reused after deleted.  If I had to guess I would say there is something triggering runThen on the current program or an old program with the same ID (Alexa, IFTTT, Google ??).  Does the behavior continue if you remove the IF condition from this program?  

Link to comment

Could you have a network resource outside of Isy sending a runThen to Isy?  As Javi mentioned, looks like that. It is very easy to search all your programs for any reference to this program to rule out a runThen origination from another isy program, but not so easy if it is from something like ifttt. There is a"find" function in Isy to search all rograms for any reference to that program. I forget exactly, but if you leave the event viewer open  and set to level 3, i believe it will tell you the source of the trigger. In addition, you don't need a variable to trigger the program, just have whatever sets the variable instead directly trigger the program. 

Edited by apostolakisl
Link to comment

Yes that was it!  I had recently deleted some programs before creating these new ones.  I thought the portal deleted them automatically but I guess it does not.  Thank you!  Now to go find all the ones that are no longer in the ISY.  That won't be easy or does someone know of an easy way?

Link to comment
39 minutes ago, btreinders said:

Yes that was it!  I had recently deleted some programs before creating these new ones.  I thought the portal deleted them automatically but I guess it does not.  Thank you!  Now to go find all the ones that are no longer in the ISY.  That won't be easy or does someone know of an easy way?

If you have a program referencing a program, or an outside network resource referencing a program and you delete the program, you get an orphan reference.  The reference is not to a program name, but to a program ID slot.  This allows you to name the program anything you want and later change the name without breaking the references.  But if you delete a program, have an orphan reference, and then create a new program that then picks up that same ID, then it will now reference the new program.  I have no idea how ISY picks what ID slot to put a new program in, I have tested adding new programs and they do not add to the end, they seem to pick up some random unused slot that presumably was an old deleted program's ID.  Basically, it is the same thing as if you just changed the program and never deleted it.  ISY ID's all programs in a sequential fashion using hex numbering.  The ID is in the far right column of the program summary page.  This ID is what you use when setting up an outside network resource calling the program.  Also, if you delete a program and don't hit "save changes", the program will not actually be deleted even if though it will vanish from the tree, only to reappear when you next load the ISY admin console.  This is a bad design issue that I don't know why UD doesn't fix and is related to the way they use Java.  Should you delete a program that is the target of another ISY program, that program will now say "Not Specified" in the program where the name used to be.  You can search for any orphan program links by searching the raw text "Not Specified" in your programs folder to hunt those down.  While ISY admin console will always substitute the program ID with its given name, any reference to the program via the network (outside of ISY) will reference the ID only.

Edited by apostolakisl
Link to comment

Yes, I understand that if you delete a program that is inside another one that the one left has a not specified in it for that call.  What happened in my case and what I still need to go through and find all of them is in the portal if you have anything that references a program and that program is deleted it is not deleted in the portal.  I was just wondering if there is an easy way of finding those.  Otherwise I just have to go through all programs in the portal for Google, Alexa and IFTTT and make sure the program is still in the ISY and has not been deleted.

Link to comment
1 hour ago, btreinders said:

Yes, I understand that if you delete a program that is inside another one that the one left has a not specified in it for that call.  What happened in my case and what I still need to go through and find all of them is in the portal if you have anything that references a program and that program is deleted it is not deleted in the portal.  I was just wondering if there is an easy way of finding those.  Otherwise I just have to go through all programs in the portal for Google, Alexa and IFTTT and make sure the program is still in the ISY and has not been deleted.

Any programs that you entered into your IFTTT/Google/Alexa would need to be manually removed from them should you delete them ISY.  At best they activate a non-existing program, at worse, they activate a program that is now something different.

Link to comment
Guest
This topic is now closed to further replies.

×
×
  • Create New...