Announcement

Collapse
No announcement yet.

ISY Insteon 3.0.0.54 - Beta 54 for HS3

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Run an ISY Program

    Is there a way to toggle an ISY status, such as Automated Lighting = True/False, or Holiday Lighting = Enabled/Disabled? I am trying to toggle ISY variables from HomeSeer Touch (Tap an icon to toggle it's status, such as Home vs. Away).

    The problem I'm encountering is
    1) You can't set a variable's value
    2) You can't Toggle a Program's status (If True, run False & If False, run True)
    3) You can't run a (disabled) Program's "IF" statement to do something like:

    IF $Home = 0
    THEN $Home = 1
    ELSE $Home = 0

    Is there a way to toggle a status, other than using an actual Insteon device such as a KeypadLinc button to toggle it between On/Off. I'm sure there must be a simple way that I'm just not seeing. Thank you!
    Attached Files

    Comment


      I suddenly started getting this in the log every minute. What does it mean. Also not sure if it's related but I starting have issues a few weeks ago but only started getting this in the log tonight. Here is the link to another thread were i talk about my other issue.


      ISYInsteon CONFIG_CHANGE: Events Saved type = 1 ddd = 0 dac = 0



      http://board.homeseer.com/showthread...51#post1186851

      Comment


        I just had my main system's hard drive crash so I've been dealing with that and hence a bit slow in responding. I didn't lose any important data and nothing related to the plug-ins or plug-in development. It's just a time consuming to get everything restored property.

        Originally posted by CJVann View Post
        Is there a way to toggle an ISY status, such as Automated Lighting = True/False, or Holiday Lighting = Enabled/Disabled? I am trying to toggle ISY variables from HomeSeer Touch (Tap an icon to toggle it's status, such as Home vs. Away).

        The problem I'm encountering is
        1) You can't set a variable's value
        I'll have to look into this one. I thought I had created the HS device property to allow this.

        2) You can't Toggle a Program's status (If True, run False & If False, run True)
        True. I didn't add any type of toggle control to programs. You'd have to create the logic in HS with a script to do this. I can add this to the feature/TODO list.

        3) You can't run a (disabled) Program's "IF" statement to do something like:

        IF $Home = 0
        THEN $Home = 1
        ELSE $Home = 0
        Is this something that the ISY even allows? I don't think I anything in the plug-in that checks the enable/disable state of programs before sending commands to run the else/then sections. Is there some reason it has to be disabled?

        Is there a way to toggle a status, other than using an actual Insteon device such as a KeypadLinc button to toggle it between On/Off. I'm sure there must be a simple way that I'm just not seeing. Thank you!
        You may be able to create a virtual X10 device in the ISY and toggle that.
        --
        Bob Paauwe
        ISYInsteon Plug-in
        http://www.bobsplace.com/ISYInsteon/

        Comment


          Originally posted by freeon View Post
          I suddenly started getting this in the log every minute. What does it mean. Also not sure if it's related but I starting have issues a few weeks ago but only started getting this in the log tonight. Here is the link to another thread were i talk about my other issue.


          ISYInsteon CONFIG_CHANGE: Events Saved type = 1 ddd = 0 dac = 0
          This is a debug message that should only be shown when the log level is debug, but I accidentally left it enabled while testing. However, there are two things that are bit strange. First, this should only output when some HS event is changed and second, the dac value should be 1, 2, or 3. I don't know what a value of 0 means.

          This message is output when HS sends a configuration changed notice to the plugin. Specifically, it is suppose to get this when something changes with events (add, removed, change).

          What this is doing, is causing the plug-in to reload and process all the plug-in related triggers every time this event happens. So it is making more work for the plug-in and may be contributing to the slowness.

          It may well be related. If HStouch server is reporting getting events from HS that it's not expecting, it could be the same event the plug-in is getting.
          --
          Bob Paauwe
          ISYInsteon Plug-in
          http://www.bobsplace.com/ISYInsteon/

          Comment


            Thanks for the responses! I wasn't requested all these options be added (HONEST!!), I was just mentioning the things I had tried, to toggle some kind of an ISY Flag. My preference would be the ability to run a program (IF) like you can in the ISY. (I don't need to check the enabled/disabled status of a program.)

            Here's an ISY example of a program running another (disabled) program, like I'd like to do from HomeSeer. The 2nd program will toggle my Outdoor Christmas lights between On & Off - if - I press my front porch light switch's "OFF", and the porch light was already "OFF". I do this with with numerous light switches to control alternate devices.

            If porch light is off, and you turn it off...
            Porch Lt off/off

            If
            Status 'Outside / Front / Porch Light' is Off
            And Control 'Outside / Front / Porch Light' is switched Off

            Then
            Run Program 'Toggle Out Hol' (If)

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


            This program is disabled so it only runs when manually called. Otherwise, it would continuously run, rather than just toggle state once, when called manually.
            Toggle Out Hol - [Not Enabled]

            If
            Status 'Scenes / Holiday Lighting / 15A Outdoor ApplianceLinc' is Off

            Then
            Set Scene 'Scenes / Holiday Lighting / Outdoor Holiday Lights' 100%

            Else
            Set Scene 'Scenes / Holiday Lighting / Outdoor Holiday Lights' Off


            So this would allow me to do things like toggle an ISY flag that allows Automated Lighting to be enabled/disabled (from TTS, HS3's web browser, or HSTouch touch screen icons). Run IF of this (disabled) program:

            IF
            $Automated_Lighting_Flag=0 (false)

            THEN
            $Automated_Lighting_Flag=1 (true)

            ELSE
            $Automated_Lighting_Flag=0 (false)

            -> Good luck with the hard drive recovery!

            Comment


              Originally posted by CJVann View Post
              Thanks for the responses! I wasn't requested all these options be added (HONEST!!), I was just mentioning the things I had tried, to toggle some kind of an ISY Flag. My preference would be the ability to run a program (IF) like you can in the ISY. (I don't need to check the enabled/disabled status of a program.)
              Ahh, thanks for the clarification. I haven't looked at program commands in a very long time and if my memory is correct, "RunIf" and "RunThen" both would only execute the statements in the then clause. It looks like now they may be different and "Run" or "RunIf" will trigger evaluation of the if condition and run the appropriate statements based on the condition state. Adding a new control for "Run" to the programs shouldn't be difficult.
              --
              Bob Paauwe
              ISYInsteon Plug-in
              http://www.bobsplace.com/ISYInsteon/

              Comment


                Version 3.0.0.20 of the plug-in posted. See the first post for details on the changes.
                --
                Bob Paauwe
                ISYInsteon Plug-in
                http://www.bobsplace.com/ISYInsteon/

                Comment


                  Originally posted by bpwwer View Post
                  Version 3.0.0.20 of the plug-in posted. See the first post for details on the changes.
                  You're awesome - can't wait to play. Thank you!

                  Comment


                    Will this plugin ever be available for download from HomeSeer?

                    I think this is still Alpha for HS3 - when if ever will this be GA and then will I be able to download it from HomeSeer?

                    Comment


                      Originally posted by michiliman View Post
                      I think this is still Alpha for HS3 - when if ever will this be GA and then will I be able to download it from HomeSeer?
                      Yes, it's alpha in the sense that there are still features that I want to add. But the existing feature set is probably more like beta quality.

                      Unfortunately, I don't currently have the time available to work on this as much as I used to. I'm not willing to place it in the HS store until I'm sure I'll be able to properly support it there. So for now, you have to download it from the forum and update as the versions expire.
                      --
                      Bob Paauwe
                      ISYInsteon Plug-in
                      http://www.bobsplace.com/ISYInsteon/

                      Comment


                        When I start HS3, should it receive the current status of programs (True or False), as found in the ISY? I created several programs earlier today (based on the status of Elk security sensors - True if Normal / False if Violated). The status of the programs in HS3 doesn't match what the status is in the ISY, even after repeated restarts of HS3. HS3 does, however, update it's status if HS3 is running and a program changes True/False status. (For example, I opened & closed the Front Door, and now it is no longer showing "False/Violated")
                        Attached Files

                        Comment


                          Most of my HS3 program statuses agrees with the ISY, but I just noticed another one. The "Automate" flag shows false in HS (manual override for parties and such, where you don't want lights going on & off by themselves). It has been wrong for a while on the touch screen, and I had wondered what was wrong. HS says Automate=False, the ISY says Automate=True.

                          The Automate program is simply based on a variable (0 or 1). I just changed it to 0, and back to one. Now HS is in sync with the ISY again.

                          EDIT: Okay, I'm confused -ha. I ran a test. I shut down HS3 with the back door open, and then closed the back door. When I restarted HS3, it corrected its status to the current ISY value of True/Normal/Closed. I was able to force the other values (Fire Alarm, Carbon Monoxide, etc.) by telling the ISY to Run If for each of them, and then it sent the value to HS. Maybe this is all simply because they are new devices and haven't established a state yet. Seems like things are working okay once they toggle state. However, I'm still confused about the "Automate" status... that's been in place for years. Maybe HS just got corrupt on its status somehow.
                          Attached Files
                          Last edited by CJVann; August 21, 2015, 12:59 PM.

                          Comment


                            Originally posted by CJVann View Post
                            When I start HS3, should it receive the current status of programs (True or False), as found in the ISY? I created several programs earlier today (based on the status of Elk security sensors - True if Normal / False if Violated). The status of the programs in HS3 doesn't match what the status is in the ISY, even after repeated restarts of HS3. HS3 does, however, update it's status if HS3 is running and a program changes True/False status. (For example, I opened & closed the Front Door, and now it is no longer showing "False/Violated")
                            Yes, the plug-in is supposed to query the ISY for the current status and should be updating HS with it.

                            I did some tests here and every time I change a program status while HS is off, it does get the correct status on restart.


                            Originally posted by CJVann View Post
                            Most of my HS3 program statuses agrees with the ISY, but I just noticed another one. The "Automate" flag shows false in HS (manual override for parties and such, where you don't want lights going on & off by themselves). It has been wrong for a while on the touch screen, and I had wondered what was wrong. HS says Automate=False, the ISY says Automate=True.

                            The Automate program is simply based on a variable (0 or 1). I just changed it to 0, and back to one. Now HS is in sync with the ISY again.
                            That is a bit strange. The plug-in does initialize all programs to false since the initial query to get the list of programs from the ISY doesn't include any status information. The plug-in then does a different query to get the status information. Just from the symptoms, it seems like the ISY isn't sending status or the plug-in isn't updating the HS device, but why just this one?

                            For cases like this, an additional way to test would be to bring up the ISY web client and see what it says the status is.

                            One additional bit of data is that the queries for both program information and status can take some time. Depending on the number of programs defined, it could be minutes between when HS displays the device status web page and when the plug-in finishes the query and update HS. During that time, the HS status could be wrong. And recently added programs would likely be at the ends of query.

                            EDIT: Okay, I'm confused -ha. I ran a test. I shut down HS3 with the back door open, and then closed the back door. When I restarted HS3, it corrected its status to the current ISY value of True/Normal/Closed. I was able to force the other values (Fire Alarm, Carbon Monoxide, etc.) by telling the ISY to Run If for each of them, and then it sent the value to HS. Maybe this is all simply because they are new devices and haven't established a state yet. Seems like things are working okay once they toggle state. However, I'm still confused about the "Automate" status... that's been in place for years. Maybe HS just got corrupt on its status somehow.
                            If they're all working now, it will be more difficult to track down any issue. I'll try creating a new program and see if that causes any strangeness here. But if it's repeatedly starting with an incorrect value, switching the log to debug will log all the program queries and may show something useful.
                            --
                            Bob Paauwe
                            ISYInsteon Plug-in
                            http://www.bobsplace.com/ISYInsteon/

                            Comment


                              I've had some confusing conflicts. I captured below what you were looking for - Note program name "1 Start Door Timer" is False in HS3, and True in the ISY-web & ISY-Admin.

                              Later I noticed an hourly counter (Tmr_Water) wasn't updating in HS3, but was in the ISY... so I started thinking the ISY wasn't able to send updates to the plug-in if I was logged into the Admin Console. See below, Tmr_Water increases once per hour, but HS3 became 43 at 12:44 PM and ISY became 44 at 1:44 PM. HS3 missed the 1:44 PM update. I logged out of the Admin Console, and the following hour, HS3 "caught up" with ISY and they were again in sync.

                              I opened the Admin Console to test my theory and ran the program to reset the Tmr_Water counter to 0, and HS3 updated its value to 0 successfully, even with the Admin Console open... so that's not an issue.

                              I had also noticed that while logged into the Admin Console, some programs that were showing as "Running True" in the ISY, but were simply showing "True" in HS3. Other programs DO show "Running True" in HS3, so it works most of the time. I saw that the ones that said, "Running True" had changed to that status BEFORE I logged into the Admin Console, so I again was thinking programs couldn't update their status if I was logged into the Admin Console. I opened the console and tested several programs (Just True or False status) and it worked perfectly & instantly updated HS3.

                              I hope I've provided a few details that might help you see a pattern here that I'm missing.
                              Attached Files
                              Last edited by CJVann; August 22, 2015, 02:42 PM. Reason: Added "EDIT" comment

                              Comment


                                I appropriate all the details. Better too much detail than too little. But unfortunately, I'm not seeing a pattern either.

                                At this point, we know the ISY is updating the program state and we know that sometimes the HS device doesn't get updated. We don't really know where the breakdown occurs. It would be really helpful to see a debug log for one of the missing updates. I know that's not easy since it's not manually reproducible but you may be able catch it if you do the following:

                                On the HS plug-in management page there's an option you can check called "Developer Mode". With that checked, the plug-ins will open DOS command windows and output data to those windows (when you restart HS).

                                You can configure the ISY plug-in to output it's log information to a "Debug Console" as one of the options on the "Tracing/Debugging" tab. This will put the ISY plug-in log to that DOS console window. Set the plug-in to debug level logging and change the properties of the DOS console window to have a large scrollback buffer (I default mine to 5000 lines, you may need larger for this). Then let it run. When you see another case where the program status is out of sync, copy the log from the console window and send it along with the details on which program and when the ISY updated the status and I'll track down that timeframe in the log and see what the plug-in was doing at that point.
                                --
                                Bob Paauwe
                                ISYInsteon Plug-in
                                http://www.bobsplace.com/ISYInsteon/

                                Comment

                                Working...
                                X