Announcement

Collapse
No announcement yet.

GetTrigger error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    GetTrigger error

    I am getting an error as follows:

    GetTriggers : Problem deserializing trigger info: An item with the same key has already been added

    I can't find any reference to his online. Any advice how to fix it?

    Regards.

    #2
    Originally posted by jwshome2 View Post
    I am getting an error as follows:

    GetTriggers : Problem deserializing trigger info: An item with the same key has already been added

    I can't find any reference to his online. Any advice how to fix it?

    Regards.
    The error is happening when the plug-in is building it's internal lists of triggers that it will need to generate events for. Each trigger is supposed to have a unique ID and that's used as the key in the lists. For some reason, there seems to be a duplicate ID.

    If you turn on debugging it will output some messages before this one that might provide some info about what trigger (and what list) is having this problem.
    --
    Bob Paauwe
    ISYInsteon Plug-in
    http://www.bobsplace.com/ISYInsteon/

    Comment


      #3
      Thanks for the quick reply, I will turn on debugging and report back.

      Out of curiosity, there are two places in the plugin where debugging-level logging can be enabled - on the first tab of the plugin setup, and on the last tab. I always check both, but do they do different things?

      Comment


        #4
        OK, here is the portion of the log indicating an error:

        HTML Code:
        Oct-06 7:28:00 AM	 	ISYInsteon	GetTriggers : Problem deserializing trigger info: An item with the same key has already been added.
        Oct-06 7:28:00 AM	 	ISYInsteon	GetTriggers : Adding new trigger ISY_DEVICE - 6173 to triggerlist
        Oct-06 7:28:00 AM	 	ISYInsteon	GetTriggers : Adding to Basement stairs The Devices/Basement/Basement stairs Sends Fast Off
        Oct-06 7:28:00 AM	 	ISYInsteon	GetTriggers : Looking up node for 40 B5 43 1 (40 B5 43 1)
        Oct-06 7:28:00 AM	 	ISYInsteon	GetTriggers : Adding new trigger ISY_DEVICE - 6173 to triggerlist
        Oct-06 7:28:00 AM	 	ISYInsteon	HSEvent : CONFIG_CHANGE: Events Saved type = 1 ddd = 0 dac = 0
        I used to have an ISY Program that was triggered by the Basement Stairs device sending a fast off, but the ISY didn't seem to respond properly to that, so I deleted the program in the ISY and instead created an event in HS3 that did the same thing. I can't tell from the log if the problem above is being caused by the ISY still thinking the ISY Program is active somehow (I deleted it a while ago) or if the problem is being caused by the Homeseer event.

        For the moment, I will delete the Homeseer event to see what happens, but would appreciate your advice when you log back on to review these messages.

        (If it is helpful, when I deleted the ISY program HS3 did not seem to pick up on that - there was some type of device created in HS3 to represent the program, and it did not get deleted. There were also a number of ISY variables that were used by the program that I deleted, and those variables were represented in HS# and did not delete themselves, so I deleted them manually. It seems like in general my ISY and HS3 have gotten slightly out of sync, and I don't see a command like there used to be to resync them. So yesterday I disabled the ISY plugin from HS3, rebooted HS2 and re-enabled the plugin, but the Trigger problem still remains. Hope this added info is helpful).

        Regards.

        Comment


          #5
          It appears that deleting the event from Homeseer has stopped the errors in the log. Will I be able to recreate the HS event without creating a problem? Is there a way to "clear out" old data from the ISY so that the problem will not recur?

          Comment


            #6
            From the log, it looks like there are two triggers defined with the same trigger ID. The trigger ID comes from HomeSeer. In that section of the plug-in, the plug-in has requested a list of trigger events from HomeSeer and then loops through those events and builds a couple of internal lists.

            So the log shows that for trigger event ID 6173, it adds it to the global list and then adds it to the list for the basement stairs device. All is good. Then the next trigger event also has ID 6173 and when it tries to add that to the global list, it generates the error.

            My understanding was that the ID was unique, but maybe that's wrong. Did deleting the event in HomeSeer actually delete all instances. If you check with debug enabled after deleting it, do you still see debug messages indicating that it's adding that event? I.E. only one instance now instead of two?

            There is a bug when copying event. The plug-in doesn't seem to be able to properly distinguish between the original and the copy. Could that be what happened here?

            If recreating the event causes the error again let me know. I'd like to create a version of the plug-in that dumps a lot more of the trigger information to try and figure out what's going on.

            It seems like in general my ISY and HS3 have gotten slightly out of sync, and I don't see a command like there used to be to resync them.
            The plug-in will query the ISY every time it starts and mostly re-sync at that point. It doesn't automatically delete devices because I've been a bit paranoid about that, so if devices are removed from the ISY and the plug-in doesn't see that, you'll have to manually removed them from HS. The HS2 and HS3 versions of the plug-in don't share any information. You could actually run both versions simultaneously.

            there are two places in the plugin where debugging-level logging can be enabled - on the first tab of the plugin setup, and on the last tab. I always check both, but do they do different things?
            They should do the same thing. The first tab is mostly a duplicate of the setup page from the HS2 plug-in. When I added the last tab with the more advanced logging/tracing configuration, it seemed to make sense to have all the logging settings visible there but I didn't go back and remove them from the first tab. I guess I should so that it's not so confusing.
            Last edited by bpwwer; October 7, 2016, 03:16 PM.
            --
            Bob Paauwe
            ISYInsteon Plug-in
            http://www.bobsplace.com/ISYInsteon/

            Comment


              #7
              I just posted version 3.0.0.28 which may resolve this. If not, I have added better error messages and more debugging messages that should help track this down if it happens again.
              --
              Bob Paauwe
              ISYInsteon Plug-in
              http://www.bobsplace.com/ISYInsteon/

              Comment


                #8
                Thanks, and sorry for the delay in following up. I'll install the most recent version and see if the error disappears.

                Regards.

                Comment

                Working...
                X