Announcement

Collapse
No announcement yet.

Last Code Used not working

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

    Last Code Used not working

    Hello,
    I am running latest Home Seer(not Beta) and Latest Beta OnQ plugin.

    I am trying to use the 'Last Code Used' to fire some events. I have found that no matter what code is used it always states 'Code 1'

    The code that is currently used is slotted in to 'Code 10' (Code 1 is master code and I know no one is using that)

    Is this a known issue? Ideas?

    Thanks,
    Mark

    #2
    Mark,

    When the plug-in does anything with the panel (e.g. Arm/Disarm) it uses the panel code that you gave the plug-in, and that is the PC Access, Installer, or Master Code. Thus, if you gave it the master code, then that would explain why it always shows that as the last code used.

    If there is a legitimate problem with the device not updating, then the date/time of the last change would be incorrect - make sure this is showing as the last time you did something with the panel (e.g. arm/disarm).

    Also, if you happened to use the same passcode for code 10 as the master code, then that could explain it as well - this is not something that is recommended and it could cause other problems, especially if the two codes have different access levels.
    Regards,

    Rick Tinker (a.k.a. "Tink")

    Comment


      #3
      Well, I know the code that is currently being used to set the status of the unit to 'off' is in slot 'Code 10' The master code that HomeSeer is using is in 'Code 1'. I have an event set to e-mail me when 'Code 10' is used. I never receive that e-mail.

      All I ever see is 'Code 1' as last used (the data on this event is right as I have another event that re-arms the alarm after 20 minutes of the system going to the 'off' state so HomeSeer uses Code 1 to re-arm)

      I tested the e-mail event and I am able to receive the test e-mails so I know that is working.

      Should I turn up the log level to see what is going on?

      Mark

      Comment


        #4
        Not yet - please check the date/time on the last code used device as I mentioned earlier. If it is not updating, then there is a problem. If it is updating, then we have to look elsewhere.

        I also do not understand what you mean by the code being used to turn off the unit is Code 10. How are you turning off a unit where you are able to specify a user code? Unless you are referring to the security system disarm as 'turning off the unit'.

        As an example of how I verified this is working, I used the HAI web page from the plug-in to arm my system in Day mode. I then went to the HAI System location and noted that it said the last code used was Master, which is true since that is the code that the plug-in uses to do things. I then went to a console and entered the disarm code one of my family members uses to disarm the system. I refreshed the HAI System status display and the last code used displayed the name of the person whose code I used to disarm the system.
        Regards,

        Rick Tinker (a.k.a. "Tink")

        Comment


          #5
          I have someone using a user code to disarm the system. That code is stored in slot 10 on the OnQ device. I know that they are effectively using the code as they are able to disarm the system. I also have an event that re-arms the system 20 minutes after the OnQ is disarmed.

          I have seen the unit go to the disarmed state and the 'last code used' is not updated. It shows Code 1 and the last timestamp when HomeSeer re-armed the sytem.

          After the 20 minutes (the delay for homeseer to re-arm) The 'Last Code Used' shows 'Code 1' and the timestamp updates to with when HomeSeer re-arms the system. HomeSeer is using the master code so that makes sense.

          I just never seem to see 'Code 10' tho I know it is being used.

          Mark

          Comment


            #6
            How many user codes did you tell the plug-in to monitor/use?
            Regards,

            Rick Tinker (a.k.a. "Tink")

            Comment


              #7
              15, and I have about 4 in use from slot1-4 and then some in 10-11. Not all are currently assigned. There are some blank codes between 4 and 10.

              Comment


                #8
                Well, I don't know what to tell you. It seems the device is updating because you see the date/time change, but I have no idea why it would not work for the other codes.

                Is anybody else seeing this?
                Regards,

                Rick Tinker (a.k.a. "Tink")

                Comment


                  #9
                  FYI, I set the logging on so I could see events send/received. The OnQ log file shows the correct codes used (As well as the last-code-used, sometimes shows the right code), however, the event I have set to e-mail me when last-code-used is code 10 is never triggered.


                  I also just notice that the 'button pushed' is not updating either. I am seeing these in the log files as well so I know they are getting to the plugin.

                  Should I just re-install the plugin? Something has gotten horribly out of sync.

                  Mark

                  Comment


                    #10
                    Reinstalling the plug-in will do nothing for you.

                    It sounds to me like it may be working, but just now how you are expecting it to. Note that if the button pushed already says "Button 1" and you push button 1 again, the event will not fire because the value of the device did not change. I wonder if this is what is happening with the last code used as well?

                    Unfortunately, the plug-in can only single thread the device changes, so what happens is that when the panel's arming status changes, those events are triggered, and then the code used is examined, the device changed, and any events based upon that trigger. This is a bit of an inconvenience I realize because you want to know the code used at the same time as when the status changed.

                    There is a way to set an event up in HomeSeer to achieve what you want though....

                    First for the last code used:
                    1. Create a virtual device to use as a flag - e.g. LAST CODE FLAG
                    2. Create an event that is triggered by the security status device changing value - choose either a specific value (e.g. Disarmed) or the "Any Value" option to get it to trigger whenever there is any kind of a change. In the action for this event, have it turn ON the LAST CODE FLAG device, and then add the device again, but this time have it turn OFF the LAST CODE FLAG with a 2 second delay.
                    3. Create an event that you want to do something when a specific user code was used, and have it trigger off of the LAST CODE FLAG status being "Changed to Off". Check the checkbox for Apply Conditions to this trigger, and then go to the conditions page. Add a condition for the device HAI System Last Code Used, and then when the UI changes, make your selection from the list of which user code you want the event to run for. You can have multiple condition groups if you want this event to run for 2 or 3 users in your system but not all of them. If you only want the event to run when the system is disarmed, then add a 2nd condition to each condition group that says "Panel Arming Is Disarmed".

                    The 2 second delay after the change in the security system status is all that is needed to get the last code used updated.



                    For the button push....

                    This is a little more tricky because if you push the same button twice, the status and value of the device do not change, which is exactly how it was coded to behave. Without going into any details, here are a few ideas for how you can create a solution for this:
                    1. Have the code in your HAI system for that button push send an X-10 signal that HomeSeer watches for - e.g. if the panel turns the device ON, have HomeSeer turn it back OFF, and now you can trigger your event off of the device change instead of the button push. (The X-10 device does not have to physically exist for this to work.)
                    2. (Probably the best method)
                    A. Set up a button in your HAI system that does NOTHING, and in the plug-in call it "No Button".
                    B. Set up an event that triggers from the HAI System Button Pushed changing value to the button you want to trigger from. (Do not use the "Any Value" here because the action in the next step will cause a looping event.)
                    C. In addition to the other actions you want the event to perform, add a DEVICE action to set the HAI System Button Pushed device to the value "No Button". Now, when the button you want to trigger from is pushed, it will reset the device to No Button so that if you push the same button again, it will trigger again.
                    3. Derivative of option 2 without having to create the dummy button: Write a script that runs when your button is pushed that sets the HAI System Button Pushed device VALUE to value that is not used for any button or for the "any value" option - a value of 900 would work. If the value does not exist in the list set for the device, then A) your repeated button presses will be able to repeatedly trigger the device value change trigger, and B) the display will change to a blank for the button pushed device.


                    Hope these ideas help.
                    Regards,

                    Rick Tinker (a.k.a. "Tink")

                    Comment


                      #11
                      Ok, thanks. I will try this out and let you know how it goes...

                      Comment


                        #12
                        Ok, on the last-code-used issue.. I setup a process as you described. It worked once.... The second time someone disarmed the system with 'code 10', my event that triggers on security status change was activated, the flag was turned on and then off after 3 seconds. The 2nd event that triggers if the flag turns to off IF 'code 10' was the last code used did not work.

                        The 'last code used' status has not updated since the first time the unit was disarmed and auto-rearmed. Something is still wrong with the plugin as it does not always update this data it seems. (did not update the 2nd time 'code 10' was used nor the 2nd time HomeSeer re-armed the system with 'Code 1')

                        Rick, if you want to PM me I can arrange you to have VNC or web access to this machine if you would like to check it out...

                        I have not setup the button scenariou tho I will today.

                        Mark

                        Comment


                          #13
                          Mark,

                          Sounds like I will have to dig deeper to see if there is an issue, but I am hopeful that somebody else can confirm it to be a problem because I cannot duplicate it here.

                          It might be that you will have to go to the beta version to see if the issue is still there and then I can address it because I have been running the beta version and the problem is not there.

                          If somebody else can see it on the production version, then I will assume that is the case but I thought I addressed that in what is the current production version... Been working on this plug-in for so long it is hard to remember anymore.
                          Regards,

                          Rick Tinker (a.k.a. "Tink")

                          Comment


                            #14
                            Originally posted by Rick Tinker
                            I then went to a console and entered the disarm code one of my family members uses to disarm the system. I refreshed the HAI System status display and the last code used displayed the name of the person whose code I used to disarm the system.
                            Rick,

                            How did you get the name of the person to show up in the log? I only get the code number. I have 5 users assigned and all 5 are named in the HAI panel setup, but those names are not passed on to the HS pluggin.

                            Any thoughts would be greatly appreciated.

                            TNichols

                            Comment


                              #15
                              It uses the names as assigned in the plug-in names area. Set up the names there, and it will then display the name you entered.

                              If you download names from the panel, you will get the name you used in the panel setup, but it downloads all names at once, so you will overwrite your zone/unit/button, etc. names as well with the ones in the panel.

                              Using the names setup in the plug-in config will be a lot easier for you to enter user code names.
                              Regards,

                              Rick Tinker (a.k.a. "Tink")

                              Comment

                              Working...
                              X