Announcement

Collapse
No announcement yet.

HS3 virtual device only transmits ON

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

  • HS3 virtual device only transmits ON

    I created a virtual device in HS3 to test how it works to pass info between HS2 and HS3 and when I click on the control Off or On all that is sent out via xAP (as seen on xFx viewer) is ON no matter which control is used. HS3 is also sending out an x10 to what ever code is in the x10 tab for that device.

    Is this a bug in HS3?

  • #2
    HS3 does not have a concept of ON / OFF that existed in HS2. Device-Value pairs are used to provide a user-defined view of what value is ON and what value is OFF. This is setup as part from the HS3 device management page. There is a HS3 xAP manual posted with the plugin. It describes how mcsXap tries to gracefully bridge the HS device with the xAP message keys.

    I am not understanding exactly what you mean by sending out an x10. There is an xap-x10 schema within xAP. It was implemented in mcsXap for HS2. I don't recall what provisions I made for it in HS3. If your virtual device is A1 to P15 it may be the case that xap-x10 schema is being used for compatibility with the xAP connector that interfaces with CM11A.

    Comment


    • #3
      I assigned a value to my virtual device of 1 for ON and 0 for off. I call it a flag.

      I used the code of v1 for the device code.

      The device page for setting up the device in HS3 has four tabs: config, Advanced, Status Graphics, and x10

      What I am seeing is that no matter what house code and unit code is set in the x10 tab when I toggle on and off or off to on of the device v1, what I see in the xFx viewer is a message with the BSC State of ON for v1 AND at hte same time my CM11 is also sending out an associated X10 signal to what ever house and unit code are set up in the x10 tab.

      I am not using xAP for x10.

      I have two plug-ins installed in HS3: mcsXap and CM11.

      If I disable the CM11 plug-in I don't see anything in the xFx viewer and of course don't see the x10 signal go out when I toggle my virtual device v1. If I then re-enable the CM11 plug-in and toggle v1, I see a message for ON in the xFx viewer and i see the x10 signal going out from the CM11.

      This is all very weird. I think it's a HS3 bug.

      Comment


      • #4
        I seems to me you are using a X10 plugin page to try to configure your device. The View - Device Management is the general capability to configure devices provided by HS3 independent of any plugin.

        When a device that belongs to a plugin (e.g. CM11A) and a button is used to change its state then the plugin gets called and it will change the DeviceValue based upon when the button was. A change in DeviceValue will generate an HS3 event and this will pass through mcsXap where the xAP message will be produced. If I recall correctly if a non-zero value is used in DeviceValue then it will produce an ON if a zero value is used then it will produce an OFF. This mapping should be in the mcsXap document.

        Comment


        • #5
          Your description makes a lot of sense and I think that is the way it should work, but version .40 is not working that way.

          When I create a virtual device, say v1, and set the off value to 0 and the on value to 1 and click on done (without going to the x10 tab) here is what happens.

          From the Device Management page, if I click on the On button, I see in xFx viewer a BSC Status of ON and I see an x10 ON command signal sent to A1. If I click on the OFF button in the Device Management page, I see in the xFx viewer a BSC Status of ON and I see an x10 OFF command signal sent to A1.

          If I disable the mcsXap plug-in and the repeat the above, the x10 signals still go out but there is now Xap traffic seen in the viewer. I think the problem lies with basic HS3 device management rules.

          I have reported the bug.
          See this post >>http://board.homeseer.com/showthread...=1#post1085363

          Comment


          • #6
            HS3 virtual device only transmits ON

            I am not able to grasp what you are trying to do, but I am able to control an HS2 virtual device from HS3. Here is a summary:
            1. I created an HS2 virtual device: z23 with the name: Event trigger from HS3
            2. I added that device to the mcsxAP plugin for HS2.
            3. I created an HS2 event that is triggered by a status change of z23.
            4. I manually toggled on/off the status of device z23 so it would generate network xAP messages.
            5. I added device z23 to the HS3 mcsxAP plugin. This creates the z23 device in HS3.

            Once setup, this approach allows HS3 (by changing the status[state] of z23) to run any desired event in HS2. It works very well in version 40, but requires a lot of setup time.

            Is this what you are trying to do?

            Steve Q


            Sent from my iPad using Tapatalk HD
            Last edited by Steve Q; November 1st, 2013, 11:49 AM.
            HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
            2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

            Comment


            • #7
              Yes, that is exactly what I am trying to do. However, I also want to use x10 from HS3 so the problem of a virtual device also sending x10 commands out has to be fixed.

              Comment


              • #8
                HS3 virtual device only transmits ON

                You don't need a virtual device to control an x10 HS2 device. Just add it to both HS2 and HS3 mcsxAP plugins. But you won't be able to dim it.

                But if there is a bug in the x10 plugin, yes, it need to get fixed.

                Steve Q


                Sent from my iPad using Tapatalk HD
                HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
                2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

                Comment


                • #9
                  The problem I am seeing is not associated with an x10 device. I can create x10 devices in both HS2 and HS3 with no problems. The problem is when changing the value or status of the virtual device is causing an x10 command to also be sent out. This is a bug. See this post >>http://forums.homeseer.com/showthread.php?t=162672

                  Comment


                  • #10
                    HS3 virtual device only transmits ON

                    Ok, I think I understand. But since I do not have an x10 interface connected, I don't have a clear understanding of the issue. I was just suggesting a way to control a HS2 virtual device.

                    If HS3 sends out an x10 on command, nothing is going to happen unless the HS2 plugin is listening for it. So you should still be able to achieve most of the functionality you might want.

                    Steve Q


                    Sent from my iPad using Tapatalk HD
                    HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
                    2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

                    Comment


                    • #11
                      With regards to xAP performance, I am seeing a problem as well which may be related to the bug with the X10 issue.

                      Here is what I see.

                      I created a virtual device, v1, and when I hit the ON button on the Device Management page, I see a BSC status of ON on the xFx viewer. When I then hit the OFF button I see ta BSC status of ON again on the xFx viewer. I never see the OFF status on the viewer.
                      The HS3 log, however does show the ON and OFF of the device.

                      If you are using HS3 .40 and don't see this behavior, then I am doing something wrong.

                      Comment


                      • #12
                        The ON/OFF value delivered via xAP is based upon how the Device/Value pairs are defined. For those that are created from xAP device acceptance this is setup automatically. If you want other devices to operate with state=ON/OFF to be consistent with the ON/OFF button use then the Values associated with the ON and OFF need to be per the values used by mcsXap.

                        I elected to use the maximum positive value for ON and the minimum negative value for OFF. If those are not used then 0 is OFF and anything else is ON. Look at your DeviceValue pairs that were setup for the ON and OFF buttons of your V1 device. Make them compatible with the definition expected by mcsXap then state=OFF and sate=ON will be produced as desired.

                        The code below is executed out of the HSEvent procedure that HS3 calls anytime a value for a device is changed.


                        Code:
                                    If iNewStatus = BSC_NOTIFY_STATUS Or iNewStatus = BSC_NOTIFY_VALUE Then
                                        Dim iControlValue As Integer = CType(vNewStatus, Integer)
                                        If iControlValue = &H7FFFFFFF Then
                                            sState = "ON"
                                            SetDeviceState(iRef, sState)
                                        ElseIf iControlValue = &H80000001 Then
                                            sState = "OFF"
                                            SetDeviceState(iRef, sState)
                                        Else
                                            sState = DeviceState(iRef)
                                            If sState = "" Then
                                                sState = "ON"
                                                SetDeviceState(iRef, sState)
                                            End If
                                            If iNewStatus = BSC_NOTIFY_VALUE Then
                                                If oXapDevice.DeviceKey.ToLower = "state" Then
                                                    If iControlValue = 0 Then
                                                        sState = "OFF"
                                                    Else
                                                        sState = "ON"
                                                    End If
                                                    SetDeviceState(iRef, sState)
                                                Else
                                                    sValue = vNewStatus
                                                End If
                                            End If
                                        End If
                        
                        
                        
                            Public Function DeviceState(ByVal iRef As Integer) As String
                                'expect ON, OFF, null for unspecified
                                Try
                        
                                    If iRef > -1 Then
                                        If hs.DeviceExistsRef(iRef) Then
                        41:                 Dim dv As Scheduler.Classes.DeviceClass = hs.GetDeviceByRef(iRef)
                                            If dv IsNot Nothing Then
                                                Dim PED As clsPlugExtraData = dv.PlugExtraData_Get(Nothing)
                                                If PED IsNot Nothing Then
                                                    Dim obj As Object = PED.GetNamed("State")
                                                    obj = PED.GetNamed("State")
                                                    If obj Is Nothing Then
                                                        Return ""
                                                    Else
                                                        Return CType(obj, String)
                                                    End If
                                                Else
                                                    Return ""
                                                End If
                                            Else
                                                Return ""
                                            End If
                                        Else
                                            Return ""
                                        End If
                                    Else
                                        Return ""
                                    End If
                        
                                Catch ex As Exception
                                    Return ""
                                End Try
                            End Function

                        Comment


                        • #13
                          On the Status Graphics tab for v1 I have a value of 0 for Off and a value of 1 for On. When I click on the ON or the OFF control button, I see a BSC State message on the xFx viewer of ON. I changed the values to different levels and got the same thing. For example I tried 100 for ON and -100 for OFF, and 100 for ON and 0 for OFF, and to 100 for ON and -1 for OFF and get the same result. The only BSC state I see in the xFx viewer is ON.

                          I wonder if the problem has to do with the hub. I tried using xapmcshub (the vb6 version) and could not get it to run (don't see it in the task manager). I was able to get the .net console version to run as I can see it in the task manager. There is no console or tray icon application anywhere that I can find.

                          Note that I am using a PRO100 machine. I have both HS2 and HS3 installed on the PRO100. I have been able to get HS2 with the mcsXap plug-in to work perfectly. I see both the ON and OFF BSC status messages in the xFx viewer with HS2. I have not been trying to run both HS2 and HS3 at the same time yet. I am trying get each one to work with xAP first and then I will try and get them to talk to each other. At this point, I only have a problem with HS3 version .40. I don't have any of the old versions. Maybe I could try an older version. Where can I find them?

                          Here is perhaps another clue. With HS2 running (HS3 not running) I see on the xFx viewer a message "Hub client renewal from mcsXap.computername at ip:1780" and then about 4 seconds later a message "Hub client renewal from mcs.hub.computername at ip:3639" and then about a minute later a message "Hub client renewal from mcsXap.computername at ip:1781"

                          This sequence is continuous with the port number on the mcsXap message incrementing by 1 about every minute right after the mcsXap heartbeat.
                          Last edited by noopara; November 2nd, 2013, 04:05 PM.

                          Comment


                          • #14
                            The hub does not interpret data so it is not a reason ON vs. OFF is occurring. Enable the plugin debug and use the ON/OFF buttons. This will show what HS3 is actually delivering to the plugin. The debug should go to a file in \Data\mcsXap_EventTrace.txt. The trace will only be meaningful to me so post the applicable segment. The start of the HS3 command to plugin will have " EVentCB " in the debug.

                            Comment


                            • #15
                              Here it is:
                              11/3/2013 3:02:11 PM 12 | mcsXap Start Event Trace
                              11/3/2013 3:03:31 PM 80256 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V1,101
                              11/3/2013 3:03:31 PM 80285 | mcsXap Debug xAP Send xapbsc.event state~ON
                              11/3/2013 3:03:36 PM 84814 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V1,-1
                              11/3/2013 3:03:36 PM 84854 | mcsXap Debug xAP Send xapbsc.event state~ON
                              11/3/2013 3:04:09 PM 118042 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V1,101
                              11/3/2013 3:04:09 PM 118080 | mcsXap Debug xAP Send xapbsc.event state~ON
                              11/3/2013 3:04:35 PM 144120 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V1,-1
                              11/3/2013 3:04:35 PM 144157 | mcsXap Debug xAP Send xapbsc.event state~ON
                              11/3/2013 3:05:52 PM 221337 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V1,1
                              11/3/2013 3:05:52 PM 221383 | mcsXap Debug xAP Send xapbsc.event state~ON
                              11/3/2013 3:05:56 PM 225410 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V1,-1
                              11/3/2013 3:05:56 PM 225450 | mcsXap Debug xAP Send xapbsc.event state~ON
                              11/3/2013 3:06:00 PM 228974 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V1,1
                              11/3/2013 3:06:00 PM 229011 | mcsXap Debug xAP Send xapbsc.event state~ON

                              At first I had the values set at 100 for ON and -1 for OFF
                              and then I set it to 1 for ON and 0 for OFF.

                              It looks like these values that I set on the "Edit Status Text" on the Status Graphics tab is not making much difference.

                              I set the ON to 1 and OFF to -1 here:
                              11/3/2013 3:14:06 PM 714854 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V1,1
                              11/3/2013 3:14:06 PM 714899 | mcsXap Debug xAP Send xapbsc.event state~ON
                              11/3/2013 3:14:08 PM 717521 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V1,-1
                              11/3/2013 3:14:08 PM 717559 | mcsXap Debug xAP Send xapbsc.event state~ON
                              11/3/2013 3:14:12 PM 721073 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V1,1
                              11/3/2013 3:14:12 PM 721116 | mcsXap Debug xAP Send xapbsc.event state~ON
                              11/3/2013 3:14:44 PM 752669 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V1,-1
                              11/3/2013 3:14:44 PM 752714 | mcsXap Debug xAP Send xapbsc.event state~ON

                              Here's the HS3 Log
                              Nov-03 3:14:15 PM Device Control Device: system virtual virtual test device to Off (-1) by/from: CAPI Control Handler
                              Nov-03 3:14:12 PM Device Control Device: system virtual virtual test device to On (1) by/from: CAPI Control Handler
                              Nov-03 3:14:08 PM Device Control Device: system virtual virtual test device to Off (-1) by/from: CAPI Control Handler
                              Nov-03 3:14:06 PM Device Control Device: system virtual virtual test device to On (1) by/from: CAPI Control Handler

                              Comment

                              Working...
                              X