LarryCRetired Posted August 14, 2021 Posted August 14, 2021 Not sure if this is the right place to post this question. I had a power outage yesterday. The ISY restarted but the Polisy did not connect to the ISY. I had to re-enter my credentials and restart my node servers. I sent a Ticket to Michel and based on his analysis, my ISY was busy so the Polisy could not connect. Don't want to add to Michel's workload, so I thought I would post this issue here. I experimented this morning and just powered down the Polisy and it came back up fine. My node servers connected. So if anyone have some thoughts on how I can delay everything that is done at startup of the ISY, so the Polisy can connect first would be appreciated. On my ISY config screen, I have Query at restart checked Wait while busy reading checked I don't want to experiment powering down the ISY if I don't have to, so I thought I would ask the Forum the consequences of unchecking either of these two boxes. One thought I had was put all my folders with programs into one Main Folder with an If on the Folder that has variable that is switched in a few minutes by a program outside of this Main Folder. Not sure if this would help because of the query box checked above. Any thoughts would be appreciated. Note: I have 900 programs and folders, 171 insteon nodes/addresses and 4 node servers based on the ISY Inventory Node Server. Thanks in advance for anyone's thoughts
MrBill Posted August 14, 2021 Posted August 14, 2021 (edited) 2 hours ago, LarryCRetired said: I had to re-enter my credentials and restart my node servers. Does this mean you had to log into Polisy and restart the nodeservers, or did you have to log into Polisy AND set the credentials of the ISY in the section shown below: If you had to set the credentials there, that's why nothing connected. The question then is how did saved the credentials get reset or removed. 2 hours ago, LarryCRetired said: On my ISY config screen, I have Query at restart checked Wait while busy reading checked I have the same boxes checked. Startup for the ISY is rocky. There's always a raft of queue full errors in the error log. I've experimented with shutting Polisy down during reboot, but it really doesn't seem to make much difference. I do have a few programs (but not many) that I delay start. 2 hours ago, LarryCRetired said: So if anyone have some thoughts on how I can delay everything that is done at startup of the ISY, so the Polisy can connect first would be appreciated. I have a few programs that I delay the start of, the method that I use involves killing two birds with one stone. First I use this program: Startup/UptimeCounter - [ID 008D][Parent 0126][Run At Startup] If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Wait 9 minutes Resource 'ISYnotification.Reboot.Notification' Wait 10 seconds Resource 'NotificationNS.1704.ISYRebootNoticiation' Wait 1 minute $iUptime.Counter.old = $iUptime.Counter.curr $iUptime.Counter.old Init To $iUptime.Counter.old $iUptime.Counter.curr = 10 $iUptime.Counter.curr Init To $iUptime.Counter.curr Run Program 'Start HeartBeats and Misc' (Then Path) Wait 5 seconds Run Program 'Startup/UptimeCounter' (Else Path) Else Wait 10 minutes $iUptime.Counter.curr += 10 $iUptime.Counter.curr Init To $iUptime.Counter.curr Run Program 'Startup/UptimeCounter' (Else Path) Wait 9 minutes to make sure the modem and router had time to recover (if this 'run on startup' was restore from PowerFail this delay is needed for the modem and router to come up before send a notification) then wait 1 min so notification goes out before counters reset (yes they reset too quick without a wait) Updated 2020-02-15 now minutes in 10's (instead of hours) (slower update to reduce load) From this programs use, I know that the ISY does alot of thrashing about at startup. I don't actually get the reboot notification until about 20 minutes have elapsed, instead of the expected 9 minutes. The notification is sent twice... once directly from a NR to Pushover, and the second time it's sent 10 seconds later is via the Notification node server, that serves the purpose of telling me that both the ISY rebooted and that the ISY is talking to at least one node server. This is also about my only "run at startup" program, but you'll note that it runs a program called "Start heartbeats and Misc" which is quite a list... with wait 2 between each entry. You'll note that on startup the THEN body of this program runs... during that initial 10 minutes the status of the program is TRUE. The last statement of the THEN body runs the ELSE body of the same program, which itself is a never ending Loop, when the ELSE body run, the status of this program becomes FALSE. I use this fact to delay the start of some programs by using a folder condition. If Program 'Startup/UptimeCounter' is False Then Allow the programs in this folder to run. The programs contained in the folder don't run during the initial startup when the THEN body of the uptime counter is running. It should be noted that most programs don't cause an issue and don't need to be prevented from running. The ISY seems to not get to running programs very quickly in the startup process anyway, based on notifications that I've had programs send. One more thing... When I do reboot the ISY, I never try to start the admin console until I've gotten the notification. I usually tell Alexa to set a 20 minutes timer when I reboot and it usually goes off around the same time as the arrival of the notification. I hope that the startup process gets streamlined somewhat via ISY on Polisy. Edit to add: The Folders that I delay are specifically things that might try to send Insteon commands. Of course, if you've prevented something from catching up during startup, you've got to make sure it will catch up somehow. Edited August 14, 2021 by MrBill 1
LarryCRetired Posted August 14, 2021 Author Posted August 14, 2021 Bill Wanted to give you a break but I appreciate your help. I had to reset the credentials in the Polisy using the Polisy screen and then restart the node servers. Here is my startup program. aNotification On Startup - [ID 00A4][Parent 009D][Run At Startup] If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Wait 7 minutes $i_Power_Outage_Variable = 1 Wait 3 seconds Send Notification to 'Home Email' content 'Start_Up' Wait 3 seconds Resource 'Push_ISY_Restarted' Wait 3 seconds Run Program 'Shut Off Lights at Startup - Daytime' (If) Wait 3 seconds Run Program 'Shut Off Lights at Startup - Normally Off' (If) Wait 3 seconds Send Notification to 'Home Gmail' content 'Start_Up' Wait 3 seconds $i_Power_Outage_Variable = 0 Resource 'Push_Power_Outage_Variable' Else - No Actions - (To add one, press 'Action') I like to use a lot of waits where I probably don't need to. I have some insteon bulbs when they still made them, that with a power outage, turn on. So that is the reason for the light programs. My 7 minute wait seems right for me prior to the Polisy but I wonder if I bumped it up, my problem would go away. The lost credential issue is something that I had with the Pi with newer versions of Polyglot. UDI and I suspect it is me not using the default HTTPs port. I don't know if powering down the ISY is hard on it, but maybe I should try bumping up my 7 minutes to 20 minutes to see if that solves the problem. When we are away, if that every happens again with this virus, I would hate to not have the node servers. Notification and Tags are integral to what I am doing now as I suspect they are with you too. I will look at delaying some programs through a folder variable. Lots of stuff that don't need to run right away.
MrBill Posted August 14, 2021 Posted August 14, 2021 Just out of curiosity how long is it before you get the first email? As I mentioned above then end of my 9 minute wait is really about 20 minutes after ISY reboot. If I intentionally reboot ISY, I tend to reboot Polisy at the same time, however Polisy reboots in a fraction of the time. My polisy doesn't loose power during an outage (unless it's an extended outage), ISY does. I have a windows computer that I can power up remotely, I can then enable the VPN on my iPhone or iPad and use the app "RD Client" to connect to the windows computer using Remote Desktop. The windows computer has the admin console ready to go, and I can access Polisy that way too via a web browser on the computer. Due to the small screen of the phone it works better to use the iPad but i've done it all with the phone too. That in a nutshell is the plan should I need to manually intervene from somewhere remote. So far I've never had to use it but I have run tests.
LarryCRetired Posted August 14, 2021 Author Posted August 14, 2021 Bill Although I have noting concrete to tell you, my notification from a text was pretty close to 7 minutes when I was using text for notification. I really cannot use email as a gauge because they vary a lot. Tomorrow, I am going to change my time to 20 minutes and power down both devices, and see if that makes a difference. I will keep track of the times when I do that.
MrBill Posted August 14, 2021 Posted August 14, 2021 15 minutes ago, LarryCRetired said: Bill Although I have noting concrete to tell you, my notification from a text was pretty close to 7 minutes when I was using text for notification. I really cannot use email as a gauge because they vary a lot. Tomorrow, I am going to change my time to 20 minutes and power down both devices, and see if that makes a difference. I will keep track of the times when I do that. You might want to add two NR's first. One to send direct from the ISY, and one to send via the nodesever. Receiving both is a pretty good indication of when that point was reaches becasue as you know Pushover is pretty much instantaneous. From the ISY direct to pushover I use: (of course you don't have counter variables established so delete that part) token=[redacted]&user=[redacted]&message=ISY Rebooted ${sys.date} ${sys.time}\nUptime before reboot: ${var.1.42} \nSaved Value: ${var.1.43}\n\nSent direct from ISY. and then the ISY sends one thru the notification node server too: ISY Rebooted ${sys.date} ${sys.time} Uptime before reboot: ${var.1.42} Saved Value: ${var.1.43} Sent via NotificationNS Receiving both tells me the ISY is talking to Polisy.
Recommended Posts