Announcement

Collapse
No announcement yet.

events not firing when xAP device changes value (Netiom board)

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

    events not firing when xAP device changes value (Netiom board)

    I have a simple test event as per pic1 attached. I have another event as per pic2.

    I would expect this event to fire if I switch output 8 on from the devices screen. It doesn't.
    I would also expect this event to fire if I run the 2nd event. It doesn't.
    Even if I use another trigger such as Device value has changed and becomes, the event still doesn't fire.

    If I switch the output on from HS2, then the device is updated in HS3, and the event DOES fire.

    Switching the device on via the devices screen results in the following log message.

    May-17 21:33:16 Device Control Device: test phaedrus.netiom.Location3:Output.8 to On (100) by/from: CAPI Control Handler


    Also, I am getting this message in the log every minute.

    HSEvent Line 0 Arithmetic operation resulted in an overflow.

    Am I doing anything wrong? I am using v39 of the plugin.
    Attached Files
    Last edited by apluck; May 17, 2014, 03:51 PM.

    #2
    I did try the second of your events. In my case the value of my xap output (relay) point changed to 100 for the ON state. I also confirmed that when controlling this device from Device Management page I also get the CAPI message in the log. Confirm the device is not setup to be status only by looking at the property from Device Management.

    Confirm that the device actually does change from OFF to ON. ON to ON is not a change. The Device Management page Advanced tab gives the Device Value.

    There is a debug option in mcsXap. If you enable that then there should be some information in the debug log for the message you are getting every minute.

    Comment


      #3
      Hi Michael, thank you for the quick response!

      I confirm that the device is not status only, and it does change state properly when running the second event (New Event -3), and when switching it on and off from the devices page. So the xAP part is working fine.

      My issue is that the 1st event (New Event -4) does not fire. Would you be able to try the 1st event please?

      Regarding the message in the log every minute, here are a couple of excerpts from the HS log and the mcsXap eventtrace file. I've attached the event trace file.

      Thanks again!


      May-18 06:55:11 mcsXap HSEvent Line 0 Arithmetic operation resulted in an overflow.

      18/05/2014 06:55:11 36804155 | mcsXap Debug Message Source=phaedrus.netiom.location2:input.12,Exists=True
      18/05/2014 06:55:11 36804164 | mcsXap Debug VALUE_CHANGE EVentCB 1024,I3,14519554
      18/05/2014 06:55:11 36804170 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V3,232.26
      18/05/2014 06:55:11 36804175 | mcsXap Debug STRING_CHANGE EVentCB 64,V3,232.26W
      18/05/2014 06:55:11 36804175 | mcsXap Debug HSEVENT String V3, Current= 232.26W, New= 232.26W





      May-18 06:56:15 mcsXap HSEvent Line 0 Arithmetic operation resulted in an overflow.

      18/05/2014 06:56:15 36867949 | mcsXap Debug Message Source=phaedrus.netiom.location:input.1,Exists=True
      18/05/2014 06:56:15 36868191 | mcsXap Debug VALUE_CHANGE EVentCB 1024,I3,14519558
      18/05/2014 06:56:15 36868204 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V3,225
      18/05/2014 06:56:15 36868209 | mcsXap Debug STRING_CHANGE EVentCB 64,V3,225W
      18/05/2014 06:56:15 36868210 | mcsXap Debug HSEVENT String V3, Current= 225W, New= 225W
      18/05/2014 06:56:15 36868212 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V4,3.41
      18/05/2014 06:56:15 36868218 | mcsXap Debug STRING_CHANGE EVentCB 64,V4,3.41kWh
      18/05/2014 06:56:15 36868219 | mcsXap Debug HSEVENT String V4, Current= 3.41kWh, New= 3.41kWh
      18/05/2014 06:56:15 36868835 | mcsXap Debug VALUE_CHANGE EVentCB 1024,I5,9264095
      18/05/2014 06:56:15 36868846 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V5,257.14
      18/05/2014 06:56:15 36868855 | mcsXap Debug STRING_CHANGE EVentCB 64,V5,257.14W
      18/05/2014 06:56:15 36868856 | mcsXap Debug HSEVENT String V5, Current= 257.14W, New= 257.14W
      18/05/2014 06:56:15 36868858 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V6,0.19
      18/05/2014 06:56:15 36868864 | mcsXap Debug STRING_CHANGE EVentCB 64,V6,0.19kWh
      18/05/2014 06:56:16 36868865 | mcsXap Debug HSEVENT String V6, Current= 0.19kWh, New= 0.19kWh
      18/05/2014 06:56:16 36868867 | mcsXap Debug STRING_CHANGE EVentCB 64,I5,9264.095
      18/05/2014 06:56:16 36868867 | mcsXap Debug HSEVENT String I5, Current= 9264.095, New= 9264.095
      18/05/2014 06:56:16 36869606 | mcsXap Debug Messag
      Attached Files

      Comment


        #4
        I did enable the controluse property in the device/value pairs. This is what was causing a similar issue with HSTouch control. See if it makes a difference for what you are seeing. V3.0.0.40. The file where the updater should find mcsXap is listed at the bottom of the mcsXap change log for HS3 in the xAP Library forum.

        Comment


          #5
          Michael, partial success.

          The 1st event in the pic using "changes and becomes" still does not fire when I switch output 10 from off to on using the devices page.

          The 2nd event using "had its value set to" does fire...

          Cheers
          Attached Files

          Comment


            #6
            Hi Michael, any thoughts or other tests I should do?
            cheers

            Comment


              #7
              Just to close this off, I just upgraded to HS3 v3.0.0.96, and these events now work.

              I still get the "Arithmetic operation resulted in an overflow" in the log every 30s.

              I'm not sure how to diagnose further - I closed down HS2 just to make sure it wasn't erlated to that.

              Anyone any ideas?

              Comment


                #8
                I spoke too soon. Neither the "Changes and Becomes" nor the "Has a value that just changed" triggers fire when a device is switched.

                This is still a problem. Anyone else seeing this issue?

                Comment


                  #9
                  I cannot do any evaluation until I return after Monday. What you can do is enable the mcsXap debug, send the xAP message that will be seen by mcsXap to cause a value change and for which the event setup does not fire. If my memory is correct this will provide the interaction between HS3 and mcsXap that can be used to help isolate. I think the debug is produced in a .txt file in the \data subfolder. When you do your test keep the debug short so we know the data that corresponds to your stimuli. Enable debug, run test, disable debug. Post this debug file.

                  I believe the overflow is caused from the "14519558" in the prior debug you posted. I thought I had corrected that one but I will look again.

                  Comment


                    #10
                    Thanks Michael. I did the following:-

                    1. Switch Output 10 On, then Off, then On then Off using the Devices web page. These are shown as the CAPI entries in the HS3 log.
                    2. This caused HS generated corresponding xAP commands which I captured using xfx message viewer.
                    3. I resent the captured Output 10 "On" message (at 12:24:30) using xfx viewer.

                    The event only fired on point 3 above. It should have fired on point 1 as well.


                    HS3 log
                    Jun-01 12:24:30 Device Control Device: test test phaedrus.netiom.Location3:Output.8 to On (100)
                    Jun-01 12:24:30 EventEvent Trigger "Test b"
                    Jun-01 12:24:28 mcsXapHSEvent Line 0 Arithmetic operation resulted in an overflow.
                    Jun-01 12:24:25 Device Control Device: test test phaedrus.netiom.Location:Output.10 to Off (0) by/from: CAPI Control Handler
                    Jun-01 12:24:23 Device Control Device: test test phaedrus.netiom.Location:Output.10 to On (100) by/from: CAPI Control Handler
                    Jun-01 12:24:22 Device Control Device: test test phaedrus.netiom.Location:Output.10 to Off (0) by/from: CAPI Control Handler
                    Jun-01 12:24:20 Device Control Device: test test phaedrus.netiom.Location:Output.10 to On (100) by/from: CAPI Control Handler


                    xAPevent trace
                    01/06/2014 12:24:20 14237707 | mcsXap Debug xAP Send xapBSC.Cmd ID~1A|state~On
                    01/06/2014 12:24:20 14237740 | mcsXap Debug Message Source=phaedrus.netiom.locationutput.10,Exists=True
                    01/06/2014 12:24:21 14238343 | mcsXap Debug Message Source=phaedrus.netiom.location2utput.11,Exists=True
                    01/06/2014 12:24:22 14239341 | mcsXap Debug Message Source=phaedrus.netiom.location:input.5,Exists=True
                    01/06/2014 12:24:22 14239360 | mcsXap Debug xAP Send xapBSC.Cmd ID~1A|state~Off
                    01/06/2014 12:24:22 14239392 | mcsXap Debug Message Source=phaedrus.netiom.locationutput.10,Exists=True
                    01/06/2014 12:24:22 14240151 | mcsXap Debug Message Source=phaedrus.netiom.location3:serialport.in,Exists=True
                    01/06/2014 12:24:23 14240780 | mcsXap Debug xAP Send xapBSC.Cmd ID~1A|state~On
                    01/06/2014 12:24:23 14240815 | mcsXap Debug Message Source=phaedrus.netiom.locationutput.10,Exists=True
                    01/06/2014 12:24:25 14242431 | mcsXap Debug Message Source=phaedrus.netiom.location2utput.12,Exists=True
                    01/06/2014 12:24:25 14242722 | mcsXap Debug xAP Send xapBSC.Cmd ID~1A|state~Off
                    01/06/2014 12:24:25 14242754 | mcsXap Debug Message Source=phaedrus.netiom.locationutput.10,Exists=True
                    01/06/2014 12:24:26 14243430 | mcsXap Debug Message Source=phaedrus.netiom.location:input.6,Exists=True
                    01/06/2014 12:24:26 14244242 | mcsXap Debug Message Source=phaedrus.netiom.location3:serialport.out,Exists=True
                    01/06/2014 12:24:28 14246284 | mcsXap Debug VALUE_CHANGE EVentCB 1024,I5,26219887
                    01/06/2014 12:24:28 14246291 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V5,3318.75
                    01/06/2014 12:24:28 14246294 | mcsXap Debug STRING_CHANGE EVentCB 64,V5,3318.75W
                    01/06/2014 12:24:28 14246295 | mcsXap Debug HSEVENT String V5, Current= 3318.75W, New= 3318.75W
                    01/06/2014 12:24:28 14246297 | mcsXap Debug VALUE_CHANGE EVentCB 1024,V6,10.73
                    01/06/2014 12:24:28 14246302 | mcsXap Debug STRING_CHANGE EVentCB 64,V6,10.73kWh
                    01/06/2014 12:24:28 14246303 | mcsXap Debug HSEVENT String V6, Current= 10.73kWh, New= 10.73kWh
                    01/06/2014 12:24:28 14246304 | mcsXap Debug STRING_CHANGE EVentCB 64,I5,26219.890
                    01/06/2014 12:24:28 14246304 | mcsXap Debug HSEVENT String I5, Current= 26219.890, New= 26219.890
                    01/06/2014 12:24:29 14246521 | mcsXap Debug Message Source=phaedrus.netiom.location2utput.13,Exists=True
                    01/06/2014 12:24:30 14247387 | mcsXap Debug Message Source=phaedrus.netiom.locationutput.10,Exists=True
                    01/06/2014 12:24:30 14247400 | mcsXap Debug xAP Send xapBSC.Cmd ID~18|state~On
                    01/06/2014 12:24:30 14247403 | mcsXap Debug VALUE_CHANGE EVentCB 1024,87,100
                    01/06/2014 12:24:30 14247432 | mcsXap Debug Message Source=phaedrus.netiom.location3utput.8,Exists=True
                    01/06/2014 12:24:30 14247519 | mcsXap Debug Message Source=phaedrus.netiom.location:input.7,Exists=True
                    01/06/2014 12:24:31 14248331 | mcsXap Debug Message Source=phaedrus.netiom.location3:input.1,Exists=True


                    Captured xAP message
                    xap-header
                    {
                    v=12
                    hop=1
                    UID=FF12341A
                    class=xapbsc.event
                    Source=phaedrus.netiom.Location:Output.10
                    }
                    output.state
                    {
                    State=on
                    }

                    Comment


                      #11
                      Hi Michael, is there enough information here to diagnose? Cheers.

                      Comment


                        #12
                        The values returned from netiom will be the ones you want to define in the event. The event trigger will occur when the xapbsc.event message is received from the netiom in response to the xapbsc.cmd message from mcsXap. If the netiom reports 255/255 as your ON condition then set you custom trigger range to be 255 to 255. If it reports 100/100 then use 100 etc. The same logic for an event for the OFF trigger.

                        House code A to P devices are treated as X10 devices. I see the following in your debug and mcsXap is trying to set an x10 brightness count to 14519 which is beyond 100% brightness. While I can fix the plugin so the overflow does not occur, it means that you may also not be getting what you expect with devices in the X10 house code range.

                        HSEVENT String I3, Current= 14519.530, New= 14519.530
                        Last edited by Michael McSharry; June 5, 2014, 02:01 PM.

                        Comment


                          #13
                          Ah - I've found the problem. HS3 sends "On" which switches the Netiom but doesn't trigger the event. HS2 sends "ON" which switches the Netiom, and also triggers the HS3 event.


                          HS2 message:-

                          xap-header
                          {
                          v=13
                          hop=1
                          uid=FF.000E:0000
                          class=xapBSC.Cmd
                          source=mcs.Xap.tv
                          target=phaedrus.netiom.Location:Output.10
                          }
                          output.state.1
                          {
                          State=ON
                          ID=1A
                          }
                          Checksum
                          {
                          Length=0179
                          }

                          HS3 sends this message
                          xap-header
                          {
                          v=13
                          hop=1
                          uid=FF.000D:0000
                          class=xapBSC.Cmd
                          source=mcs.XapHS3.tv
                          target=phaedrus.netiom.Location:Output.10
                          }
                          output.state.1
                          {
                          ID=1A
                          state=On
                          }

                          Comment


                            #14
                            In HS2 an event based upon the ON/OFF correlates with state= message. In HS3 you can setup to use only state= device, but I suspect your device is defined to be based upon level= (or text=). In this case you need to set your event up based upon the level= or text= value returned by netiom from the xapbsc.event message.

                            The relationship beween control and display using values is not clear to me. I did ask Rick on the developer's formum to provide a unified example such as how one would setup a device for traditional X10 on/off/brightness control using CAPI and Device/Value/Status pairs. There have been bits and pieces. Since mcsXap was an early plugin I did not have much to go on to understand what needed to be done. There is lilkely a way where the ON button will result in an ON graphic and show a 100% brightness. I just do not know know how to do it so I used unique ON and OFF values and allowed the level/value have the full range of 0 to 100%. If I was able to correlate ON button with ON graphic and ON trigger then you would be able to do what you have been trying. The solution, howver, for you is not that difficult by just specifing the value the netiom returnes rather than the text On.
                            Last edited by Michael McSharry; June 5, 2014, 03:40 PM.

                            Comment


                              #15
                              Hi, thanks for the reply.

                              I don't understand how I'd have the event trigger on value. No value is returned from the Netiom. Here is the return message.


                              xap-header
                              {
                              v=12
                              hop=1
                              UID=FF12341A
                              class=xapbsc.event
                              Source=phaedrus.netiom.Location:Output.10
                              }
                              output.state
                              {
                              State=on
                              }


                              I tried the event shown below. It does not fire at all when using the on/off buttons in the gui. Something isn't right. Can the HS3 plugin send "ON" and "OFF" instead of "On" and "Off"?


                              Thanks for the diagnosis on the overflow, I've changed the device codes to be >P.
                              Attached Files

                              Comment

                              Working...
                              X