Announcement

Collapse
No announcement yet.

HS3 virtual device only transmits ON

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

  • #16
    You understand why it is always ON, because the value is never 0 or hex 80000001. I cannot address how to get HS3 to give you a 0 when the OFF button is clicked. This area is different than HS2 and I have not devoted time to try to understand what the various options and strategies are with the new API.

    Comment


    • #17
      Is there a way for mcsXap to capture and transmit the values instead of the status of On or Off?

      Here I set the ON to 100 and OFF to 50
      11/3/2013 4:05:34 PM 3802857 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V1,101
      11/3/2013 4:05:34 PM 3802901 | mcsXap Debug xAP Send xapbsc.event state~ON
      11/3/2013 4:05:36 PM 3805320 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V1,50
      11/3/2013 4:05:36 PM 3805362 | mcsXap Debug xAP Send xapbsc.event state~ON
      11/3/2013 4:06:12 PM 3840650 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V1,101
      11/3/2013 4:06:12 PM 3840698 | mcsXap Debug xAP Send xapbsc.event state~ON
      11/3/2013 4:06:14 PM 3843031 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V1,50
      11/3/2013 4:06:14 PM 3843075 | mcsXap Debug xAP Send xapbsc.event state~ON

      and the HS3 log is
      Nov-03 4:05:40 PM Device Control Device: system virtual virtual test device to Off (50) by/from: CAPI Control Handler
      Nov-03 4:05:38 PM Device Control Device: system virtual virtual test device to On (100) by/from: CAPI Control Handler
      Nov-03 4:05:36 PM Device Control Device: system virtual virtual test device to Off (50) by/from: CAPI Control Handler
      Nov-03 4:05:34 PM Device Control Device: system virtual virtual test device to On (100) by/from: CAPI Control Handler

      mcsXap is showing 101 for ON instead of 100 for some reason

      Comment


      • #18
        EVentCB "1024,V1,101" are the values passed by HS3 to the plugin where the 101 is the new value that caused the event to be produced

        The xAP message will have a text= or level= key in the message that corresponds to the DeviceValue that is passed by HS3. The state= key is required by the xAP schema but does not need to be used by the receiver. While HS2 had the concept of Status that corresponded to the xAP state=, HS3 does not have it. You do not need to pay attention to it and utilize only the text= part of the message.

        If the DeviceString is not blank then it will be sent as part of the DisplayText=

        Comment


        • #19
          Here is a copy of a line out of the xFx viewer where I see the BSC State of ON in response to clicking the ON button on the HS3 Device Management Page. There is no BSC levels shown on the viewer.

          xap-header
          {
          v=13
          hop=1
          uid=FF.000D:1053
          class=xapbsc.event
          source=mcs.XapHS3.Computername:virtual_virtual_test_device_V 1.mcsXap_virt_1053
          }
          output.state
          {
          state=ON
          }


          Here it is after clicking the OFF button
          xap-header
          {
          v=13
          hop=1
          uid=FF.000D:1053
          class=xapbsc.event
          source=mcs.XapHS3.Computername:virtual_virtual_test_device_V 1.mcsXap_virt_1053
          }
          output.state
          {
          state=ON
          }

          I checked the mcsXap setup to see if there was some option that might cause the level to be excluded or included but there is not.

          I don't see how anyone is getting HS2 and HS3 to talk to each other if the correct status or level is not being broadcast from HS3 unless the problem is a new one with the latest version .40.

          Comment


          • #20
            The generation of text and level keys is based upon the characterization of the device. If the device is status only then the text (or level) will always be produced. If the device is controllable then the text or level will only be produced if the device supports a range of values. If the device is setup to only output for discrete values (e.g. on & off) then only the state will be sent via mcsXap.

            If you do not have any other use for the values setup in device/values pairs then using +/- 2147483647 for on/off will result in a State= on/off as desired.

            If you want the numeric value to be sent in the xAP message then you will need to define a range of values. For example 0=off, 1-99=dim, 100=on. This will result in the desired value 0 or 100 being sent and state=On will also be sent.

            To make the plugin a little friendlier I did a search in the value status pairs for On and Off and if they are defined they will be set in the xAP message if the corresponding value is provided by HS3. This is with version 3.0.0.24. It also sends the value for cases where it could not identify an ON/OFF otherwise.

            If a range of values of setup with DeviceManagement then mcsXap will include level=x/y where the y is the largest value of the range defined and x is the new value provided. The state will be determined by the same rules as above.

            Comment


            • #21
              That all makes sense.

              I'm convinced that the .4 version is the problem here. It doesn't behave anything like what you have described. There are so may flaky problems with it, it would take hours to try every combination and document the results. I don't have time. I'm going to wait for them to put out some fixes to this problem and then try again.

              I wish I had an older version to compare too. I only have the .4 version. Do you know where I can get an older version?

              My SSD on my PRO100 failed and I lost everything. It's a good thing that I have only been using it for developing a new system. I was just about to a point where it was worth starting to do backups when the SSD died. My production HS2 system is running just fine on an old PC.

              My mcsSprinklers system is running on it's own microITX box and is very solid.

              Comment


              • #22
                HS3 virtual device only transmits ON

                Originally posted by noopara View Post

                I don't see how anyone is getting HS2 and HS3 to talk to each other if the correct status or level is not being broadcast from HS3 unless the problem is a new one with the latest version .40.
                I am using ver 40 and I am totally able to communicate between my HS3 computer and my HS2 computer via the mcsxAP plugins. I have not had time to examine the xAP messages but I have no reason to believe they are not the text or status corresponding to the device value or state.

                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


                • #23
                  Steve Q,

                  This is good news. So, there must be some other problem with my configuration.

                  What is the configuration of your system?

                  OS
                  xAP hub
                  xAP viewer
                  HS3 plug-ins installed

                  How do you configure the virtual device in HS3?

                  Comment


                  • #24
                    HS3 virtual device only transmits ON

                    I am running HS3 on two machines. A Dell i620 desktop running Windows 7 and an Acer Aspire 1 Netbook running windows XP. Most of my work has been on the Windows 7 computer. Both are running HS3 ver 40. Both are working properly with mcsxAP. The only interface device I have installed is a DS9490R USB xAP 1wire interface from Maxim electronics.

                    My HS3 setup is essentially the same for both computers. For the Win 7 computer it is:
                    1. Mcsxaphub.exe ver 1.2.0.2 installed in C:\Program Files (x86)\HomeSeer HS3\XAP\mcsXapHub121
                    2. Xapmcs1wire.exe ver 3.0.0.23 installed in C:\Users\Steve\Downloads\xapmcs1WireNet A\xapmcs1Wire.exe
                    3. HSPI_mcsxAP.exe Ver 3.0.0.23 installed in C:\Program Files (x86)\HomeSeer HS3
                    3a. HSPI_mcsxAP.dll 3.0.0.13 installed in C:\Program Files (x86)\HomeSeer HS3
                    4. SQLite.interop.dll installed in C:\Program Files (x86)\HomeSeer HS3
                    5. SQLite3.dll installed in C:\Program Files (x86)\HomeSeer HS3
                    6. System.data.sqlite.dll in C:\Program Files (x86)\HomeSeer HS3

                    I typically manually start the hub first followed by mcs1wire followed by HS3. But I also have added an event to the startup file that will start the hub and 1wire automatically. Both approaches work but you may see some log xAP communication error messages when you use the auto start approach.

                    Some of my xAP devices are shown in the first attachment.

                    For each device that has previously created an xAP message from the HS2 plugin, an HS3 device is automatically created by the mcsxAP HS3 plugin when you "accept" it on the setup page. It is important that each device is correctly configured. I have changed the name of most of my devices to something shorter an more user friendly. This is important because the HS3 drop down device menu truncates the device name and there might be multiple devices listed with the same name. This can be very confusing when creating events.


                    It is critical that each device is configured correctly. The plugin will do its best to create a configuration based on the available information from the device, but this needs to be checked and modified as needed for each device. For all on/off devices I use 0 for off and 100 for on. See the screen photo for the configuration of my C7 x10 light. Using 100 for On also makes the "on" lightbulb graphic appear on the device status page.

                    Hope this is helpful.

                    Steve Q
                    Attached Files
                    Last edited by Steve Q; November 4th, 2013, 09:31 PM.
                    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


                    • #25
                      Steve,

                      Thanks for the info. This should help a lot.

                      I'm running a PRO100 machine which is an XPe machine with (at the moment) both HS2 and HS3.

                      My production machine is an old PC running HS2 and JDS WinEvm (Stargate). It's all very solid.

                      My plan is to migrate from the old PC to the PRO100 machine eventually. I've been hoping that this would be only an HS3 machine, but the way HS3 development is going it's looking like it's going to be another couple of years before its really stable. So, now, I'm thinking about building a new HS2 system and then maybe upgrade to HS3 when the development work is done.

                      I thought I could get HS2 and HS3 running together on the PRO100 and talking to each other via xAP and do some HS3 testing. But now after working with HS3 for awhile now, I am thinking about putting it on a dedicated machine and trying to link it with the PRO100/HS2 machine via xAP to do the testing.

                      So, give me a few days to get another machine going and I will re-visit these issues.
                      Last edited by noopara; November 4th, 2013, 05:10 PM.

                      Comment


                      • #26
                        I now have HS3 .40 running on a dedicated xp Pro SP3 machine (#1) and on a PRO100 machine (#2)

                        The CM11 plug-in is not installed on #1 but is installed on #2(PRO100).
                        mcsXap plug-in is installed in both.

                        I tried to install the xapmcshub in #1 but couldn't install it without the mswinsck.ocx file, so I installed the .net console version. It's interesting that when I tried to install the xapmcshub on the PRO100 before, I never got the error message that says it's missing but I did see this on machine #1.

                        I wasn't seeing the heart beats from #1 on #2

                        I removed the mcs console hub from machine #1 and installed the Pearson xFx Express Hub. I could then see the heartbeats from #1 on #2.

                        I created a virtual device (v1). I did not configure anything on the Status Graphics page. I accepted the v1 device on the mcsXap set up page

                        Clicking the ON and OFF buttons for this device resulted in xAP traffic with both the ON and OFF BSC status as seen on the viewer on machine #2. It's interesting that on the xFx viewer on machine #1, the ON OFF messages did not appear??

                        I went back to my PRO100 (#2) machine and installed the Pearson xFx Express Hub to see if this made any difference in behavior. It didn't. With the CM11 plug-in enabled, controlling a virtual device causes x10 signals to be sent out and the ON and OFF messages don't show in the viewer - only the ON messages - same as before. This is what I expected as the hub shouldn't make any difference.

                        If I disable the X10 plug-in and create a new virtual device everything works. The problem seems to be tied to the X10 plug-in. If after creating a virtual device with the x10 plug-in disabled if you go back and then enable the x10 plug-in everything still works. The problem seems to be only when a virtual device is created with the X10 plug-in enabled.

                        So it would seem that the X10 plug-in is the problem or perhaps something in HS3 .40 version changed causing the mix up.

                        It sure would help if there were a better help file to explain the Configuration, Advanced, and the Status Graphics tab in the device set up page.

                        The only thing I am left with wondering about now is why the xFx Viewers on machine #1 and machine #2 don't show the same thing. The #2 viewer shows the traffic from the #1 machine as well as traffic from my mcsSprinklers machine and another machine with my production HS2 system.

                        Comment


                        • #27
                          Clicking the ON and OFF buttons for this device resulted in xAP traffic with both the ON and OFF BSC status as seen on the viewer on machine #2. It's interesting that on the xFx viewer on machine #1, the ON OFF messages did not appear??
                          I assume machine 1 is the one where you clicked ON/OFF. The inability of the viewer to see the message means the xAP Hub on machine 1 is not functional or the message was sent before the first heartbeat of the xAP viewer was seen by the xAP hub on machine 1.

                          All xAP traffic is placed on the LAN using port 3639. The hub on each machine listens on port 3639. The hub listens for heartbeat messages from applications on the same computer and the information in the heartbeat allows a connection on 127.0.0.1 to be made between the application and the hub. Subsequently any message received by the hub on 3639 is forwarded over 127.0.0.1 to the application which has the effect of the application effectively hearing all traffic on port 3639.

                          If same-machine xAP communications are not happening then the hub is not functional on that machine. If xAP messages from other computers are not heard by applications then the xAP hub on the receiving machine is not functional. In earlier xAp development sometimes an application would start listening directly on port 3639 so when the hub was started it could not function because 3639 was already in use. Unless you have some older xAP application then this should not be happening. You can also check with Task Manager to assure multiple instances of an xap are not running.

                          Comment


                          • #28
                            Yes, machine #1 is running HS3 and clicking on the ON/OFF for a HS3 virtual device shows up on the xFx viewer on machine #2 but not on the viewer on machine #1.

                            I have tried the .net version of the Console and Service hubs and the vb6 hub, xFX Express Hub and the results are the same - machine #1 viewer only shows the heartbeats from the viewer on machine #1 and machine #2. The viewer on machine #1 also does not show any of the BSC traffic or heartbeats from my two other machines on the network.

                            It seems that machine #1 has some sort of problem.

                            What I see in the viewer does not change if I run HS3 or not. If I do run HS3, I can see it's heartbeat on machine #2 but not on the machine it is running on (#1)

                            I ran netstat -an on machine #1 and port 3639 is shown for both 127.0.0.1 and 192.168.xxx.yyy. I can't run netstat on the machine #2 (PRO100) because it's not included in the OS.

                            The virtual device in HS3 on machine #1 was accepted on HS2 mcsXap on machine #2 and when the device is toggled in machine #1 it changes the status of the device in machine #2 like it should. So it works fine going from HS3 to HS2.

                            It doesn't work going the other way from HS2 to HS3. When a virtual device created and accepted on HS2 on machine #1 is toggled the xAP traffic is seen on the machine #1 viewer but not on machine #2 viewer and it does not show on the HS3 mcsXap plug-in. (I am using mcsXap version 30023 on the HS3 machine.)

                            So, it would seem that the failure of the hub to run on machine #1 is the problem. Maybe I need to rebuild the OS??
                            Last edited by noopara; November 6th, 2013, 01:40 PM.

                            Comment


                            • #29
                              Another possibility on machine #1 is the existence of two NIC cards. If there are two then you will want to include \Config\mcsXap.ini setup for the NIC that you want to use. There are some recent posts on what this file looks like. It would go to every mcs xAP application location including the HS \config folders for the plugin. There should be a similar way to specify the NIC on the .NET hubs. I think they use an XML config file.

                              Comment


                              • #30
                                That's good guess but machine #1 only has one. My PRO100, machine #1 does have 2 NIC cards though.

                                Anyway, I solved the problem. I started over with machine #1. Reformatted the HD, installed XP PRO and everything else and its all working perfectly.

                                HS2 on the PRO100 (machine #2) is talking to HS3 on machine #1 and visa versa. I am now seeing the same thing on the xFx viewers on both machines.

                                I started looking at the users control on machine #1 and it looked like there was some kind of problem there. I was unable to see that machine from one of my other machines. So, I decided to just start over with it which I should have done to begin with. It was a throw away machine from one of my clients. I should have known better.

                                Thanks for the help.

                                Comment

                                Working...
                                X