April 10Apr 10 I have this program that I am trying to use to set an integer variable to the current day of the month. When I run the THEN clause the INIT value is correct but the variable iCurrentDayOfMonth is set to zero. This doesn't make sense. I expect them both to be the same. I have a couple of other similar programs using different variables and they work fine. What is going on? TIADATTM SetCurDayOfMonth - [ID 0047][Parent 0028]If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then $iCurrentDayOfMonth = [Current Day of Month] $iCurrentDayOfMonth Init To $iCurrentDayOfMonth Else - No Actions - (To add one, press 'Action') Whereas these programs work fine. Both the variables and its INIT values are correct all the time:DATTM SetCurHH - [ID 006D][Parent 0028]If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Repeat 23 times $iCurrentHH = [Current Hour] $iCurrentHH Init To $iCurrentHH Run Program 'DATTM SetCurMM' (Then Path) Wait 1 hour Else - No Actions - (To add one, press 'Action') DATTM SetCurMM - [ID 006E][Parent 0028]If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Repeat 59 times $iCurrentMM = [Current Minute] $iCurrentMM Init To $iCurrentMM Wait 1 minute Else - No Actions - (To add one, press 'Action') EISY running version 6.0.0.
April 10Apr 10 Author OK, how do I paste code into a forum post and keep the indenting? For some reason it appears to be all shoved to the left and indenting is lost. If I post the same clipboard into Notepad the code appears indented.Thanks for any tip you can provide.
April 10Apr 10 Go to the program in iox. Right click on the program's name on the left. At the bottom of the drop down is Copy, Use that
Saturday at 01:49 AM5 days Right click on the program name and select copy to clipboard.Are you aware there is a plugin for using dates in programs?
Saturday at 03:08 PM5 days On 4/10/2026 at 10:38 AM, IndyUDIuser said:I have this program that I am trying to use to set an integer variable to the current day of the month. When I run the THEN clause the INIT value is correct but the variable iCurrentDayOfMonth is set to zero. This doesn't make sense. I expect them both to be the same. I have a couple of other similar programs using different variables and they work fine. What is going on? TIADATTM SetCurDayOfMonth - [ID 0047][Parent 0028]If- No Conditions - (To add one, press 'Schedule' or 'Condition')Then$iCurrentDayOfMonth = [Current Day of Month]$iCurrentDayOfMonth Init To $iCurrentDayOfMonthElse- No Actions - (To add one, press 'Action')I just tried this on my ISY994 and it works as expected (I have not used the "Init to" previously).Since you have other programs working properly, I'm going to guess that your program didn't save properly for some reason. When this has happened in the past I've found it easiest to simply delete the program and start over. Do NOT copy the program. The visual representation will look correct, but the XML may be incorrect.
Saturday at 06:15 PM4 days On 4/10/2026 at 10:54 AM, IndyUDIuser said:OK, how do I paste code into a forum post and keep the indenting?What are you trying to paste that keeps the indents? You posted a program. That's just fine and readable by many/most here.But for the specific to keep the indenting you would want to click the "+" icon in the format portion of the post block.Click the down arrow next to that and you'll have an option for "editor_tool--codebox". (I really don't like how the forum developer has so messed up some of the options. It's beyond our control as they're a separate company, but it's not quite as intuitive as it once was - IMO)That should get what you might be looking for, but don't sweat it...what you posted originally works perfectly. On 4/10/2026 at 10:38 AM, IndyUDIuser said:EISY running version 6.0.0FYI the current version is 6.0.5. While I'm not sure if you're having problems or not it's advisable to update to fix any little bugs that might be lingering in the older system firmware. You can find info about this version in the "Current Release" portion of the forums. It also indicates best method to update.
Sunday at 07:04 PM3 days Author I deleted the program, restarted the Admin Console, and then hand-typed the entire program again from scratch.This time it worked, both the variable and it's INIT value appear correct.Thank you IndyMike.On 4/11/2026 at 11:08 AM, IndyMike said:I just tried this on my ISY994 and it works as expected (I have not used the "Init to" previously).Since you have other programs working properly, I'm going to guess that your program didn't save properly for some reason. When this has happened in the past I've found it easiest to simply delete the program and start over. Do NOT copy the program. The visual representation will look correct, but the XML may be incorrect.
Sunday at 07:58 PM3 days Author On 4/10/2026 at 9:49 PM, DennisC said:Right click on the program name and select copy to clipboard.Are you aware there is a plugin for using dates in programs?I'm not aware of what plugin you are referring to. Can you explain further?Thanks.
Sunday at 08:18 PM3 days 13 minutes ago, IndyUDIuser said:I'm not aware of what plugin you are referring to. Can you explain further?Thanks.Part of the UD universe included being able to connect different devices to their automation controllers using Plugins, formerly called Nodeservers. One of those Plugins is called TimeData. Here is a link to more information:GitHubDocs/TimedataPG3 at main · ve7gel/DocsREADME.md files for PG3 nodeservers. Contribute to ve7gel/Docs development by creating an account on GitHub.Here is a link to the Plugin store:https://polyglot.universal-devices.com/Here is a link to the wiki instructions for getting started:https://wiki.universal-devices.com/index.php?title=Eisy:User_Guide#eisy_(PG3)_DashboardLet me know if you need something more.
Monday at 09:08 PM2 days Author Thanks for the information. I have not looked at Plug-ins in a long time because I don't use them and haven't taken the time to learn about them. I'm just an Admin Console user, controlling Insteon devices in my home.I poked around in the PG3 interface and see two listed as "Purchased". I don't remember purchasing them or what they are for. Perhaps from years ago. Both are described as "Notification Node Server for Pushover and Telegram" with one labeled Beta and one Production. I'm guessing they have to do with sending notifications to my phone, so I'll leave them as-is.I'm a retired batch developer (C and Unix) so all this Polyglot/GitHub programming stuff is foreign to me. Will take time to learn. Wish there was a good old-fashioned hard-copy book on all this to follow. I waste too much time wandering around lost in the forum and wiki. LOL ;-)
Tuesday at 02:23 AM2 days That's why I posted the link to the wiki instructions. That is the closest thing we have available to a "book". Once you take the plunge, it's not that hard. Most have a free trail period you can take advantage of before purchasing.
Tuesday at 09:46 PM1 day Author Well, the problem came back again after the program executed at midnight on schedule. The variable shows 0 while the INIT shows 14.I experimented with adding a couple of initializer statements (so I can watch the variables get flipped while the program is running) as well as WAIT statements between each line, thinking the executor is not running them in the sequence they are coded (or running too fast?) Then I removed the WAIT statements one by one, testing over and over to make sure the code still worked. The following code finally does what I expect when the THEN clause is executed. For now at least.DATTM SetCurDayOfMonth - [ID 0078][Parent 0028]If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then $iCurrentDayOfMonth = 0 $iCurrentDayOfMonth Init To 0 Wait 3 seconds $iCurrentDayOfMonth = [Current Day of Month] $iCurrentDayOfMonth Init To $iCurrentDayOfMonth Else - No Actions - (To add one, press 'Action') Note that if I set the wait statement to 1 second, the program doesn't work for some reason. I don't see the variable or its INIT being changed. Change it back to 3 seconds and then I can see the values changing. Weird.
Tuesday at 10:18 PM1 day Author On 4/11/2026 at 11:08 AM, IndyMike said:I just tried this on my ISY994 and it works as expected (I have not used the "Init to" previously).Since you have other programs working properly, I'm going to guess that your program didn't save properly for some reason. When this has happened in the past I've found it easiest to simply delete the program and start over. Do NOT copy the program. The visual representation will look correct, but the XML may be incorrect.I only learned about "INIT TO" in the last year. Setting the INIT value allows the ISY to reset variables to the desired values if the ISY reboots for some reason (i.e. power blip).
23 hours ago23 hr Author Ugh. Programs still aren't working as expected. I added more WAITs between every line of code in every program so I can try and see what it is doing to the variables, but that made it worse.I can see what appears to confirm my original post, in that the variable iCurrentDayOfMonth gets set correctly, then the INIT gets set, and the variable is ZEROED OUT. So I added another line to set the variable again (after copying it to the INIT) and that seems to work. To me this looks like a bug in the OS.But now all the WAITs I've been adding are causing other things to malfunction. Programs are running out of order. More variables are being set incorrectly.I'm thinking I may have to throw out all the individual programs I wrote and write just one large program that does all of the calculations in sequence as I expect.More debugging.....DATTM SetCurDayOfMonth - [ID 0078][Parent 0028]If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then $iCurrentDayOfMonth = 0 Wait 2 seconds $iCurrentDayOfMonth Init To 0 Wait 2 seconds $iCurrentDayOfMonth = [Current Day of Month] Wait 2 seconds $iCurrentDayOfMonth Init To $iCurrentDayOfMonth Wait 2 seconds $iCurrentDayOfMonth = [Current Day of Month] Else - No Actions - (To add one, press 'Action')
21 hours ago21 hr Author OK, I confess... I found a line in one of my sub-programs (one I have not been paying attention to until now) that was setting iCurrentDayOfMonth to zero. I had accidentally used the wrong variable name in that program and didn't notice it until now. I corrected that and now all of the variables seem to be setting correctly. I added code to the beginning of the master program to initialize all variables to zeros before calling all the sub-programs (just so I can see this happening). I eliminated some of the waits, although I still wait 1 second between each sub-program call. So far so good.I'll check this tomorrow to see if it is working in production as expected. FIngers crossed.
16 hours ago16 hr 4 hours ago, IndyUDIuser said:OK, I confess...I found a line in one of my sub-programs (one I have not been paying attention to until now) that was setting iCurrentDayOfMonth to zero. I had accidentally used the wrong variable name in that program and didn't notice it until now. I corrected that and now all of the variables seem to be setting correctly. I added code to the beginning of the master program to initialize all variables to zeros before calling all the sub-programs (just so I can see this happening). I eliminated some of the waits, although I still wait 1 second between each sub-program call. So far so good.I'll check this tomorrow to see if it is working in production as expected. FIngers crossed.I hate when that happens!!When trouble shooting I often will use the Find/Replace function and search for the variable or device just to check to see if my failing memory forgot about some obscure program that may be using / adjusting it. With over 1000 programs, this happens.. lol
2 hours ago2 hr I'm glad I'm not the only one. It's really bad when things suddenly break for some unknown/unfathomable reason.It's worse when I realize that I AM THE Reason. Like @dbwarner5, I use the find/replace feature often. I also disable programs and folders to prevent things from running unintentionally. Stuff still happens. More and more I am finding that my Home Assistant "test" programs are being re-enabled (me again) and running when they shouldn't.I have to say that UD did things right with their program/folders/variable organization setup. I wish HA would adopt something similar.
Create an account or sign in to comment