No announcement yet.

Secu16 relays

  • Filter
  • Time
  • Show
Clear All
new posts

  • Secu16 relays

    Just wanted to post a link to a thread that got started in the Applied Digital forum. It appears that there might be a problem with controlling relays on a secu16.
    Secu16 relay outs

    Not sure that the problem is with AdiOcelot but wanted to bring the thread to your attention and thought you would be more likely to see it here.


  • #2
    First guess is that it is related to the HS2 optimization to only call plugins associated with the device being controlled. I put in some debug statements into the attached that will show in the the log for each SETIO call made to ADIOcelot and the data being delivered to the ocelot if it thinks there is a relay to control.
    Attached Files


    • #3
      I'm not noticing anything jumping out at me but I might not be looking for the right thing. I included a normal log and one with trace on.

      F9 on/off triggers events in HS to turn on/off relay. F10 on/off triggers similar macors in Cmax.

      Attached Files


      • #4
        It confirms my prior guess that HS is not calling the plugin to allow it to change the hardware output. (i.e. there are no calls to the SETIO method of the plugin). I would suggest submitting a help desk ticket. I think the Interface Property of the variables and io point virtual devices need to match the plugin name. To maintain compatibility with the HST ocelot plugin the Interface Property was left intact and new devices were created with the same Applied Digital Ocelot. With HS1 this property was not used as a criteria to call the plugin, but I think that a recent optimization invoked it. It is really HST's call if my assumptions are correct and how they want to handle the two plugin's compatibility.


        • #5
          Ticket posted. I asked them to review this thread and give us their thoughts.


          • #6
            When the code was "licensed" for lack of a better word to Michael & Co., we had no requirement that their plug-in be compatible with ours. That was a design goal of theirs to keep the transition to the other plug-in as transparent as possible.

            The optimization change to only call the plug-in that owns a device is an important one as in systems such as mine with 15 plug-ins, it was a little crazy calling 14 plug-ins SetIO procedures unnecessarily. COM plug-ins run under a single thread, so the SetIO calls are handled serially as well.

            Thus, I would write a script that enumerates the devices and changes any instances of "Applied Digital Ocelot" on the interface property to "ADIOcelot" or whatever Mike's plug-in is known as in HomeSeer.

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


            • #7
              The group needs to decide if the plugin should change its interface name to Applied Digital Ocelot or if the devices created by the plugin should be changed to ADIOcelot. I do look for "Applied Digital Ocelot" in other applications so it is easier for me to do it this way. The downside to this later approach is that HST's installer may require that the HST plugin be present and HS may get confused with two plugins with the same Interface name.


              • #8
                I'm not sure that there are too many of us that would understand most of the ramifications of changing the interface or plugin name. It seems that having duplicate plugin names shouldn't be a problem unless both are active at the same time, which you wouldn't do unless you actually had two ocelots connected. If you want to post or email an experimental copy I'll give it a shot.

                The HS Ocelot plugin doesn't seem to be part of the "standard" HS2 install. At least it isn't listed as a found plugin when HS starts.

                This might not be the whole problem though. I changed the interface property on the one device. I see the setio log entries now when I run the event to set the relay. However, the relay itself still doesn't change state. A log entry is attached.
                Attached Files


                • #9
                  When I installed HS 2.0 I didn't load HST version for the Ocelot or any of my modules. Where would things get the wrong info from? I tried eliminating problems that other plugins may cause as I can cause enough on my own, been practicing for 40+ years and have gotten pretty good at it!!!


                  • #10
                    The command was filtered based upon iotype or interface name so it did not get al the way through. I added a log at an intermediate step. I also change the Interface name to Applied Digital Ocelot. I installed it under HS2 (and HS1) and it saw it in both cases. I did not connect any hardware to it.

                    There is no need to turn on the HS trace. The only info of value is the log messages from the plugin.
                    Last edited by Michael McSharry; November 15th, 2005, 11:43 AM.


                    • #11
                      Thanks Micheal. What's the route to do this "upgrade". Do we shut down or run it as is.


                      • #12
                        This is not an upgrade. It is an experimental build with debug hooks. It is intended for Jim's use to evaluate implications of a name change within the plugin.


                        • #13
                          This one was a little more fun to install than normal. As I usually do I just shutdown HS, copied the hspi file, and restarted and got several errors- including one about an invalid license file and a couple "ojbect or with block variable..." errors.

                          Evidently, HS remembers the plugins that it was using before (just realized as I'm writing that that's kept in settings.ini so of course it does). Anyway, figured out how to change over without errors: disable plugin, shutdown and update file, restart, reenable plugin. Once I had to restart again for everything to settle down.

                          It still doesn't operate the relay - the log is attached.
                          Attached Files


                          • #14
                            For grins I installed the Ocelot plugin - never enabled it just installed it. It does cause an error on startup but the Adiocelot plugin still initialized fine. Not sure if it always loads the same order or not (looks like it's alphabetical). Deleted the hspi_ocelot file and the error went away.

                            10/25/2005 11:48:47 PM ~!~Startup~!~Checking for available plug-ins
                            10/25/2005 11:48:48 PM ~!~Info~!~Found plugin: Applied Digital Ocelot version:
                            10/25/2005 11:48:48 PM ~!~Info~!~Found plugin: X10 CM11A/CM12U version:
                            10/25/2005 11:48:48 PM ~!~Info~!~Found plugin: Applied Digital Ocelot version:
                            10/25/2005 11:48:48 PM ~!~Error~!~Could not add Applied Digital Ocelot to the plug-in list.  Is this a duplicate?  Check for two plug-ins with the same plug-in name.
                            10/25/2005 11:48:48 PM ~!~Info~!~Found plugin: Touchpad version:
                            10/25/2005 11:48:48 PM ~!~Info~!~Found plugin: UltraLog version:
                            10/25/2005 11:48:49 PM ~!~Info~!~Found plugin: Media Player version:
                            10/25/2005 11:48:49 PM ~!~Startup~!~Restoring device status


                            • #15
                              The code sequence executed with the initial change of the status from OFF to ON. In the service the plugin set the DeviceValue for the same device. In HS1 this resulted in a second call to SETIO with a Value change to be acted upon by the plugin. This SetDeviceValue never resulted in a call back to the plugin. I know I have other plugins that are expecting to be called when one its device's values have been changed. I just dont remember which ones.

                              I believe the ticket should remain open to continue the saga.

                              Public Sub SetIO(dv As Variant, housecode As String, devicecode As String, command As Integer, brightness As Integer, data1 As Integer, data2 As Integer)
                                  hs.Writelog "setio " & sDC, "SECU Unit=" & CStr(HouseDictionary.Exists(housecode)) & ", Command=" & CStr(command) & ", Value=" & CStr(brightness)
                              40            sDC = housecode & devicecode
                              50            If hci = gBaseVars Or hci = gBaseVars + 1 Then
                                      {emoved processing of variables to reduce clutter here}
                              240           ElseIf dv.iotype = IOTYPE_OUTPUT And (command <> VALUE_SET) Then
                                      hs.WriteLog "DVIOTYPE " & housecode & devicecode & ", DeviceInterface=" & CStr(dv.interface), "PluginInterface=" & CStr(gInterfaceName) & ", Command=" & CStr(command) & "," & CStr(brightness)
                              250               If LCase(dv.interface) = LCase(gInterfaceName) Then
                              270                   If command = UON Then
                              280                       Value = 1
                              290                   Else
                              300                       Value = 0
                              310                   End If
                              320                   hs.SetDeviceValue sDC, Value
                              The segment that you posted shows only 1 setio call. The SetDeviceValue issued by the plugin did not generate the setio call. There were multiple user commands to cause either ON or OFF and in all cases the same behavior.

                              10/25/2005 8:12:13 PM ~!~Info~!~Device: Secu16 Unit 1 Relay Output 2 (]10) ON
                              10/25/2005 8:12:13 PM ~!~setio ]10~!~SECU Unit=True, Command=2, Value=0 0
                              10/25/2005 8:12:13 PM ~!~DVIOTYPE ]10, DeviceInterface=Applied Digital Ocelot~!~PluginInterface=Applied Digital Ocelot, Command=2,0
                              10/25/2005 8:12:40 PM ~!~Info~!~Device: Secu16 Unit 1 Relay Output 2 (]10) OFF