Announcement

Collapse
No announcement yet.

Ugly problem

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

    Ugly problem

    Michael,
    I have MCS temp and am using a Temp08 for my 1-wire network. I was having a problem with David Kindrids WAF 8B8SS plugin reporting errors in the SetIO routine and locking up my TTS.

    5/8/2006 5:29:49 PM~!~AB8SS Plug-in Diagnostic~!~Error 5 (Invalid procedure call or argument) in procedure SetIO of User Control hspi

    The errors occur at the same interval I set the Temp08 to, so I changed the Temp08 and the error rate followed. I disconnected the Temp08 and the problem disappeared.

    So now I need to understand how the SetIO procedure in the WAF 8B8SS plugin is getting called. I worked with David and he feels that his SetIO routine is getting hijacked.

    Can you shed some light on this?

    Thanks, Gardner

    #2
    It is different between HS1 and HS2.

    For HS2 the plugin that matches the .interface property of the device is called when a device is commanded to be changed.

    For HS1 all plugins get called for all plugin device changes and it is up to the plugin to validate that the call belongs to them. In mcsTemperature the device .interface property and the house code must both match otherwise mcsTemperature ignores the setio call.

    Look at the .interface property of the 8B8SS devices and see if it is set to the plugin name of the 8B8SS. I have posted several place a utility called InterfaceManager or ManageInterface to make looking at critical device properties easy. It also lets you edit them.

    Comment


      #3
      Michael
      I have been unable to locate the utility on the message board. I have found several refrences but not the file.

      Thanks, Gardner.

      Comment


        #4
        Here is one version of it that was in my archive.
        Attached Files

        Comment


          #5
          Thank you Michael. It worked fine, only can't find anything set wrong. I really don't want to do it, but I may need to clear out MCS temp and the Tempo8 and start over.

          Gardner.

          Comment


            #6
            Best to find the root cause of the problem so it will not pop up again. What I understand is that the AB8SS is reporting an error at the same rate as the Temp08 is delivering data. This should be pretty easy to run down. I also notice you are also on HS1 which means plugins have full access to other plugins's devices.

            The Setio call will occur to each and every plugin when a plugin device changes its value. mcsTemperature will write to the Value property of the devices that it has mapped into the Temp08. Did David provide a debug output from the Setio call that will show what device code is generating the invalid argument error? Since all plugins get the same call then any plugin that reports from the Setio will be able to provide this info. I think you identified mcsMusic as one that provided this output. When it occured could you correlate the device code to the AB8SS error?

            What are the house code for the AB8SS and two for mcsTemperature that you are using? What conditions does David use to accept a Setio call. As I indicated before mcsTemperature requires both the interface property and the house code to be belong to mcsTemperature before it will do anything in the Setio procedure.

            Comment


              #7
              I will get back to David. His debugs never tripped, but I don't know at what place in the code they were set for. Perhaps he can set them to capture the device.

              Gardner

              Comment


                #8
                Hi, guys.

                Thought I'd pop in.

                Michael, I'm not sure what's going on, either. From an earlier error message I saw from Gardner, it looked as if we might be dealing with a type mismatch. I try to write to the HS.Log what parameters are being sent into the SetIO command as the first thing it does after the On Error statement, but we never get that far. There's something about the call to the SetIO function, itself, that is causing trouble.

                --David

                Comment


                  #9
                  I ran a log of trace functions in Homeseer. There is no useful data ablut what causes the error, but there is an indication that when it is handled there is a lock placed on a code section which (if I am interpreting this right) is never released. The next time the error occurs the count in the lock message increments.
                  This is most likley why TTS stops working. So there are two issues. The first is the original cause, and the second is a bug in the error handling code in the WAF AB8SS (at least I think that is where it is). Does this make sense to you?
                  I will also copy David in an e-mail.

                  5/10/2006 7:09:23 PM:68963.9: Enter Plugin SetIO->
                  5/10/2006 7:09:23 PM:68963.98: WriteMon: AB8SS Plug-in Diagnostic->Error 5 (Invalid procedure call or argument) in procedure SetIO of User Control hspi
                  5/10/2006 7:09:24 PM:68964.07: Enter SetLogEvent
                  5/10/2006 7:09:24 PM:68964.09: SetLogEvent->Calling plugin: CommAndTimer
                  5/10/2006 7:09:24 PM:68964.13: Exit SetLogEvent
                  5/10/2006 7:09:24 PM:68964.16: Exit Plugin SetIO->


                  5/10/2006 7:09:45 PM:68985.55: Time event ignored due to critical section lock, count: 1


                  5/10/2006 7:11:35 PM:69095.69: Time event ignored due to critical section lock, count: 1
                  5/10/2006 7:11:35 PM:69095.73: Enter Plugin SetIO->
                  5/10/2006 7:11:35 PM:69095.8: WriteMon: AB8SS Plug-in Diagnostic->Error 5 (Invalid procedure call or argument) in procedure SetIO of User Control hspi
                  5/10/2006 7:11:35 PM:69095.86: Enter SetLogEvent
                  5/10/2006 7:11:35 PM:69095.89: SetLogEvent->Calling plugin: CommAndTimer
                  5/10/2006 7:11:35 PM:69095.98: Exit SetLogEvent
                  5/10/2006 7:11:36 PM:69096.02: Exit Plugin SetIO->
                  5/10/2006 7:11:36 PM:69096.08: Enter CommitDeviceStatus->Device:
                  5/10/2006 7:11:36 PM:69096.12: Exit CommitDeviceStatus
                  5/10/2006 7:11:36 PM:69096.16: Time event ignored due to critical section lock, count: 2

                  Gardner

                  Comment


                    #10
                    I believe the critical timing locks are Homeseer locks and not AB8SS ones. What I do recognize in the sequence is the line which is called because a device status has changed. CommAndTimer is the name of the procedure in mcsTemperature that receives the status change callback.

                    SetLogEvent->Calling plugin: CommAndTimer

                    What I see going on here, other than the error, is the AB8SS changes the status of a device as a result of the Setio call. This status change is reported to all plugins that have registered to be notified. mcsTemperature is the only one that has registered and it simply returned when it saw that it was not its device.

                    When all the plugin notification were done, then HS commits to actually change the status of the device. While all this was going on there were two events that could not be processed and had to be delayed becuase the device change processing was part of a critical section.

                    What I did in the attachment is add a log output to display the Setio parameters that mcsTemperature sees. This should be the same as the parameters seen by David's plugin. Give it a try to see what it tells us.
                    Last edited by Michael McSharry; May 10, 2006, 11:00 PM.

                    Comment


                      #11
                      Michael,
                      Thanks, I will load it and check results.
                      As far as the lock error, it is repeated many times between the setio errors, but the number increments each time the setio error occurs?
                      Gardner

                      Comment


                        #12
                        Here is the result. Looks like something is triggering wihtout a housecode or device code.

                        5/10/2006 9:29:21 PM~!~mcsTemperature~!~setio HouseCode=
                        5/10/2006 9:29:21 PM~!~mcsTemperature~!~setio DeviceCode=
                        5/10/2006 9:29:21 PM~!~mcsTemperature~!~setio Command=19
                        5/10/2006 9:29:21 PM~!~mcsTemperature~!~setio Brightness=0
                        5/10/2006 9:29:21 PM~!~mcsTemperature~!~setio Data1=0
                        5/10/2006 9:29:21 PM~!~mcsTemperature~!~setio Data2=0
                        5/10/2006 9:29:21 PM~!~mcsTemperature~!~setio ObjectType=DeviceClass
                        5/10/2006 9:29:22 PM~!~AB8SS Plug-in Diagnostic~!~Error 5 (Invalid procedure call or argument) in procedure SetIO of User Control hspi
                        5/10/2006 9:29:25 PM~!~mcsTemperature~!~setio HouseCode=T
                        5/10/2006 9:29:25 PM~!~mcsTemperature~!~setio DeviceCode=38

                        I attached a larger section.

                        Gardner
                        Attached Files

                        Comment


                          #13
                          Since it is a hs deviceclass I added more output to give the recognizable properties of this device. Try the attached.
                          Last edited by Michael McSharry; June 15, 2008, 11:14 AM.

                          Comment


                            #14
                            Michael,
                            I will load it up tonight.

                            Thanks again,
                            Gardner

                            Comment


                              #15
                              I loaded the code and here is the output.. I included the rest of the log in an attachment.

                              5/11/2006 6:21:06 PM~!~mcsTemperature~!~setio HouseCode=
                              5/11/2006 6:21:06 PM~!~mcsTemperature~!~setio DeviceCode=
                              5/11/2006 6:21:06 PM~!~mcsTemperature~!~setio Command=19
                              5/11/2006 6:21:06 PM~!~mcsTemperature~!~setio Brightness=0
                              5/11/2006 6:21:06 PM~!~mcsTemperature~!~setio Data1=0
                              5/11/2006 6:21:06 PM~!~mcsTemperature~!~setio Data2=0
                              5/11/2006 6:21:06 PM~!~mcsTemperature~!~setio ObjectType=DeviceClass
                              5/11/2006 6:21:06 PM~!~mcsTemperature~!~setio DeviceHCDC=
                              5/11/2006 6:21:06 PM~!~mcsTemperature~!~setio DeviceName=
                              5/11/2006 6:21:06 PM~!~mcsTemperature~!~setio DeviceInterface=
                              5/11/2006 6:21:06 PM~!~mcsTemperature~!~setio DeviceRef=0
                              5/11/2006 6:21:06 PM~!~AB8SS Plug-in Diagnostic~!~Error 5 (Invalid procedure call or argument) in procedure SetIO of User Control hspi
                              5/11/2006 6:21:09 PM~!~mcsTemperature~!~setio HouseCode=T
                              5/11/2006 6:21:09 PM~!~mcsTemperature~!~setio DeviceCode=38
                              5/11/2006 6:21:09 PM~!~mcsTemperature~!~setio Command=2
                              5/11/2006 6:21:09 PM~!~mcsTemperature~!~setio Brightness=0
                              5/11/2006 6:21:09 PM~!~mcsTemperature~!~setio Data1=0
                              5/11/2006 6:21:09 PM~!~mcsTemperature~!~setio Data2=0
                              5/11/2006 6:21:09 PM~!~mcsTemperature~!~setio ObjectType=DeviceClass
                              5/11/2006 6:21:09 PM~!~mcsTemperature~!~setio DeviceHCDC=T38
                              5/11/2006 6:21:09 PM~!~mcsTemperature~!~setio DeviceName=Temperature Wind Speed39
                              5/11/2006 6:21:09 PM~!~mcsTemperature~!~setio DeviceInterface=mcsTemperature
                              5/11/2006 6:21:09 PM~!~mcsTemperature~!~setio DeviceRef=1181


                              David sent me a modified debug code which I will load and see what that can show.

                              Gardner.
                              Attached Files

                              Comment

                              Working...
                              X